[XSL-LIST Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message] Re: Help! How do I find elements through text contents
> That is, I sometimes have extra <b> and <i> tags They would not affect the string value of the surrounding td or th, so the code I posted should work in those cases. 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 ________________________________________________________________________ The Numerical Algorithms Group Ltd is a company registered in England and Wales with company number 1249803. The registered office is: Wilkinson House, Jordan Hill Road, Oxford OX2 8DR, United Kingdom. This e-mail has been scanned for all viruses by Star. The service is powered by MessageLabs. ________________________________________________________________________
|
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
|