|
[XSL-LIST Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message] Re: Element selection based on different overlapping
> Define each known table type as a key: > > <xsl:key name="m-table" match="table[.//ROW][.//CELL][.//A]" > use="generate-id()"/> > > <xsl:key name="n-table" match="table[.//TYPING][.//CODE]" use="generate-id()"/> > > The m-table key then contains all the tables that fit the description > of an "M table", as so on. > > Then when you process each <TABLE> element, you can easily check what > type of table it is: > > <xsl:template match="TABLE"> > <xsl:choose> > <xsl:when test="key(m-table, generate-id())"> > I'm an m-table > </xsk:when> > <xsl:when test="key(n-table, generate-id())"> > I'm an n-table > </xsk:when> I've used a mixture of cases there, make sure you the correct one in the real thing :)
|
Back To School Sale!Save 30% off all Stylus Studio 2008 Products when you purchase from our Online Shop. 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
|






