Re: [xsl] namespace issue

Subject: Re: [xsl] namespace issue
From: David Carlisle <davidc@xxxxxxxxx>
Date: Tue, 11 Dec 2001 11:28:57 GMT
> Having specified the ns in the top level element,
> must I really add the xmlns attribute to all children?

don't think in terms of xmlns attributes, just think in terms of the
expanded name.

If you want to generate an element with expanded name {myns}el in the
output then you need to specify an element of that name in the

You can go
<el xmlns="myns">
every time, or you can stick
xmlns="myns" in the xsl:stylesheet element and then just use
this is equivalent as far as the namespace rec (and xslt) is concerned,
so just do whichever you prefer.

> I guess this still applies to the 'empty' ns? or is that special?

if you mean the empty prefix there is more or less nothing special about
that, the binding of the empty prefix to namespaces works in exactly the
same way as non empty prefixes, the only difference is thatif the prefix
is empty then the : is omitted.
If by empty ns you meant empty namespace name rather than empty prefix
then that is special in that it can only be assigned to the default
namespace (ie the empty prefix) you can't assign a non empty prefix to
the non-namespace.


This message has been checked for all known viruses by Star Internet
delivered through the MessageLabs Virus Scanning Service. For further
information visit or alternatively call
Star Internet for details on the Virus Scanning Service.

 XSL-List info and archive:

Current Thread