[XSL-LIST Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message]

Re: a very unusual namespace question

Subject: Re: a very unusual namespace question
From: Oliver Becker <obecker@xxxxxxxxxxxxxxxxxxxxxxx>
Date: Fri, 18 May 2001 13:23:32 +0200 (MET DST)
Re:  a very unusual namespace question
> In most processors you will then be able to use the $ns-prefix to
> indicate the namespace that you're after.  The only problem is that
> processors don't *have* to use the prefix you've specified when you
> create the attribute:
> 
>   "XSLT processors may make use of the prefix of the QName specified
>   in the name attribute when selecting the prefix used for outputting
>   the created attribute as XML; however, they are not required to do
>   so and, if the prefix is xmlns, they must not do so."
> 
> so it's not guaranteed (although I don't know of a processor that
> doesn't).

Some kind of conformance test maybe?

XML:
<el xmlns:prefix="uri1" prefix:att="foo" />

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

<xsl:template match="el">
   <xsl:copy>
      <xsl:copy-of select="@*" />
      <xsl:attribute name="prefix:att2" 
                     namespace="uri2">bar</xsl:attribute>
   </xsl:copy>
</xsl:template>

</xsl:stylesheet>

Expected output?
XT and Saxon choose a different prefix (fine),
Xalan 2.0.1 ignores my namespace declaration to be "uri2" (wrong).

Cheers,
Oliver

/-------------------------------------------------------------------\
|  ob|do        Dipl.Inf. Oliver Becker                             |
|  --+--        E-Mail: obecker@xxxxxxxxxxxxxxxxxxxxxxx             |
|  op|qo        WWW:    http://www.informatik.hu-berlin.de/~obecker |
\-------------------------------------------------------------------/


 XSL-List info and archive:  http://www.mulberrytech.com/xsl/xsl-list


Current Thread

PURCHASE STYLUS STUDIO ONLINE TODAY!

Purchasing Stylus Studio from our online shop is Easy, Secure and Value Priced!

Buy Stylus Studio Now

Download The World's Best XML IDE!

Accelerate XML development with our award-winning XML IDE - Download a free trial today!

Don't miss another message! Subscribe to this list today.
Email
First Name
Last Name
Company
Subscribe in XML format
RSS 2.0
Atom 0.3
Site Map | Privacy Policy | Terms of Use | Trademarks
Free Stylus Studio XML Training:
W3C Member
Stylus Studio® and DataDirect XQuery ™are products from DataDirect Technologies, is a registered trademark of Progress Software Corporation, in the U.S. and other countries. © 2004-2013 All Rights Reserved.