[XSL-LIST Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message] JDK 5 XSLTC handling of namespace prefixes
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
|
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
|