PLEASE DO NOT REPLY TO THIS MESSAGE. TO FURTHER COMMENT ON THE STATUS OF THIS BUG PLEASE FOLLOW THE LINK BELOW AND USE THE ON-LINE APPLICATION. REPLYING TO THIS MESSAGE DOES NOT UPDATE THE DATABASE, AND SO YOUR COMMENT WILL BE LOST SOMEWHERE. http://nagoya.apache.org/bugzilla/show_bug.cgi?id=2840 *** shadow/2840 Thu Jul 26 12:55:47 2001 --- shadow/2840.tmp.19683 Thu Jul 26 12:55:47 2001 *************** *** 0 **** --- 1,81 ---- + +============================================================================+ + | xsltc fails conf test namespace16 not ignoring top-level element in unknow | + +----------------------------------------------------------------------------+ + | Bug #: 2840 Product: XalanJ2 | + | Status: NEW Version: CurrentCVS | + | Resolution: Platform: All | + | Severity: Minor OS/Version: All | + | Priority: Other Component: org.apache.xalan.xsltc | + +----------------------------------------------------------------------------+ + | Assigned To: [EMAIL PROTECTED] | + | Reported By: [EMAIL PROTECTED] | + | CC list: Cc: | + +----------------------------------------------------------------------------+ + | URL: | + +============================================================================+ + | DESCRIPTION | + This test tries to show that top-level elements with a name space URI other than + the XSL namespace that is not recognized as a vendor extension should be + ignored. XSLTC incorrectly fails to compile the style sheet. See section 14.1 in + the XSLT 1.0 spec and page 280 in Mike Kay's XSLT Programmer's Reference. + + Compile errors: + Unsupported XSLT extension: help:Header + + XSL + === + <?xml version="1.0"?> + <xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0" + xmlns:help="http://foobar.com" + extension-element-prefixes="help"> + + <!-- FileName: namespace16 --> + <!-- Document: http://www.w3.org/TR/xpath --> + <!-- DocVersion: 19991116 --> + <!-- Section: 2.2 Stylesheet Element --> + <!-- Creator: Paul Dick --> + <!-- Purpose: XSLT processor must ignore a top-level element without giving + and error if it does not recognize the namespace URI. The prefix used + must still resolve to a URI; but that URI may not be known. --> + + <help:Header comment="Header would go here"/> + <help:TOC comment="Table of Contents"/> + <help:template comment="This is the main template" match="doc" + process="children"/> + + <xsl:template match="doc"> + <out> + <xsl:value-of select="'Testing '"/> + <xsl:for-each select="*"> + <xsl:value-of select="."/><xsl:text> </xsl:text> + </xsl:for-each> + <xsl:call-template name="ThatTemp"> + <xsl:with-param name="sam">quos</xsl:with-param> + </xsl:call-template> + </out> + </xsl:template> + + <help:template comment="Named template" match="*" name="ThatTemp" + process="children"/> + + <xsl:template name="ThatTemp"> + <xsl:param name="sam">bo</xsl:param> + <xsl:copy-of select="$sam"/> + </xsl:template> + + <help:Footer comment="Footer would go here"/> + + XML + === + <?xml version="1.0" ?> + <doc> + <a>1</a> + <b>2</b> + <c>3</c> + </doc> + + Expected Output + =============== + <?xml version="1.0" encoding="UTF-8"?> + <out>Testing 1 2 3 quos</out> + </xsl:stylesheet>
