Re: Matching nodes in the default namespace

Subject: Re: Matching nodes in the default namespace
From: David Carlisle <davidc@xxxxxxxxx>
Date: Thu, 28 Sep 2000 22:56:53 GMT

> Sure, I can understand that it's "the same" logically. But it's not the 
> same *lexically*, is it? I mean lexically when referred to by the XSLT 
> processor:

but the xslt processor doesn't see the lexical linearised form of the
input it (conceptually) sees the tree formed  by th exml parser.

and those trees are almost exactly the same (except for the information
about which prefixes were used which is tucked away in the name()
function and the namespace axis.

> I tried this and, as you know, it works. Amazing. I would *never* have 
> expected an attribute named "exclude-result-prefixes" to, as it were, 
> affect the way the source tree is perceived in match/select expressions; 
> literal result elements, yes, but not match/select expressions.

no try it without exclude-result-prefixes. It will still work, it is
just that then the namespace declaration will appear in the result.

There is nothing special about the "default" namespace   it isn't really
a default at all it is just the same as any other binding except that
the prefix is empty and in that case the syntax is modified and you
ommit the :.

You want to match the element catalogue in the namespace xxx
and for that the xsl is

<xsl:template xmlns:abc="xxx" match="abc:catalogue">

this will match this element whatever syntax for the namespace is used
in the source document, whether the prefix used is abc or c or empty.
But it doesn't match the element catalog that osn't in a namespace at
all.

David


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


Current Thread