Why can XSLT not parse this XML?

Posted by Matt W on Stack Overflow See other posts from Stack Overflow or by Matt W
Published on 2011-02-09T15:15:33Z Indexed on 2011/02/09 15:26 UTC
Read the original article Hit count: 329

Filed under:
|
|

Taking the XSLT and XML from this page as an example:

http://www.w3schools.com/xsl/xsl_transformation.asp

I have an xml file which contains (above example modified):

<?xml version="1.0" encoding="ISO-8859-1"?>
<?xml-stylesheet type="text/xsl" href="cdcatalog.xsl"?>
<catalog xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns="http://tempuri.org/">
    <cd>

In my case, the output contains nothing when the XSLT/XML is processed by the browser. The moment I remove the attributes from the element, it works. Problem is, I don't really have the option of pre-processing those attributes out of the file.

Can anyone explain how to force the XSLT to work with the XML as is, please? After all, those attributes seem fairly standard.

Many thanks,

Matt.

© Stack Overflow or respective owner

Related posts about Xml

Related posts about xslt