[xquery-talk] Generating xhtml from xml in no namespace

Andrew Welch andrew.j.welch at gmail.com
Thu Dec 18 13:45:32 PST 2008

Hi Jesper,

> 2) Create a variable $x and put good old XHTML output, build the
> literal way, into it. The only thing that is missing is
> xmlns="http://www.w3.org/1999/xhtml" in the html element.
> 3) Now use the following:
> functx:change-element-ns-deep($x, "http://www.w3.org/1999/xhtml")

It's probably the "least worst" so far :) but the output also contains
XForms, so the function would have to only change elements in no
namespace and not all of them...

It's crying out for an xpath-default-namespace facility - is there an
"XQuery 2" in the pipeline that vendors can implement parts of now to
solve common problems like this?   (for example like Saxon provided
with the much needed xhtml output method way before xslt 2.0 was

Or of course, the other "solution" is when xslt can operate directly
on the database   (did I say that on this list? :)

Andrew Welch
Kernow: http://kernowforsaxon.sf.net/

More information about the talk mailing list