archanamanju
asked on
Xml Transformation
hi,
i want to transform the xml document to html using xsl stylesheets...
but i could not get the data from xml doc properly..
pls let me know wht to be added in my code...
here is my xml dox named myxml.xml...
<?xml version="1.0"?>
<?xml-stylesheet type="text/xsl" href="my.xsl"?>
<catalog>
<item name="Wondernut chrome" finish="chrome" locking="yes" quantity="4">
<description>Add a touch of security and style with these lugnuts</description>
<threadsizelist>
<threadsize>3/8-24</thread size>
<threadsize>7/16-20</threa dsize>
<threadsize>10mm*1.25</thr eadsize>
<threadsize>12mm*1.25</thr eadsize>
</threadsizelist>
<wheelcompatibilty>
<make>Aardwheels</make>
<make>Chromeover</make>
</wheelcompatibilty>
<wheelcompatibilty>
<make>ZooSpokes</make>
</wheelcompatibilty>
<carcompatibilty make="ABC motarworks" year="all"></carcompatibil ty>
<carcompatibilty mKE="yOGEU" year="1987-1988"></carcomp atibilty>
<Keywordlist>
<keyword>lugnut</keyword>
<keyword>lug nuts</keyword>
<keyword>siler</keyword>
<keyword>shiny</keyword>
</Keywordlist>
<price amount="20" currency="$US" tax="0%"></price>
<shipping cost="5" currency="$US" surcharges=""></shipping>
</item>
</catalog>
And my xsl stylesheet is...
<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/xsl/transform">
<xsl:output method="xml"/>
<xsl:template match="/">
<html>
<head><title>Lydia's Lugnuts</title></head>
<BODY>
<Table border="1">
<tr>
<td valign="top">
<p>Lydia's Lugnuts current offerings:</p>
<A href="locking.html">MoreLo cking Nuts</A><BR/>
<A href="exotic.html"> exotic Nuts</A><BR/>
<A href="basic.html">Basic Nuts</A><BR/>
</td>
<td>
<xsl:for-each select="">
<p><xsl:value-of select="."/></p>
</xsl:for-each>
</td>
</tr>
</Table>
Copywright Lydia's Lugnuts
</BODY>
</html>
</xsl:template>
</xsl:stylesheet>...
pls help me how to transform the xml doc into html...
Thanks in Advance
Archana
i want to transform the xml document to html using xsl stylesheets...
but i could not get the data from xml doc properly..
pls let me know wht to be added in my code...
here is my xml dox named myxml.xml...
<?xml version="1.0"?>
<?xml-stylesheet type="text/xsl" href="my.xsl"?>
<catalog>
<item name="Wondernut chrome" finish="chrome" locking="yes" quantity="4">
<description>Add a touch of security and style with these lugnuts</description>
<threadsizelist>
<threadsize>3/8-24</thread
<threadsize>7/16-20</threa
<threadsize>10mm*1.25</thr
<threadsize>12mm*1.25</thr
</threadsizelist>
<wheelcompatibilty>
<make>Aardwheels</make>
<make>Chromeover</make>
</wheelcompatibilty>
<wheelcompatibilty>
<make>ZooSpokes</make>
</wheelcompatibilty>
<carcompatibilty make="ABC motarworks" year="all"></carcompatibil
<carcompatibilty mKE="yOGEU" year="1987-1988"></carcomp
<Keywordlist>
<keyword>lugnut</keyword>
<keyword>lug nuts</keyword>
<keyword>siler</keyword>
<keyword>shiny</keyword>
</Keywordlist>
<price amount="20" currency="$US" tax="0%"></price>
<shipping cost="5" currency="$US" surcharges=""></shipping>
</item>
</catalog>
And my xsl stylesheet is...
<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/xsl/transform">
<xsl:output method="xml"/>
<xsl:template match="/">
<html>
<head><title>Lydia's Lugnuts</title></head>
<BODY>
<Table border="1">
<tr>
<td valign="top">
<p>Lydia's Lugnuts current offerings:</p>
<A href="locking.html">MoreLo
<A href="exotic.html"> exotic Nuts</A><BR/>
<A href="basic.html">Basic Nuts</A><BR/>
</td>
<td>
<xsl:for-each select="">
<p><xsl:value-of select="."/></p>
</xsl:for-each>
</td>
</tr>
</Table>
Copywright Lydia's Lugnuts
</BODY>
</html>
</xsl:template>
</xsl:stylesheet>...
pls help me how to transform the xml doc into html...
Thanks in Advance
Archana
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.