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

JDK 5 XSLTC handling of namespace prefixes

Subject: JDK 5 XSLTC handling of namespace prefixes
From: Julian Reschke <julian.reschke@xxxxxx>
Date: Mon, 19 Dec 2005 12:19:27 +0100
jdk 5
Hi,

I'm currently experiencing a somewhat weird behavior of JDK's XSLTC, when using xsl:element.

Example:

input.xml:

<D:multistatus xmlns:D="DAV:"/>

test-ns.xslt:

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

<xsl:template match="*">
  <xsl:element namespace="{namespace-uri()}" name="{local-name()}" />
</xsl:template>

<xsl:template match="/">
        <xsl:copy><xsl:apply-templates select="node()" /></xsl:copy>
</xsl:template>

</xsl:transform>


Expected result:


<multistatus xmlns="DAV:"/>


What I get is:


<ns0:multistatus xmlns:ns0="DAV:"/>


So XSLTC is rewriting prefixes, and it seems that <http://www.w3.org/TR/xslt#section-Creating-Elements-with-xsl:element> allows it to do so, and generally, the difference shouldn't be significant.


But in this case, it is, because I'm using XSLT to normalize results of a test suite, and the whole point here was to abstract away prefixes.

So is there a way to configure this?


Help appreciated,


Julian

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.