|
[XSL-LIST Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message] Re: xpath question
I can't remember if you are using xslt2 or xslt1, a direct encoding of > if I want to locate only the <scene> > element under ALL<list1> elements in the whole XML input inside the > <list1> template, and NOT the <scene> element under <list2>, in xpath2 would be .//scene except .//list2//scene in xpath1 you could use .//scene[not(ancestor::list2)] (which doesn't mean quite the same thing in general but will select the same things so long as list1 is never a descendent of list2. However are you sure you need to process all scene elements out of sequence like this? more commonly in xslt you woul djust have a tempolate for scene elements <xsl:tempate match="scene">... and a higher priority template for scenes under list2 <xsl:tempate match="list2//scene">... and so don't need to explictly select those scenes which are under list1 but not under list2, they automatically are matced by the first template. David Please read the posting guidelines for this list which advise you not to use subject lines such as "xpath question" which could apply to most of teh postings on this list.
|
PURCHASE STYLUS STUDIO ONLINE TODAY!Purchasing Stylus Studio from our online shop is Easy, Secure and Value Priced! Download The World's Best XML IDE!Accelerate XML development with our award-winning XML IDE - Download a free trial today! Subscribe in XML format
|






