[XSL-LIST Mailing List Archive Home] [By Thread] [By Date]

RE: [xsl] adding namespaces to result nodes


Subject: RE: [xsl] adding namespaces to result nodes
From: "Michael Kay" <mike@xxxxxxxxxxxx>
Date: Fri, 8 Apr 2005 11:52:20 +0100

> <xsl:element name="{$elemname}" namespace="{$nsname}">
> 
> 
> As you can see the inverse transformed output has prefixes where my
> original had none. Also, the prefixes are numbered like ns0, 
> ns1 etc. which
> I don't think is not correct. 

You haven't said what the value of $elemname is. If it includes a prefix,
then most XSLT 1.0 processors will attempt to use that prefix, thought they
aren't obliged to do so. If it doesn't include a prefix, then the processor
may put the element in the default namespace, or it may invent a prefix.

Michael Kay
http://www.saxonica.com/


Current Thread
Keywords