This is the mail archive of the xsl-list@mulberrytech.com mailing list .


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: namespace issue



> 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
stylesheet.

You can go
<el xmlns="myns">
every time, or you can stick
xmlns="myns" in the xsl:stylesheet element and then just use
<el>
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.

David

_____________________________________________________________________
This message has been checked for all known viruses by Star Internet
delivered through the MessageLabs Virus Scanning Service. For further
information visit http://www.star.net.uk/stats.asp or alternatively call
Star Internet for details on the Virus Scanning Service.

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


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]