[XSL-LIST Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message] RE: Re: Can this all fit into one Xpath expression?
> I got partway there, on my own with the following: > > //row/entry[Emphasis = 'Address > Offset']/ancestor::row/following-sibling::row/entry[Emphasis > = 'Physical Address']/following-sibling::entry[Emphasis = > 'Instance']/ancestor::row/following-sibling::row/entry[Emphasi > s = > 'Description']/ancestor::row/following-sibling::row/entry[Emph > asis = 'Type']/ancestor::GenTable[1] > > This more closely matches the location of the elements as > they are in the document Does the location matter? I would have expected something like //GenTable[row[entry/Emphasis = 'Address Offset' and entry/Emphasis='Physical Address' and entry/Emphasis ... ]] , but this still doesn't check for > @type='bold' If @type='bold' has to be true in each case, that would be //GenTable[row[entry/Emphasis[. = 'Address Offset' and @type='bold] and entry/Emphasis[.='Physical Address' and @type='bold'] ...]] or the condition that at least 4 of these > conditions be true. That's then //GenTable[count(row[entry/Emphasis[. = 'Address Offset' and @type='bold] or entry/Emphasis[.='Physical Address' and @type='bold'] or ...] >= 4] (If I've understood correctly) Michael Kay http://www.saxonica.com/
|
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
|