Friday, 18 April 2014

create an xslt document using adobe dreamweave and generate an htm file

Open xml file that you need to transform
<?xml version="1.0" encoding="utf-8"?>
<movieList xmlns:ot="http://www.othertitles.com">
 <movie>
   <title rating="PG">Star Wars</title>
   <review><![CDATA[Fantastic space opera. ]]></review>
 </movie>
 <movie rating="PG-13">
   <title>Spider-man</title>
        <review><![CDATA[excellent comic book adoption]]></review>

    </movie>
 <movie rating="PG-13">
   <title>MR. &amp;amp; Mrs Smith</title>
    <review><![CDATA[light and funny action comedy]]></review>
 </movie>
 <ot:movie>
   <ot:title>Casablanca</ot:title>
   <ot:title>Gone With the Wind</ot:title>
 </ot:movie>
</movieList>

New a file






   

Click XSLT (entire page)
Locate the xml file to select elements or attributes
Insert a table

Fill out the first row and drag Title and Review elements into the proper cells of the table
Select the second row









Click the repeat button
Select movie parent element and click ok

Press F12 to preview



Dreamweaver will also generate a htm file for you


No comments:

Post a Comment