[ http://issues.apache.org/jira/browse/XALANJ-2131?page=comments#action_12312883 ]
Henry Zongaro commented on XALANJ-2131: --------------------------------------- I suspect that your example in which your stylesheet invokes an apply-templates instruction for the element named "html," you've encountered the fact that an XPath NameTest with no prefix only matches nodes whose names are in no namespace - it does not match nodes whose names are in the default namespace. See this FAQ for more information: [1] I'm not sure what might be going wrong with your rdf:RDF example without a complete test case. Please supply a complete stylesheet and complete input document that demonstrates the problem. [1] http://xml.apache.org/xalan-j/faq.html#faq-N101DA > no xhtml or rdf parsing? > ------------------------ > > Key: XALANJ-2131 > URL: http://issues.apache.org/jira/browse/XALANJ-2131 > Project: XalanJ2 > Type: Bug > Components: parse-or-compile > Versions: 2.6 > Environment: Windows NT, java 1.5.0_02-b09 > Reporter: Siegfried Gipp > > i'm currently learning xsl with xalan-j. Besides working quite well there are > two strange exceptions where xalan-j seems not to work at all. > When the root element of the source xml file is rdf:RDF or html (for an xhtml > 1.0 file), the template for the "/" element matches, but no template for > "html", "/html", "rdf:RFD" or "/rdf:RDF" matches. When i change the root > elements to "xyz" in both files, the xml source file and the xsl stylesheet, > then i get the template working. Changing it back to html resp. rdf:RDF stops > the template working. > strange enough, but in a construct like: > <xsl:template match="/"> > <xsl:for-each select="*"> > <xsl:value-of select="name(.)"/> > </xsl:for-each> > </xsl:template> > prints out the root element name, be it rdf:RDF or html. But: > <xsl:template match="/"> > <xsl:apply-templates select="html"/> > <xsl:apply-templates select="/html"/> > </xsl:template> > does not call the appropriate template, neither the first call nor the > second. The same for rdf:RDF. Any other root element i tested up to now works. -- This message is automatically generated by JIRA. - If you think it was sent incorrectly contact one of the administrators: http://issues.apache.org/jira/secure/Administrators.jspa - For more information on JIRA, see: http://www.atlassian.com/software/jira --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
