From: Colin A. <col...@ho...> - 2007-03-09 11:43:52
|
Hello Franck, I'm having a problem with a bunch of the W3C XSLT tests involving embedded stylesheets and a DTD. It looks like XM_DEFAULT_ATTRIBUTE_FILTER is at fault. The reason I say this is I see calls to forward_attribute where a_ns and a_prefix are both Void, a_local = "xsl", and a_value = "http://www.w3.org/1999/XSL/Transform" - this looks wrong - I assume a_prefix should be set to xmlns. Here is the complete file, including DTD internal subset. Can you verify that the bug is in this class, and if so, how about a fix (or a sketch of how to do it)? <?xml version="1.0"?> <?xml-stylesheet type="text/xsl" href="#style1"?> <!DOCTYPE doc [ <!ELEMENT doc (#PCDATA | head | body)*> <!ATTLIST doc xmlns:xsl CDATA #FIXED "http://www.w3.org/1999/XSL/Transform" xsl:xpath-default-namespace CDATA #FIXED "http://example.org/ibm"> <!ELEMENT head (#PCDATA | xsl:stylesheet)*> <!ELEMENT body (#PCDATA | elem)*> <!ELEMENT xsl:stylesheet (#PCDATA | xsl:template)*> <!ATTLIST xsl:stylesheet id ID #REQUIRED xmlns:xsl CDATA #FIXED "http://www.w3.org/1999/XSL/Transform" version NMTOKEN #REQUIRED> <!ELEMENT xsl:template (#PCDATA | out)*> <!ATTLIST xsl:template match CDATA #IMPLIED> <!ELEMENT out (#PCDATA | xsl:for-each )*> <!ELEMENT xsl:for-each (#PCDATA | xsl:copy-of )*> <!ATTLIST xsl:for-each select CDATA #IMPLIED> <!ELEMENT xsl:copy-of (#PCDATA)*> <!ATTLIST xsl:copy-of select CDATA #IMPLIED> <!ELEMENT elem (#PCDATA | item)*> <!ELEMENT subitem (#PCDATA)*> <!ELEMENT item (#PCDATA | subitem)*> <!ATTLIST item attr CDATA #IMPLIED xmlns CDATA #IMPLIED> ]> <doc xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xsl:xpath-default-namespace="http://example.org/ibm" > <head> <xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="2.0" id="style1"> <!-- FileName: embed20_005 --> <!-- Document: http://www.w3.org/TR/xslt20 --> <!-- DocVersion: 20051103 --> <!-- Section: 3.11 Embedded Stylesheet Modules --> <!-- Purpose: Test case to verify that in a embedded standard stylesheet module, standard attribute (xsl:xpath-default-namespace) appearing on ancestors of the outermost element of the stylesheet module has no effect. --> <xsl:template match="/" > <out> <xsl:for-each select="doc/body/elem/item" > <xsl:copy-of select="." /> </xsl:for-each> </out> </xsl:template> </xsl:stylesheet> </head> <body> <elem> <item attr="atr1" xmlns="http://example.org/ibm"> <subitem>a</subitem> </item> <item attr="atr2" xmlns="http://example.org/ibm"> <subitem>b</subitem> </item> <item attr="atr3"><subitem>c</subitem></item> </elem> </body> <!-- Copyright IBM Corp. 2006 --> </doc> _________________________________________________________________ Get Messenger FREE on your Mobile https://livemessenger.mobile.uk.msn.com/ |