Re: AW: [xsl] Matching two consecutive <br><br>

Subject: Re: AW: [xsl] Matching two consecutive <br><br>
From: Kenneth Stephen <marvin.the.cynical.robot@xxxxxxxxx>
Date: Mon, 23 Aug 2004 06:54:21 -0500
On Mon, 23 Aug 2004 11:29:27 +0100, David Carlisle <davidc@xxxxxxxxx> wrote:
> 
> 
> > Could you be so kind and translate the predicates into plain english
> > to help my understanding - I'm especially keen on knowing to which
> > node "self" maps and in which order the predicates are mapped to the
> > node sets?
> 
> self:: is an axis that just contains the current node
> so self::br matches the current node if it's a br and matches nothing
> otherwise. so when used as a predicate it's the same as
> name(.)='br'
> except it's probably a bit more efficient and more importantly it's
> "namespace safe", if you are using namespaces you can never be 100%
> certain what string name() is going to return as a processor may think
> up arbitrary prefixes on the fly so you may be expecting
> name(.)='br' but actually teh processor returns a name(0 of _xx_654:br
> (this can't happen for the no-namespace case as such elements can never
> have a prefix)
> 
David,

    When would such a condition occur? Wouldnt the association of
namespace prefix to urn for any namespaces being used have to occur in
the stylesheet for the XML to be processed correctly? Why would the
the processor have to think up prefixes on the fly?

Thanks,
Kenneth

Current Thread