[Top] [All Lists]

RE: [xsl] Re: Can this all fit into one Xpath expression?

2009-04-15 10:50:00
I got partway there, on my own with the following:

//row/entry[Emphasis = 'Address 
= 'Physical Address']/following-sibling::entry[Emphasis = 
s = 
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 

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

XSL-List info and archive:  http://www.mulberrytech.com/xsl/xsl-list
To unsubscribe, go to: http://lists.mulberrytech.com/xsl-list/
or e-mail: <mailto:xsl-list-unsubscribe(_at_)lists(_dot_)mulberrytech(_dot_)com>

<Prev in Thread] Current Thread [Next in Thread>