You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@xalan.apache.org by "Joanne Tong (JIRA)" <xa...@xml.apache.org> on 2005/01/06 23:44:13 UTC

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

     [ 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