You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@xalan.apache.org by xa...@xml.apache.org on 2004/09/20 21:34:37 UTC

[jira] Created: (XALANJ-1959) Failure to copy namespace nodes

Message:

  A new issue has been created in JIRA.

---------------------------------------------------------------------
View the issue:
  http://issues.apache.org/jira/browse/XALANJ-1959

Here is an overview of the issue:
---------------------------------------------------------------------
        Key: XALANJ-1959
    Summary: Failure to copy namespace nodes
       Type: Bug

     Status: Unassigned
   Priority: Major

    Project: XalanJ2
 Components: 
             Xalan-interpretive parser
   Versions:
             2.6

   Assignee: 
   Reporter: elharo

    Created: Mon, 20 Sep 2004 12:33 PM
    Updated: Mon, 20 Sep 2004 12:33 PM

Description:
Another OASIS test suite discrepancy. This time libxslt agrres with Xalan, but on reflection I think the test case is correct and Xalan and libxslt are wrong.

The test case is:

xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform">

    <!-- Purpose: Test case for bug 70935 -->

    <xsl:output method="xml" encoding="UTF-8" omit-xml-declaration="yes" indent="yes"/>

    <xsl:template match="/">
        <test><xsl:copy-of select="document('')/xsl:stylesheet/namespace::xsl"/></test>
    </xsl:template>

</xsl:stylesheet>


The expected output is:

<test xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
</test>


The actual output is

<test>
</test>

The namespace node has not been copied. 


---------------------------------------------------------------------
JIRA INFORMATION:
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

If you want more information on JIRA, or have a bug to report 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


Re: [jira] Commented: (XALANJ-1959) Failure to copy namespace nodes

Posted by Mukul Gandhi <ga...@gmail.com>.
Hi Henry,
   I have attached the patch file as asked to this JIRA issue.

I would be looking forward to your review comments to this patch, and
any possible required improvements.

On Sat, Nov 29, 2008 at 6:46 PM, Henry Zongaro (JIRA)
<xa...@xml.apache.org> wrote:
> Henry Zongaro commented on XALANJ-1959:
> ---------------------------------------
>
> Hi, Mukul.  Thanks very much for submitting the fix.  I'll try to review your patch in the coming week, but in the meanwhile may I ask you to attach a patch file (in unified diff format) in addition to the modified file?  That will be helpful for anybody who would like to apply the patch to an older snapshot of the source code.
> Thanks,
> Henry


-- 
Regards,
Mukul Gandhi

---------------------------------------------------------------------
To unsubscribe, e-mail: xalan-dev-unsubscribe@xml.apache.org
For additional commands, e-mail: xalan-dev-help@xml.apache.org


[jira] Commented: (XALANJ-1959) Failure to copy namespace nodes

Posted by xa...@xml.apache.org.
The following comment has been added to this issue:

     Author: elharo
    Created: Mon, 20 Sep 2004 1:06 PM
       Body:
I think the paragraph in 7.1.1 just means that the literal result element shoudln't pick up a declaration of the XSLT namespace from xmlns:xxsl declaration in the stylesheet. I don;t think it means an explicit insertion of that namespace using xsl:copy-of should be ignored. 
---------------------------------------------------------------------
View this comment:
  http://issues.apache.org/jira/browse/XALANJ-1959?page=comments#action_53253

---------------------------------------------------------------------
View the issue:
  http://issues.apache.org/jira/browse/XALANJ-1959

Here is an overview of the issue:
---------------------------------------------------------------------
        Key: XALANJ-1959
    Summary: Failure to copy namespace nodes
       Type: Bug

     Status: Unassigned
   Priority: Major

    Project: XalanJ2
 Components: 
             Xalan-interpretive parser
   Versions:
             2.6

   Assignee: 
   Reporter: elharo

    Created: Mon, 20 Sep 2004 12:33 PM
    Updated: Mon, 20 Sep 2004 1:06 PM

Description:
Another OASIS test suite discrepancy. This time libxslt agrres with Xalan, but on reflection I think the test case is correct and Xalan and libxslt are wrong.

The test case is:

xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform">

    <!-- Purpose: Test case for bug 70935 -->

    <xsl:output method="xml" encoding="UTF-8" omit-xml-declaration="yes" indent="yes"/>

    <xsl:template match="/">
        <test><xsl:copy-of select="document('')/xsl:stylesheet/namespace::xsl"/></test>
    </xsl:template>

</xsl:stylesheet>


The expected output is:

<test xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
</test>


The actual output is

<test>
</test>

The namespace node has not been copied. 


---------------------------------------------------------------------
JIRA INFORMATION:
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

If you want more information on JIRA, or have a bug to report 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] Commented: (XALANJ-1959) Failure to copy namespace nodes

Posted by "Henry Zongaro (JIRA)" <xa...@xml.apache.org>.
    [ https://issues.apache.org/jira/browse/XALANJ-1959?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12651714#action_12651714 ] 

Henry Zongaro commented on XALANJ-1959:
---------------------------------------

Hi, Mukul.  Thanks very much for submitting the fix.  I'll try to review your patch in the coming week, but in the meanwhile may I ask you to attach a patch file (in unified diff format) in addition to the modified file?  That will be helpful for anybody who would like to apply the patch to an older snapshot of the source code.
Thanks,
Henry

> Failure to copy namespace nodes
> -------------------------------
>
>                 Key: XALANJ-1959
>                 URL: https://issues.apache.org/jira/browse/XALANJ-1959
>             Project: XalanJ2
>          Issue Type: Bug
>      Security Level: No security risk; visible to anyone(Ordinary problems in Xalan projects.  Anybody can view the issue.) 
>          Components: parse-or-compile, Xalan-interpretive
>    Affects Versions: 2.6
>            Reporter: elharo
>         Attachments: ElemCopyOf.java
>
>
> Another OASIS test suite discrepancy. This time libxslt agrres with Xalan, but on reflection I think the test case is correct and Xalan and libxslt are wrong.
> The test case is:
> xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
>     <!-- Purpose: Test case for bug 70935 -->
>     <xsl:output method="xml" encoding="UTF-8" omit-xml-declaration="yes" indent="yes"/>
>     <xsl:template match="/">
>         <test><xsl:copy-of select="document('')/xsl:stylesheet/namespace::xsl"/></test>
>     </xsl:template>
> </xsl:stylesheet>
> The expected output is:
> <test xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
> </test>
> The actual output is
> <test>
> </test>
> The namespace node has not been copied. 

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


---------------------------------------------------------------------
To unsubscribe, e-mail: xalan-dev-unsubscribe@xml.apache.org
For additional commands, e-mail: xalan-dev-help@xml.apache.org


[jira] Commented: (XALANJ-1959) Failure to copy namespace nodes

Posted by xa...@xml.apache.org.
The following comment has been added to this issue:

     Author: David Marston
    Created: Mon, 20 Sep 2004 1:00 PM
       Body:
Perhaps this behavior is an attempt to obey the second paragraph of
Section 7.1.1? I would think that an explicit copy should go through
regardless of what the namespace URI is, except for the XML URI.
---------------------------------------------------------------------
View this comment:
  http://issues.apache.org/jira/browse/XALANJ-1959?page=comments#action_53251

---------------------------------------------------------------------
View the issue:
  http://issues.apache.org/jira/browse/XALANJ-1959

Here is an overview of the issue:
---------------------------------------------------------------------
        Key: XALANJ-1959
    Summary: Failure to copy namespace nodes
       Type: Bug

     Status: Unassigned
   Priority: Major

    Project: XalanJ2
 Components: 
             Xalan-interpretive parser
   Versions:
             2.6

   Assignee: 
   Reporter: elharo

    Created: Mon, 20 Sep 2004 12:33 PM
    Updated: Mon, 20 Sep 2004 1:00 PM

Description:
Another OASIS test suite discrepancy. This time libxslt agrres with Xalan, but on reflection I think the test case is correct and Xalan and libxslt are wrong.

The test case is:

xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform">

    <!-- Purpose: Test case for bug 70935 -->

    <xsl:output method="xml" encoding="UTF-8" omit-xml-declaration="yes" indent="yes"/>

    <xsl:template match="/">
        <test><xsl:copy-of select="document('')/xsl:stylesheet/namespace::xsl"/></test>
    </xsl:template>

</xsl:stylesheet>


The expected output is:

<test xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
</test>


The actual output is

<test>
</test>

The namespace node has not been copied. 


---------------------------------------------------------------------
JIRA INFORMATION:
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

If you want more information on JIRA, or have a bug to report 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] Commented: (XALANJ-1959) Failure to copy namespace nodes

Posted by xa...@xml.apache.org.
The following comment has been added to this issue:

     Author: Brian Minchau
    Created: Wed, 20 Oct 2004 9:51 AM
       Body:
Section 7.1.1 says that the created node in the result tree will have the attribute nodes that were present on the element node in the stylesheet, other than attributes with names in the XSLT namespace. 

After that initial statement it would seem to me that things can be added to that created node in the result tree, in particular more namespace nodes can be added with copy-of.

Section 11.3 (copy-of) says that when the result of evaluating the select expression is a node-set (which it is here, a set of namespace nodes), that the nodes are copied to the result tree.

I don't see any caveat in 11.3 about the URI "http://www.w3.org/1999/XSL/Transform". So it would seem that although with the initial creation that the XSLT namespace is not copied into the result tree, the copy-of should copy the namespace node declaring the XSLT namespace with the given prefix.

-------------------------------------------------
After some experimentation (thanks to Henry Zongaro's input) here is another stylesheet to consider:
<?xml version="1.0"?>
<xsl:stylesheet version="1.0" 
  xmlns:xsl="http://www.w3.org/1999/XSL/Transform" 
  xmlns:abc="ABC"> 
<xsl:output method="xml" encoding="UTF-8" omit-xml-declaration="yes" indent="yes"/> 

<xsl:template match="/"> 

  <test1>
    <xsl:copy-of select="document('')/xsl:stylesheet/namespace::*"/>
  </test1>
  <test2>
    <xsl:copy-of select="document('')/xsl:stylesheet/namespace::abc"/>
  </test2>
  <xsl:element name="test3">
    <xsl:copy-of select="document('')/xsl:stylesheet/namespace::*"/>
  </xsl:element>

</xsl:template> 

</xsl:stylesheet>

-----------------------------------------
Xalan-J interpretive produces this output:
<test1 xmlns:abc="ABC"/>
<test2 xmlns:abc="ABC"/>
<test3/>

Not only is <test1> missing xsl, and <test3> is missing both xsl and abc.

-----------------------------------------
XSLTC produces different, and what I think is the correct output:
<test1 xmlns:abc="ABC" xmlns:xsl="http://www.w3.org/1999/XSL/Transform"/>
<test2 xmlns:abc="ABC"/>
<test3 xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xmlns:abc="ABC"/>

--------------------------------------------
Modifying the stylesheet to this (and extra <doc> around the test elements):
<?xml version="1.0"?>
<xsl:stylesheet version="1.0" 
  xmlns:xsl="http://www.w3.org/1999/XSL/Transform" 
  xmlns:abc="ABC"> 
<xsl:output method="xml" encoding="UTF-8" omit-xml-declaration="yes" indent="yes"/> 

<xsl:template match="/"> 
<doc>
  <test1>
    <xsl:copy-of select="document('')/xsl:stylesheet/namespace::*"/>
  </test1>
  <test2>
    <xsl:copy-of select="document('')/xsl:stylesheet/namespace::abc"/>
  </test2>
  <xsl:element name="test3">
    <xsl:copy-of select="document('')/xsl:stylesheet/namespace::*"/>
  </xsl:element>
</doc>
</xsl:template> 

</xsl:stylesheet>

-------------------------------------
With the extra <doc> Xalan-J produces:
<doc xmlns:abc="ABC">
<test1/>
<test2/>
<test3/>
</doc>
So namespace nodes for abc exist on all of test1, test2, test3 (inherited from the parent <doc>), but xsl is missing from test1 and test3.

------------------------------------
XSLTC produces:
<doc xmlns:abc="ABC">
<test1 xmlns:xsl="http://www.w3.org/1999/XSL/Transform"/>
<test2/>
<test3 xmlns:xsl="http://www.w3.org/1999/XSL/Transform"/>
</doc>

Since test1, test2 and test3 inherit namespace mappings from their ancestors (only abc here)in the output XML document, test1, test2, and test3 do have all the appropriate namespace nodes.

-------------------------------------

---------------------------------------------------------------------
View this comment:
  http://issues.apache.org/jira/browse/XALANJ-1959?page=comments#action_54399

---------------------------------------------------------------------
View the issue:
  http://issues.apache.org/jira/browse/XALANJ-1959

Here is an overview of the issue:
---------------------------------------------------------------------
        Key: XALANJ-1959
    Summary: Failure to copy namespace nodes
       Type: Bug

     Status: Unassigned
   Priority: Major

    Project: XalanJ2
 Components: 
             Xalan-interpretive
             parse-or-compile
   Versions:
             2.6

   Assignee: 
   Reporter: elharo

    Created: Mon, 20 Sep 2004 12:33 PM
    Updated: Wed, 20 Oct 2004 9:51 AM

Description:
Another OASIS test suite discrepancy. This time libxslt agrres with Xalan, but on reflection I think the test case is correct and Xalan and libxslt are wrong.

The test case is:

xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform">

    <!-- Purpose: Test case for bug 70935 -->

    <xsl:output method="xml" encoding="UTF-8" omit-xml-declaration="yes" indent="yes"/>

    <xsl:template match="/">
        <test><xsl:copy-of select="document('')/xsl:stylesheet/namespace::xsl"/></test>
    </xsl:template>

</xsl:stylesheet>


The expected output is:

<test xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
</test>


The actual output is

<test>
</test>

The namespace node has not been copied. 


---------------------------------------------------------------------
JIRA INFORMATION:
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

If you want more information on JIRA, or have a bug to report 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] Commented: (XALANJ-1959) Failure to copy namespace nodes

Posted by xa...@xml.apache.org.
The following comment has been added to this issue:

     Author: David Bertoni
    Created: Mon, 20 Sep 2004 12:41 PM
       Body:
Xalan-C, Saxon 6.5.2, and MSXSL all produce the OASIS expected output.
---------------------------------------------------------------------
View this comment:
  http://issues.apache.org/jira/browse/XALANJ-1959?page=comments#action_53249

---------------------------------------------------------------------
View the issue:
  http://issues.apache.org/jira/browse/XALANJ-1959

Here is an overview of the issue:
---------------------------------------------------------------------
        Key: XALANJ-1959
    Summary: Failure to copy namespace nodes
       Type: Bug

     Status: Unassigned
   Priority: Major

    Project: XalanJ2
 Components: 
             Xalan-interpretive parser
   Versions:
             2.6

   Assignee: 
   Reporter: elharo

    Created: Mon, 20 Sep 2004 12:33 PM
    Updated: Mon, 20 Sep 2004 12:41 PM

Description:
Another OASIS test suite discrepancy. This time libxslt agrres with Xalan, but on reflection I think the test case is correct and Xalan and libxslt are wrong.

The test case is:

xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform">

    <!-- Purpose: Test case for bug 70935 -->

    <xsl:output method="xml" encoding="UTF-8" omit-xml-declaration="yes" indent="yes"/>

    <xsl:template match="/">
        <test><xsl:copy-of select="document('')/xsl:stylesheet/namespace::xsl"/></test>
    </xsl:template>

</xsl:stylesheet>


The expected output is:

<test xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
</test>


The actual output is

<test>
</test>

The namespace node has not been copied. 


---------------------------------------------------------------------
JIRA INFORMATION:
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

If you want more information on JIRA, or have a bug to report 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