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]

RE: Can one element have more than one namespaces?


Jeni.
(btw, I finally caught David Carlisle out! He actually
answered this one before I asked it.
I knew he wasn't a muggle!)


> > Which leaves the 'null' ns and no ns declaration.
> > Equivalent?
> > <A xmlns:x="" />
> > and <A>
> 
> Not precisely equivalent.
> 
> <A xmlns:x="" />
> 
> Translates to:
> 
> +- (element node) A - null namespace
>    \- (namespace node) xml
>    \- (namespace node) x
> 
> Whereas:
> 
> <A />
> 
> Translates to:
> 
> +- (element node) A - null namespace
>    \- (namespace node) xml
> 
> Both A elements are in the same (null) namespace, but the first has a
> namespace node named 'x' on it.  The example you're missing is:
> 
> <x:A xmlns:x="" />
> 
> which is almost exactly the same as:
> 
> <A xmlns:x="" />
> 
> The only difference from XSLT's point of view is that the name()
> function will return 'x:A' for the former and 'A' for the latter.

Talk about subtle! 

Thanks Jeni. Appreciated.

Regards DaveP

 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]