[xsl] Repost: How to make namespace declarations all global (i.e. in root element)

Subject: [xsl] Repost: How to make namespace declarations all global (i.e. in root element)
From: "Wes Kubo" <wkubo@xxxxxxxxxxxxx>
Date: Thu, 8 Aug 2002 08:43:26 -0700
Warning: repost follows. Can anyone at least let me know if this is possible
or not?
----------------------------------------------------------------------------
--------

Hello all.

First posting...checked all the archives and FAQ's but couldn't find an
answer to this (though it was probably in there somewhere). I have a
stylesheet that creates an output document that has elements in multiple
namespaces. I want the result to be of this form:

<rootElement xmlns="http://www.example.com/bar";
xmlns:foo="http:www.example.com/foo>
	<foo:fooElement1>foo1</fooElement>
	<foo:fooElement2>foo2</fooElement>
</rootElement>

but this is what I get:

<rootElement xmlns:bar="http://www.example.com/bar"; >
	<foo:fooElement1 xmlns:foo="http:www.example.com/foo>foo1</fooElement>
	<foo:fooElement2 xmlns:foo="http:www.example.com/foo>foo2</fooElement>
</rootElement>

While I realilze that both forms are of course valid, the program that uses
the output document expects to see the foo namespace declaration in the root
element (i.e. globally accessible throughout the document).

Is there anyway to force the foo namespace declaration to appear in the root
element so that it is available globally?

>From what I've read my impression is no, but I welcome any advice. Btw, I'm
using MSXML 4.0, not sure whether the choice of processor matters or not.

Thanks.

Wes


 XSL-List info and archive:  http://www.mulberrytech.com/xsl/xsl-list


Current Thread