Transforming XML to XML using XSLT in IE9?

EDN Admin

Well-known member
Joined
Aug 7, 2010
Messages
12,794
Location
In the Machine
Hi, Im trying to transform source XML to another XML structure that our system will accept. Im using the following link as a reference
http://www.w3schools.com/xsl/xsl_transformation.asp http://www.w3schools.com/xsl/xsl_transformation.asp .
<br/>
<br/>

The issue is that it seems to not show the XML in IE9 when I test it. It only renders the text as inline as if its not getting processed by the XSLT. Ive tried compatability mode as well with no luck. I thought I would see the "nice"
XML structure in the browser.

Heres my source XML with a reference to the XSLT file.
<?xml version="1.0" encoding="ISO-8859-1"?><br/>
<?xml-stylesheet type="text/xsl cdcatalogToXml.xsl"?>
<catalog><br/>
<cd><br/>
<title>Empire Burlesque</title><br/>
<artist>Bob Dylan</artist><br/>
<country>USA</country><br/>
<company>Columbia</company><br/>
<price>10.90</price><br/>
<year>1985</year><br/>
</cd><br/>
</catalog>

Heres the XSLT file:

<?xml version="1.0" encoding="ISO-8859-1"?><br/>
<xsl:stylesheet version="2.0" xmlns:xsl=" http://www.w3.org/1999/XSL/Transform http://www.w3.org/1999/XSL/Transform <br/>
<xsl:output method="xml"/>
<xsl:template match="/ <br/>
<records><br/>
<xsl:for-each select="catalog/cd <br/>
<record><br/>
<title><xsl:value-of select="title"/></title><br/>
<artist><xsl:value-of select="artist"/></artist><br/>
</record><br/>
</xsl:for-each><br/>
</records><br/>
</xsl:template>
</xsl:stylesheet>

View the full article
 
Back
Top