Closed Bug 218197 Opened 21 years ago Closed 21 years ago

Error loading stylesheet: Parsing an XSLT stylesheet failed.

Categories

(Core :: XML, defect)

x86
Windows 2000
defect
Not set
normal

Tracking

()

RESOLVED WORKSFORME

People

(Reporter: patrik.beno, Assigned: hjtoi-bugzilla)

Details

Attachments

(2 files, 1 obsolete file)

User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.0; en-US; rv:1.5b) Gecko/20030827 Build Identifier: Mozilla/5.0 (Windows; U; Windows NT 5.0; en-US; rv:1.5b) Gecko/20030827 XML: <?xml version="1.0"?> <?xml-stylesheet type="text/xsl" href="test.xsl"?> <whatever/> XSL: <?xml version="1.0"?> <xsl:stylesheet xmlns:xsl="http://www.w3.org/TR/WD-xsl" version="1.0"> <xsl:template match="/"/> </xsl:stylesheet> Point browser to test.xml, message "Error loading stylesheet: Parsing an XSLT stylesheet failed." is shown. If I change stylesheet reference from relative to absolute (http://localhost/test.xsl), it is parsed correctly, however, XML document is not styled, stylesheet is not applied. XML: <?xml version="1.0"?> <?xml-stylesheet type="text/xsl" href="http://localhost:81/~patrik/test.xsl"?> <OFX> Whatever </OFX> XSL: <?xml version="1.0"?> <xsl:stylesheet xmlns:xsl="http://www.w3.org/TR/WD-xsl" version="1.0"> <xsl:template match="/"> <html><body><b>Hello</b></body></html> </xsl:template> </xsl:stylesheet> Reproducible: Always Steps to Reproduce: 1. Create XML and XSl documents as described in "Details" 2. Point browser to test.xml, Error parsing XSL appears. 3. Change XSL reference to absolute (http:// tested), stylesheet is parsed OK, but style is not applied to document Actual Results: (a) Error loading stylesheet: Parsing an XSLT stylesheet failed. (b) XSL not applied to XML document Expected Results: (a) correctly recognize and parse relative reference to XSL (b) show document with stylesheet applied
try it with the correct xsl namespace xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
Attached file test document
Attached file test stylesheet (obsolete) —
your examples work for me locally
Also make sure the server sends the XSLT stylesheet with text/xml mime type.
try this one instead of test.xsl
Attachment #130840 - Attachment is obsolete: true
Seems it's more or less related to the namespace: <xsl:stylesheet xmlns:xsl="http://www.w3.org/TR/WD-xsl" version="1.0">
yes, that namespace is not supported. It was in the working draft and supported by MSXML3 or so I think. If you use the correct namespace all works fine. Marking WFM
Status: UNCONFIRMED → RESOLVED
Closed: 21 years ago
Resolution: --- → WORKSFORME
yes, WFM too, thanks.
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Creator:
Created:
Updated:
Size: