xsl-list
[Top] [All Lists]

RE: Element selection based on different overlapping descendant subsets

2006-02-01 05:10:53
I can define a set M of element names and if 
every descendant
of a particular <TABLE> is in this set then it is an 
M-TABLE, 


Define each known table type as a key:

<xsl:key name="m-table" match="table[.//ROW][.//CELL][.//A]"
use="generate-id()"/>


The approach using keys is a good idea, but I don't think Andrew's key
definition actually captures the requirement as stated.

In 2.0 it's:

match="TABLE[every $d in .//* satisfies $d[self::ROW or self::CELL or
self::A]]"

which translates into the 1.0

match="TABLE[not(.//*[not(self::ROW or self::CELL or self::A)])]

Michael Kay
http://www.saxonica.com/



--~------------------------------------------------------------------
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>
--~--