|
[XSL-LIST Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message] Re: $5 PAYPAL for correct answer still not claimed! Se
At 03:05 20-07-2001, David Glover wrote:
I wish to return all brands/lines/items that have this @OFFER attribute. This is the confusing part. What do you mean by "return"? An XPath expression matches nodes. You could have an expression that matches the brands, or, lines, or items, or all of them, but it's not clear what the value of matching all of them would be. Now, if by "return" you mean "copy into the result tree", i.e. copy the source tree but prune any branches that don't have offers, then what you probably want to do is have a template that matches any BRAND with an offer on any descendant, and then only process the ITEMs with any offers, etc. <xsl:template match="BRAND[@OFFER]" priority="1"> If it is an ITEM I wish to return its parent LINE and grandparent BRAND as well. If it is a LINE, I wish to return its child ITEMs and parent BRAND as well. If it is BRAND I wish it to return its child LINEs and its grandchildren ITEMs. I DO NOT WANT any siblings of the matched element.
XSL-List info and archive: http://www.mulberrytech.com/xsl/xsl-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
|

Cart








