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]

Node selection question - Correction


Hi again:

I just found that the statement I included in my previous message does
not actually do what I need done.  It seems to be equivalent to
<xsl:apply-templates select="//INFO-OBJ" />.  So now my question is how
to formulate a statement such as the one below so that it will return a
collection of all INFO-OBJ elements that are not children of INFO-OBJ
elements?

> -----Original Message-----
> From:	Respess, Christe 
> Sent:	Tuesday, February 15, 2000 12:50 PM
> To:	'XSL-List'
> Subject:	Node selection question
> 
> Hi:
> 
> I am new to XSL and have not seen an example of this sort before, so I
> thought I'd ask for some advice from those more experienced.  The
> question concerns making a selection by filtering out certain nodes
> based on what element type their parent node is.  The type of node I
> am interested in selecting, INFO-OBJ, appears at any level in the XML
> document.  What I want to do is to select all the INFO-OBJ nodes that
> are not children of INFO-OBJ nodes.  The following statement works but
> as this will be applied to many documents of different structures and
> I've only tested on one, I want to know if this is the best way to
> make this sort of selection.
> 
> <xsl:apply-templates select="//INFO-OBJ[context()[not(INFO-OBJ)]]" />
> 
> TIA for any advice or links to good XML sites that may address this
> sort of thing.
> 
> Christe


 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]