[ http://issues.apache.org/jira/browse/XALANJ-1829?page=all ]

Brian Minchau updated XALANJ-1829:
----------------------------------

    Fix Version: 2.7

> Fails Oasis test case attribset40
> ---------------------------------
>
>          Key: XALANJ-1829
>          URL: http://issues.apache.org/jira/browse/XALANJ-1829
>      Project: XalanJ2
>         Type: Bug
>   Components: Xalan-CmdLine
>     Versions: CurrentCVS
>  Environment: Operating System: All
> Platform: Other
>     Reporter: elharo
>     Assignee: Xalan Developers Mailing List
>      Fix For: 2.7

>
> This is reproducible in Xalan-J 2.6.0. 
> (Someone needs to add a version for that in Bugzilla) 
> This is a very tricky test case. Start with this XML file:
> <?xml version="1.0"?>
> <docs>
>  <b>bdd:attr</b>
> </docs>
> Then use this XSLT stylesheet:
> <xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform"; version="1.0"
>            xmlns:bdd="http://bdd.test.com";>
>  <!-- FileName: attribset40 -->
>  <!-- Document: http://www.w3.org/TR/xslt -->
>  <!-- DocVersion: 19991116 -->
>  <!-- Section: 7.1.3 Creating Attributes -->
>  <!-- Creator: David Marston -->
>  <!-- Purpose: The attribute must be in the designated namespace, even if the
> prefix has
>    to be reset or ignored. -->
> <xsl:template match="/">
>  <out>
>    <bdd:jam>
>      <xsl:attribute name="{docs/b}"
> namespace="http://xyz.com";>jaminben</xsl:attribute>
>    </bdd:jam>
>  </out>
> </xsl:template>
> </xsl:stylesheet>
> The output should be something like:
> [EMAIL PROTECTED] attribset]$ java -classpath
> /opt/xml/xalan-j_2_6_0/bin/xalansamples.jar:/opt/xml/xalan-j_2_6_0/bin/xercesImpl.jar:/opt/xml/xalan-j_2_6_0/bin/xalan.jar
> org.apache.xalan.xslt.Process -IN attribset40.xml -XSL attribset40.xsl
> <?xml version="1.0" encoding="UTF-8"?>
> <out xmlns:bdd="http://bdd.test.com";><bdd:jam xmlns:bdd="http://xyz.com";
> bdd:attr="jaminben"/></out>
> That is Xalan should *remap the attribute prefix to avoid the namespace 
> conflict*. 
> Yes, I know that's weird but it is what the spec and the test case say. 
> Instead what we get is this, which is clearly wrong because it changes the jam
> element's namespace:
> <?xml version="1.0"?>
> <out xmlns:bdd="http://bdd.test.com";><bdd:jam xmlns:bdd="http://xyz.com";
> bdd:attr="jaminben"/></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]

Reply via email to