You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@xalan.apache.org by "Yash Talwar (JIRA)" <xa...@xml.apache.org> on 2005/06/17 15:55:10 UTC

[jira] Created: (XALANJ-2149) Namespace Undeclaration in XML input document is not handled correctly.

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
 Assigned to: Yash Talwar 


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: xalan-dev-unsubscribe@xml.apache.org
For additional commands, e-mail: xalan-dev-help@xml.apache.org


[jira] Resolved: (XALANJ-2149) Namespace Undeclaration in XML input document is not handled correctly.

Posted by "Yash Talwar (JIRA)" <xa...@xml.apache.org>.
     [ http://issues.apache.org/jira/browse/XALANJ-2149?page=all ]
     
Yash Talwar resolved XALANJ-2149:
---------------------------------

    Resolution: Duplicate

This is a duplicate of XALANJ-2150

> 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

>
> 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: xalan-dev-unsubscribe@xml.apache.org
For additional commands, e-mail: xalan-dev-help@xml.apache.org


[jira] Updated: (XALANJ-2149) Namespace Undeclaration in XML input document is not handled correctly.

Posted by "Brian Minchau (JIRA)" <xa...@xml.apache.org>.
     [ 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: xalan-dev-unsubscribe@xml.apache.org
For additional commands, e-mail: xalan-dev-help@xml.apache.org