Closed
Bug 218197
Opened 21 years ago
Closed 21 years ago
Error loading stylesheet: Parsing an XSLT stylesheet failed.
Categories
(Core :: XML, defect)
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
Comment 1•21 years ago
|
||
try it with the correct xsl namespace
xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
Reporter | ||
Comment 2•21 years ago
|
||
Reporter | ||
Comment 3•21 years ago
|
||
Comment 4•21 years ago
|
||
your examples work for me locally
Assignee | ||
Comment 5•21 years ago
|
||
Also make sure the server sends the XSLT stylesheet with text/xml mime type.
Reporter | ||
Comment 6•21 years ago
|
||
try this one instead of test.xsl
Attachment #130840 -
Attachment is obsolete: true
Reporter | ||
Comment 7•21 years ago
|
||
Seems it's more or less related to the namespace:
<xsl:stylesheet xmlns:xsl="http://www.w3.org/TR/WD-xsl" version="1.0">
Comment 8•21 years ago
|
||
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
Reporter | ||
Comment 9•21 years ago
|
||
yes, WFM too, thanks.
You need to log in
before you can comment on or make changes to this bug.
Description
•