Subject: RE: [xsl] Help! How do I find elements through text contents XSLT 1.0 From: "Marroc" <marrocdanderfluff@xxxxxxxxxxx> Date: Thu, 24 Jan 2008 14:28:41 -0000 |
Thanks David, that has cracked it. I knew 'the dot' was unsafe and expensive - aren't so many things in this world - but I was getting desperate to solve it. Thanks again, Richard -----Original Message----- From: David Carlisle to cope with tbody not being there you could use descendant::tr[1]/*[1] ie, the first child of the first row. <template match="body/table"> <xsl:choose> <xsl:when test="contains(.,'Keyword')"> if that's Ok that's OK (if expensive, working out the stribg value of the whole table, and potentially unsafe unless you know that string could not appear elsewhere (for example its a numeric table apart from the heading) it works for the same reason my suggestion of using the string value of the first child of the first tr, the string value of an element is all its descendants text cointent. David
Current Thread |
---|
|
<- Previous | Index | Next -> |
---|---|---|
Re: [xsl] Help! How do I find eleme, David Carlisle | Thread | Re: [xsl] Help! How do I find eleme, Andrew Welch |
Re: [xsl] The identity transform an, Andrew Welch | Date | Re: [xsl] The identity transform an, David Carlisle |
Month |