[ 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: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to