[ http://issues.apache.org/jira/browse/XALANJ-2149?page=all ]
Brian Minchau updated XALANJ-2149:
----------------------------------
Fix Version: 2.7
> Namespace Undeclaration in XML input document is not handled correctly.
> -----------------------------------------------------------------------
>
> Key: XALANJ-2149
> URL: http://issues.apache.org/jira/browse/XALANJ-2149
> Project: XalanJ2
> Type: Bug
> Components: DTM
> Versions: CurrentCVS
> Environment: Windows 2000
> Reporter: Yash Talwar
> Assignee: Yash Talwar
> Fix For: 2.7
>
> Namespace Undeclaration for XML 1.1 sytlesheet is not supported in Xalan.
> However, a XML 1.1 input document can undeclare namespace prefix. Xalan
> should handle the Namespace undeclaration in XML 1.1 input documents
> correctly.
> For example,
> XML 1.1 input document:
> ------------------------------------
> <?xml version="1.1"?>
> <ns:ele xmlns:ns="uri" xmlns:p1="prefix1">
> <ele1 xmlns:ns="">
> </ele1>
> <ele2/>
> <ele3 xmlns:ns="" xmlns:p2="prefix2"/>
> </ns:ele>
> -----------------------------------
> Sytlesheet:
> -----------------------------------
> <xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
> version="1.0">
> <xsl:output method="xml" version="1.1" indent="yes" />
> <xsl:template match="/">
> <out>
> <v1>
> <xsl:value-of select="count(/*/ele1/namespace::*)"/>
> </v1>
> <v2>
> <xsl:value-of select="count(/*/ele2/namespace::*)"/>
> </v2>
> <v3>
> <xsl:value-of select="count(/*/ele3/namespace::*)"/>
> </v3>
> </out>
> </xsl:template>
> </xsl:stylesheet>
> ----------------------------------------
> Current output:
> ----------------------------------------
> <?xml version="1.1" encoding="UTF-8"?>
> <out>
> <v1>3</v1>
> <v2>3</v2>
> <v3>4</v3>
> </out>
> ----------------------------------------
> Correct output:
> ----------------------------------------
> <?xml version="1.1" encoding="UTF-8"?>
> <out>
> <v1>2</v1>
> <v2>3</v2>
> <v3>3</v3>
> </out>
> ---------------------------------------
--
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]