[XSL-LIST Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message] Re: FW: Dealing with mixed content
My question was more to do with the pattern Joris used, i.e. generate-id((.. | preceding-sibling::hr)[last()]). I understand the generate-id() function but was not entirely sure what the pattern itself was doing. to group nodes together you need an expression that returns the smae string for every element in a group (and different strings for different groups) It doesn't matter what the string is. in your case you want to group nodes and you have two kinds of groups (in one possible description) one group which is everything before the first hr (if tehre is an hr) zero or more groups of everything following each hr element 9up to teh next one) Joris's xpath of (..|preceding-sibling::hr)[last()] (which you'll often see in the archives of this list) selects the parent node for any element in the first group and the closest previous hr element for each of the other groups, so applying generate-id() to that gives a string with the right properties for identifying your groups. david ________________________________________________________________________ This e-mail has been scanned for all viruses by Star. The service is powered by MessageLabs. For more information on a proactive anti-virus service working around the clock, around the globe, visit: http://www.star.net.uk ________________________________________________________________________
|
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
|