I'm having trouble producing an xml output from another xml file using
xsl. The proper values are output to the browser as text with no
formating or xml tags (<rowset> and <row>).
Any ideas?
(The xml source is available below)
Here is my xsl:
<?xml version="1.0" encoding="UTF-8"?>
<xsl:stylesheet version="1.0"
xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
<xsl:output method="xml" indent="yes"/>
<xsl:template match="ProductInfo">
<rowset>
<xsl:for-each select="Details">
<row>
<ProductName>
<xsl:value-of select="ProductName"/>
</ProductName>
<Asin>
<xsl:value-of select="Asin"/>
</Asin>
<Catalog>
<xsl:value-of select="Catalog"/>
</Catalog>
<ReleaseDate>
<xsl:value-of select="ReleaseDate"/>
</ReleaseDate>
<ImageUrlSmall>
<xsl:value-of select="ImageUrlSmall"/>
</ImageUrlSmall>
<ListPrice>
<xsl:value-of select="ListPrice"/>
</ListPrice>
</row>
</xsl:for-each>
</rowset>
</xsl:template>
</xsl:stylesheet>
(Here is my source xml)
<?xml version="1.0" ?>
<?xml-stylesheet type="text/xsl" href="amazon.xsl"?>
<ProductInfo>
<Details
url="http://www.amazon.com/exec/obidos/ASIN/0380977427/webservices-20?dev-t=D3EE7PA4A5L11O%26camp=2025%26link_code=xm2">
<Asin>0380977427</Asin>
<ProductName>Quicksilver (The Baroque Cycle, Vol. 1)</ProductName>
<Catalog>Book</Catalog>
<Authors>
<Author>Neal Stephenson</Author>
</Authors>
<ReleaseDate>23 September, 2003</ReleaseDate>
<Manufacturer>William Morrow</Manufacturer>
<ImageUrlSmall>http://images.amazon.com/images/P/0380977427.01.THUMBZZZ.jpg</ImageUrlSmall>
<ImageUrlMedium>http://images.amazon.com/images/P/0380977427.01.MZZZZZZZ.jpg</ImageUrlMedium>
<ImageUrlLarge>http://images.amazon.com/images/P/0380977427.01.LZZZZZZZ.jpg</ImageUrlLarge>
<Availability>Usually ships within 24 hours</Availability>
<ListPrice>$27.95</ListPrice>
<OurPrice>$19.01</OurPrice>
<UsedPrice>$16.92</UsedPrice>
</Details>
<Details
url="http://www.amazon.com/exec/obidos/ASIN/0060523875/webservices-20?dev-t=D3EE7PA4A5L11O%26camp=2025%26link_code=xm2">
<Asin>0060523875</Asin>
<ProductName>The System of the World : Volume Three of The
Baroque Cycle</ProductName>
<Catalog>Book</Catalog>
<Authors>
<Author>Neal Stephenson</Author>
</Authors>
<ReleaseDate>21 September, 2004</ReleaseDate>
<Manufacturer>William Morrow</Manufacturer>
<ImageUrlSmall>http://images.amazon.com/images/P/0060523875.01.THUMBZZZ.jpg</ImageUrlSmall>
<ImageUrlMedium>http://images.amazon.com/images/P/0060523875.01.MZZZZZZZ.jpg</ImageUrlMedium>
<ImageUrlLarge>http://images.amazon.com/images/P/0060523875.01.LZZZZZZZ.jpg</ImageUrlLarge>
<Availability>Not yet published</Availability>
<ListPrice>$27.95</ListPrice>
<OurPrice>$19.56</OurPrice>
</Details>
<Details
url="http://www.amazon.com/exec/obidos/ASIN/0553380958/webservices-20?dev-t=D3EE7PA4A5L11O%26camp=2025%26link_code=xm2">
<Asin>0553380958</Asin>
<ProductName>Snow Crash</ProductName>
<Catalog>Book</Catalog>
<Authors>
<Author>NEAL STEPHENSON</Author>
</Authors>
<ReleaseDate>02 May, 2000</ReleaseDate>
<Manufacturer>Bantam </Manufacturer>
<ImageUrlSmall>http://images.amazon.com/images/P/0553380958.01.THUMBZZZ.jpg</ImageUrlSmall>
<ImageUrlMedium>http://images.amazon.com/images/P/0553380958.01.MZZZZZZZ.jpg</ImageUrlMedium>
<ImageUrlLarge>http://images.amazon.com/images/P/0553380958.01.LZZZZZZZ.jpg</ImageUrlLarge>
<Availability>Usually ships within 24 hours</Availability>
<ListPrice>$14.00</ListPrice>
<OurPrice>$11.20</OurPrice>
<UsedPrice>$4.99</UsedPrice>
</Details>
<Details
url="http://www.amazon.com/exec/obidos/ASIN/0060512806/webservices-20?dev-t=D3EE7PA4A5L11O%26camp=2025%26link_code=xm2">
<Asin>0060512806</Asin>
<ProductName>Cryptonomicon</ProductName>
<Catalog>Book</Catalog>
<Authors>
<Author>Neal Stephenson</Author>
</Authors>
<ReleaseDate>05 November, 2002</ReleaseDate>
<Manufacturer>Avon</Manufacturer>
<ImageUrlSmall>http://images.amazon.com/images/P/0060512806.01.THUMBZZZ.jpg</ImageUrlSmall>
<ImageUrlMedium>http://images.amazon.com/images/P/0060512806.01.MZZZZZZZ.jpg</ImageUrlMedium>
<ImageUrlLarge>http://images.amazon.com/images/P/0060512806.01.LZZZZZZZ.jpg</ImageUrlLarge>
<Availability>Usually ships within 24 hours</Availability>
<ListPrice>$7.99</ListPrice>
<OurPrice>$7.99</OurPrice>
<UsedPrice>$3.95</UsedPrice>
</Details>
<Details
url="http://www.amazon.com/exec/obidos/ASIN/0060599340/webservices-20?dev-t=D3EE7PA4A5L11O%26camp=2025%26link_code=xm2">
<Asin>0060599340</Asin>
<ProductName>The Confusion LTD</ProductName>
<Catalog>Book</Catalog>
<Authors>
<Author>Neal Stephenson</Author>
</Authors>
<ReleaseDate>01 October, 2004</ReleaseDate>
<Manufacturer>William Morrow</Manufacturer>
<ImageUrlSmall>http://images.amazon.com/images/P/0060599340.01.THUMBZZZ.jpg</ImageUrlSmall>
<ImageUrlMedium>http://images.amazon.com/images/P/0060599340.01.MZZZZZZZ.jpg</ImageUrlMedium>
<ImageUrlLarge>http://images.amazon.com/images/P/0060599340.01.LZZZZZZZ.jpg</ImageUrlLarge>
<Availability>Not yet released.</Availability>
<ListPrice>$200.00</ListPrice>
<OurPrice>$136.00</OurPrice>
</Details>
<Details
url="http://www.amazon.com/exec/obidos/ASIN/0553380966/webservices-20?dev-t=D3EE7PA4A5L11O%26camp=2025%26link_code=xm2">
<Asin>0553380966</Asin>
<ProductName>The Diamond Age : Or, a Young Lady's Illustrated
Primer</ProductName>
<Catalog>Book</Catalog>
<Authors>
<Author>Neal Stephenson</Author>
</Authors>
<ReleaseDate>02 May, 2000</ReleaseDate>
<Manufacturer>Bantam </Manufacturer>
<ImageUrlSmall>http://images.amazon.com/images/P/0553380966.01.THUMBZZZ.jpg</ImageUrlSmall>
<ImageUrlMedium>http://images.amazon.com/images/P/0553380966.01.MZZZZZZZ.jpg</ImageUrlMedium>
<ImageUrlLarge>http://images.amazon.com/images/P/0553380966.01.LZZZZZZZ.jpg</ImageUrlLarge>
<Availability>Usually ships within 24 hours</Availability>
<ListPrice>$13.95</ListPrice>
<OurPrice>$11.16</OurPrice>
<UsedPrice>$6.45</UsedPrice>
</Details>
<Details
url="http://www.amazon.com/exec/obidos/ASIN/0380815931/webservices-20?dev-t=D3EE7PA4A5L11O%26camp=2025%26link_code=xm2">
<Asin>0380815931</Asin>
<ProductName>In the Beginning...was the Command Line</ProductName>
<Catalog>Book</Catalog>
<Authors>
<Author>Neal Stephenson</Author>
</Authors>
<ReleaseDate>09 November, 1999</ReleaseDate>
<Manufacturer>Avon</Manufacturer>
<ImageUrlSmall>http://images.amazon.com/images/P/0380815931.01.THUMBZZZ.jpg</ImageUrlSmall>
<ImageUrlMedium>http://images.amazon.com/images/P/0380815931.01.MZZZZZZZ.jpg</ImageUrlMedium>
<ImageUrlLarge>http://images.amazon.com/images/P/0380815931.01.LZZZZZZZ.jpg</ImageUrlLarge>
<Availability>Usually ships within 24 hours</Availability>
<ListPrice>$10.00</ListPrice>
<OurPrice>$8.00</OurPrice>
<UsedPrice>$3.50</UsedPrice>
</Details>
<Details
url="http://www.amazon.com/exec/obidos/ASIN/1576752402/webservices-20?dev-t=D3EE7PA4A5L11O%26camp=2025%26link_code=xm2">
<Asin>1576752402</Asin>
<ProductName>The Referral of a Lifetime: The Networking System
that Produces Bottom-Line Results . . . Every Day!</ProductName>
<Catalog>Book</Catalog>
<Authors>
<Author>Timothy L. Templeton</Author>
<Author>Lynda Rutledge Stephenson</Author>
<Author>Tim Templeton</Author>
<Author>Kenneth H. Blanchard</Author>
</Authors>
<ReleaseDate>May, 2003</ReleaseDate>
<Manufacturer>Berrett-Koehler Pub</Manufacturer>
<ImageUrlSmall>http://images.amazon.com/images/P/1576752402.01.THUMBZZZ.jpg</ImageUrlSmall>
<ImageUrlMedium>http://images.amazon.com/images/P/1576752402.01.MZZZZZZZ.jpg</ImageUrlMedium>
<ImageUrlLarge>http://images.amazon.com/images/P/1576752402.01.LZZZZZZZ.jpg</ImageUrlLarge>
<Availability>THIS TITLE IS CURRENTLY NOT AVAILABLE. If you would
like to purchase this title, we recommend that you occasionally check
this page to see if it has become available.</Availability>
<ListPrice>$19.95</ListPrice>
<OurPrice>$13.97</OurPrice>
<UsedPrice>$14.64</UsedPrice>
</Details>
<Details
url="http://www.amazon.com/exec/obidos/ASIN/0553573861/webservices-20?dev-t=D3EE7PA4A5L11O%26camp=2025%26link_code=xm2">
<Asin>0553573861</Asin>
<ProductName>Zodiac</ProductName>
<Catalog>Book</Catalog>
<Authors>
<Author>Neal Stephenson</Author>
</Authors>
<ReleaseDate>01 June, 1995</ReleaseDate>
<Manufacturer>Bantam </Manufacturer>
<ImageUrlSmall>http://images.amazon.com/images/P/0553573861.01.THUMBZZZ.jpg</ImageUrlSmall>
<ImageUrlMedium>http://images.amazon.com/images/P/0553573861.01.MZZZZZZZ.jpg</ImageUrlMedium>
<ImageUrlLarge>http://images.amazon.com/images/P/0553573861.01.LZZZZZZZ.jpg</ImageUrlLarge>
<Availability>Usually ships within 24 hours</Availability>
<ListPrice>$7.50</ListPrice>
<OurPrice>$7.50</OurPrice>
<UsedPrice>$3.95</UsedPrice>
</Details>
</ProductInfo>