Re: [xsl] Global namespace prefixes (Corrected Examples)

Subject: Re: [xsl] Global namespace prefixes (Corrected Examples)
From: David Carlisle <davidc@xxxxxxxxx>
Date: Fri, 14 Nov 2008 17:03:01 GMT
> No top level att prefix.

that's a bug although clarifaction of copying of namepsace nodes was
clarified via an erraum to xslt 1 but that was years ago, I'd expect it
to work now.

> And if I add a copy-of the dummy element to the result tree:
> ...
>  <xsl:copy-of select="exslt:node-set($dummy)/*/namespace::att"/>

That's not copying the element its copying a namepace attribute, ie what
I posted. Your output suggested that you did do what you said not what
you showed:

 <xsl:copy-of select="exslt:node-set($dummy)/*/>

> I get this:

as you'd expect, a copy of the dummy element.
Although I note here you are generating an unprefixed dummy element
you (again) didn't post the stylesheet that produced the result you
posted, it would be consistent with you your variable containing an
unprefixed dummy element so there would be no binding for the prefix att
so <xsl:copy-of select="exslt:node-set($dummy)/*/namespace::att"/>
would select nothing.

Since this is rdf do you really mind an extra attribute?

Without using any extension function you could do as sufggested
 <xsl:attribute name="att:foo" namespace="{/dap:Dataset/@base}/att#"/>

which would make 

 <rdf:RDF att:foo="" xmlns:rdf="";

The Numerical Algorithms Group Ltd is a company registered in England
and Wales with company number 1249803. The registered office is:
Wilkinson House, Jordan Hill Road, Oxford OX2 8DR, United Kingdom.

This e-mail has been scanned for all viruses by Star. The service is
powered by MessageLabs. 

Current Thread