|
[XSL-LIST Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message] 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
|
PURCHASE STYLUS STUDIO ONLINE TODAY!Purchasing Stylus Studio from our online shop is Easy, Secure and Value Priced! Download The World's Best XML IDE!Accelerate XML development with our award-winning XML IDE - Download a free trial today! Subscribe in XML format
|

Cart








