Re: [xsl] XSLT 1.0 question on keys for namespace nodes

Subject: Re: [xsl] XSLT 1.0 question on keys for namespace nodes
From: Michael Kay <mike@xxxxxxxxxxxx>
Date: Wed, 01 Sep 2010 23:25:36 +0100
All node types including namespace nodes can be passed to generate-id()
function -- would have been nice to be able to get back to all node types
by
   <xsl:key name="nodes-by-genid"
            match="/ | node() | @* | namespace::*"
            use="generate-id()" />

But that is not possible by the spec, so I will have to search for a
workaround for namespace nodes for "pointers for XSLT 1.0", see question
in [2].


I'm afraid I've rather forgotten exactly what it is you are trying to do - but any stylesheet that touches all the namespace nodes in a document is likely to be very inefficient, because there are so many of them, and because they will probably be materialized only when touched. Indexing all the namespace nodes would be even more inefficient (if it were allowed) because each namespace node would then almost certainly occupy a non-negligible amount of memory.


Michael Kay
Saxonica

Current Thread