Re: [xsl] I need to make sure that all namespace declarations get output to a particular element, not the document element

Subject: Re: [xsl] I need to make sure that all namespace declarations get output to a particular element, not the document element
From: Abel Braaksma <abel.online@xxxxxxxxx>
Date: Thu, 22 Mar 2007 15:18:22 +0100
bryan rasmussen wrote:

Thus I need to make sure my namespace declarations come out on the XML subtree that the OO xforms processor is taking as the document element, basically.


I see. That is grave news and a pity the OO people choose such an awful approach. Well, the scenario laid out in my mail will work if you remove the declarations from the root xsl:stylesheet. You will end-up having an awefull lot of work...


What if you move your namespace declarations to a DTD, where you define the root element of these elements that are separately processed by the forms processor as having the needed namespaces. This has some drawback (many people consider it bad practice to hide the namespaces in a DTD), but has the advantage in your scenario of never having to worry again about the declarations.

Of course, it is very well possible that OO is doing this incorrectly as well (i.e., if your doc is not processed by an XML processor before it takes out the xform parts, your out of luck).

Yet another approach is post-processing. Or use XSLT 2 (but you said you can't).

Cheers,
-- Abel

Current Thread