You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@xalan.apache.org by "David Smiley (JIRA)" <xa...@xml.apache.org> on 2004/12/30 19:56:06 UTC

[jira] Created: (XALANJ-2035) xsl:attribute if has no @namespace then DON'T use default namespace

xsl:attribute if has no @namespace then DON'T use default namespace
-------------------------------------------------------------------

         Key: XALANJ-2035
         URL: http://nagoya.apache.org/jira/browse/XALANJ-2035
     Project: XalanJ2
        Type: Bug
    Versions: 2.5    
 Environment: Running Xalan 2.5.1 from within Oxygen xml tool
    Reporter: David Smiley


Please see the official specification, section 7.1.3:
http://www.w3.org/TR/xslt#creating-attributes
Particularly, the last clause of the 2nd paragraph: "not including any default namespace declaration".

So what this means is that if you don't have a "namespace" attribute on <xsl:attribute> and if the "name" attribute of <xsl:attribute> is un-prefixed, then the XSLT processor is to output the attribute without a namespace.

As it stands right now, I have to throw on a namespace="" to get this effect but I shouldn't have to do that.

Example stylesheet (I edited my actual existing one to trim out superfluous stuff to show you what I mean):
<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0"
    xmlns="http://schemas.xmlsoap.org/wsdl/"
    xmlns:wsdlsoap="http://schemas.xmlsoap.org/wsdl/soap/">

    <xsl:template match="*">
        <xsl:copy>
            <xsl:attribute name="name">MyException</xsl:attribute>
            <xsl:apply-templates select="@*|node()"/>
        </xsl:copy>
    </xsl:template>
</xsl:stylesheet>

At the time <xsl:attribute> is evaluated, the default namespace is xmlns="http://schemas.xmlsoap.org/wsdl/" (which was declared at the top of the document.  The specification specifically makes an exception to omit the default namespace declaration when assigning the namespace to the attribute generated.  Xalan is faulty right now and outputs:   wsdl:name="MyException"   right now but it shouldn't have a prefix.

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
   http://nagoya.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] Updated: (XALANJ-2035) xsl:attribute if has no @namespace then DON'T use default namespace

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

Brian Minchau updated XALANJ-2035:
----------------------------------

    Fix Version: 2.7
                     (was: CurrentCVS)

> xsl:attribute if has no @namespace then DON'T use default namespace
> -------------------------------------------------------------------
>
>          Key: XALANJ-2035
>          URL: http://issues.apache.org/jira/browse/XALANJ-2035
>      Project: XalanJ2
>         Type: Bug
>     Versions: 2.5
>  Environment: Running Xalan 2.5.1 from within Oxygen xml tool
>     Reporter: David Smiley
>      Fix For: 2.7

>
> Please see the official specification, section 7.1.3:
> http://www.w3.org/TR/xslt#creating-attributes
> Particularly, the last clause of the 2nd paragraph: "not including any default namespace declaration".
> So what this means is that if you don't have a "namespace" attribute on <xsl:attribute> and if the "name" attribute of <xsl:attribute> is un-prefixed, then the XSLT processor is to output the attribute without a namespace.
> As it stands right now, I have to throw on a namespace="" to get this effect but I shouldn't have to do that.
> Example stylesheet (I edited my actual existing one to trim out superfluous stuff to show you what I mean):
> <xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0"
>     xmlns="http://schemas.xmlsoap.org/wsdl/"
>     xmlns:wsdlsoap="http://schemas.xmlsoap.org/wsdl/soap/">
>     <xsl:template match="*">
>         <xsl:copy>
>             <xsl:attribute name="name">MyException</xsl:attribute>
>             <xsl:apply-templates select="@*|node()"/>
>         </xsl:copy>
>     </xsl:template>
> </xsl:stylesheet>
> At the time <xsl:attribute> is evaluated, the default namespace is xmlns="http://schemas.xmlsoap.org/wsdl/" (which was declared at the top of the document.  The specification specifically makes an exception to omit the default namespace declaration when assigning the namespace to the attribute generated.  Xalan is faulty right now and outputs:   wsdl:name="MyException"   right now but it shouldn't have a prefix.

-- 
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] Commented: (XALANJ-2035) xsl:attribute if has no @namespace then DON'T use default namespace

Posted by "Joanne Tong (JIRA)" <xa...@xml.apache.org>.
     [ http://nagoya.apache.org/jira/browse/XALANJ-2035?page=comments#action_57135 ]
     
Joanne Tong commented on XALANJ-2035:
-------------------------------------

I could not reproduce this problem using the stylesheet provided while running the latest Xalan version. I did a quick scan of Oxygen's online documentation and noticed that the section on JAXP XSLT Transformer option might be useful.  I suggest downloading the latest version of Xalan and give that option a try.

> xsl:attribute if has no @namespace then DON'T use default namespace
> -------------------------------------------------------------------
>
>          Key: XALANJ-2035
>          URL: http://nagoya.apache.org/jira/browse/XALANJ-2035
>      Project: XalanJ2
>         Type: Bug
>     Versions: 2.5
>  Environment: Running Xalan 2.5.1 from within Oxygen xml tool
>     Reporter: David Smiley

>
> Please see the official specification, section 7.1.3:
> http://www.w3.org/TR/xslt#creating-attributes
> Particularly, the last clause of the 2nd paragraph: "not including any default namespace declaration".
> So what this means is that if you don't have a "namespace" attribute on <xsl:attribute> and if the "name" attribute of <xsl:attribute> is un-prefixed, then the XSLT processor is to output the attribute without a namespace.
> As it stands right now, I have to throw on a namespace="" to get this effect but I shouldn't have to do that.
> Example stylesheet (I edited my actual existing one to trim out superfluous stuff to show you what I mean):
> <xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0"
>     xmlns="http://schemas.xmlsoap.org/wsdl/"
>     xmlns:wsdlsoap="http://schemas.xmlsoap.org/wsdl/soap/">
>     <xsl:template match="*">
>         <xsl:copy>
>             <xsl:attribute name="name">MyException</xsl:attribute>
>             <xsl:apply-templates select="@*|node()"/>
>         </xsl:copy>
>     </xsl:template>
> </xsl:stylesheet>
> At the time <xsl:attribute> is evaluated, the default namespace is xmlns="http://schemas.xmlsoap.org/wsdl/" (which was declared at the top of the document.  The specification specifically makes an exception to omit the default namespace declaration when assigning the namespace to the attribute generated.  Xalan is faulty right now and outputs:   wsdl:name="MyException"   right now but it shouldn't have a prefix.

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
   http://nagoya.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] Resolved: (XALANJ-2035) xsl:attribute if has no @namespace then DON'T use default namespace

Posted by "Joanne Tong (JIRA)" <xa...@xml.apache.org>.
     [ http://issues.apache.org/jira/browse/XALANJ-2035?page=history ]
     
Joanne Tong resolved XALANJ-2035:
---------------------------------

     Resolution: Fixed
    Fix Version: CurrentCVS

> xsl:attribute if has no @namespace then DON'T use default namespace
> -------------------------------------------------------------------
>
>          Key: XALANJ-2035
>          URL: http://issues.apache.org/jira/browse/XALANJ-2035
>      Project: XalanJ2
>         Type: Bug
>     Versions: 2.5
>  Environment: Running Xalan 2.5.1 from within Oxygen xml tool
>     Reporter: David Smiley
>      Fix For: CurrentCVS

>
> Please see the official specification, section 7.1.3:
> http://www.w3.org/TR/xslt#creating-attributes
> Particularly, the last clause of the 2nd paragraph: "not including any default namespace declaration".
> So what this means is that if you don't have a "namespace" attribute on <xsl:attribute> and if the "name" attribute of <xsl:attribute> is un-prefixed, then the XSLT processor is to output the attribute without a namespace.
> As it stands right now, I have to throw on a namespace="" to get this effect but I shouldn't have to do that.
> Example stylesheet (I edited my actual existing one to trim out superfluous stuff to show you what I mean):
> <xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0"
>     xmlns="http://schemas.xmlsoap.org/wsdl/"
>     xmlns:wsdlsoap="http://schemas.xmlsoap.org/wsdl/soap/">
>     <xsl:template match="*">
>         <xsl:copy>
>             <xsl:attribute name="name">MyException</xsl:attribute>
>             <xsl:apply-templates select="@*|node()"/>
>         </xsl:copy>
>     </xsl:template>
> </xsl:stylesheet>
> At the time <xsl:attribute> is evaluated, the default namespace is xmlns="http://schemas.xmlsoap.org/wsdl/" (which was declared at the top of the document.  The specification specifically makes an exception to omit the default namespace declaration when assigning the namespace to the attribute generated.  Xalan is faulty right now and outputs:   wsdl:name="MyException"   right now but it shouldn't have a prefix.

-- 
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