[xquery-talk] Constructing namespace nodes

Michael Kay mike at saxonica.com
Mon Feb 7 09:11:02 PST 2011


> For example if I load the serialized XML into a Saxon TinyTree then
> re-serialize it with a NamespaceReducer in the chain the unused namespace
> declarations will be gone.   Not to pick on Saxon, its doing perfectly and
> exactly what I tell it to ...   But there are other processes which do
> similar things that is either not in the control of the typical user, or
> very non-obvious.
>

Then you are doing something wrong. The defaults in both XSLT and XQuery 
are that namespaces are retained, unless you do something to say you 
don't need them. If you're building a low-level Saxon pipeline involving 
things such as a NamespaceReducer, then it's entirely under your control 
whether namespaces are retained or not.

Michael Kay
Saxonica


More information about the talk mailing list