Open Bug 527717 Opened 16 years ago Updated 3 years ago

XSL transform with external XML files doesn't work

Categories

(Core :: XML, defect)

x86
Linux
defect

Tracking

()

UNCONFIRMED

People

(Reporter: jc, Unassigned)

Details

Attachments

(1 file)

User-Agent: Mozilla/5.0 (X11; U; Linux i686; fr; rv:1.9.1.4) Gecko/20091028 Ubuntu/9.10 (karmic) Firefox/3.5.4 Build Identifier: Mozilla/5.0 (X11; U; Linux i686; fr; rv:1.9.1.4) Gecko/20091028 Ubuntu/9.10 (karmic) Firefox/3.5.4 XSL transform with external XML files doesn't work. The external XML files are ignored. The result of the example should be "MASTER SLAVE". With Firefox the result is "MASTER". It's OK with IE. Example files : master.xsl ========== <?xml version="1.0" encoding="UTF-8" ?> <!ELEMENT master (slave*)> <!ATTLIST master nom CDATA #REQUIRED> <!ELEMENT slave EMPTY> <!ATTLIST slave nom CDATA #REQUIRED> [dactar@DRKP1:/data/web/appliserv/probfirefox]$ cat master.xsl <?xml version="1.0" encoding="UTF-8"?> <xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform"> <xsl:template match="/"> <html><head></head><body> <xsl:apply-templates /> </body></html> </xsl:template> <xsl:template match="master"> <xsl:value-of select = "./@nom"/> <xsl:apply-templates /> </xsl:template> <xsl:template match="slave"> <xsl:value-of select = "./@nom"/> </xsl:template> </xsl:stylesheet> master.dtd ========== <?xml version="1.0" encoding="UTF-8" ?> <!ELEMENT master (slave*)> <!ATTLIST master nom CDATA #REQUIRED> <!ELEMENT slave EMPTY> <!ATTLIST slave nom CDATA #REQUIRED> master.xml ========== <?xml version="1.0" encoding="UTF-8" standalone="no" ?> <!DOCTYPE master SYSTEM "master.dtd" [ <!ENTITY slave SYSTEM "slave.xml"> ] > <?xml-stylesheet type="text/xsl" href="master.xsl"?> <master nom="MASTER"> &slave; </master> slave.xml ========= <?xml version="1.0" encoding="UTF-8"?> <slave nom="SLAVE"> </slave> Reproducible: Always Steps to Reproduce: 1. Save the four 4 example files 2. Open master.xml Actual Results: Firefox display "MASTER" Expected Results: Firefox should display "MASTER SLAVE"
Error with copy/past when writting details bugs. The correct example file master.xsl is : master.xsl ========== <?xml version="1.0" encoding="UTF-8"?> <xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform"> <xsl:template match="/"> <html><head></head><body> <xsl:apply-templates /> </body></html> </xsl:template> <xsl:template match="master"> <xsl:value-of select = "./@nom"/> <xsl:apply-templates /> </xsl:template> <xsl:template match="slave"> <xsl:value-of select = "./@nom"/> </xsl:template> </xsl:stylesheet>
I can confirm reporter's STR is happening. Not being the xsl specialist, moving bug to content for a real confirmation.
Component: General → XML
Product: Firefox → Core
QA Contact: general → xml
I tried something very similar but on the local file system, I am using windows xp professional edition service pack 3 and firefox version 3.6. I tried to apply xsl to an xml file but it didn't work. The xsl file was located in the directory above the directory where the xml file exists. So the stylesheet tag looks somewhat like this in my xml file. <?xml-stylesheet type="text/xsl" href="../somexslfile.xsl"?> But the stylesheet doesn't get rendered.
Severity: normal → S3
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Creator:
Created:
Updated:
Size: