|
[XSL-LIST Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message] Re: Ridiculous XPath expression, can I reduce it?
Nick Vincent writes: > I found this XPath expression lurking in some code, and I'm thinking this > *may well* not be the most efficient way of performing this task, which > basically finds all the elements that exist below any given <input.form> tag > but not below an <input.link> tag. > > Here is the horror: > > .//input.hidden[count(ancestor::input.form[not(@done)])=1 and > not(@form.prefix) and not(ancestor::input.link)] | ... using "starts-with(name(.),'input.')" might reduce it somewhat personally, I'd let all the elements get processed, but add a <xsl:if test="not(ancester::input.link)"> ... </xsl:if> condition in the template Sebastian Rahtz XSL-List info and archive: http://www.mulberrytech.com/xsl/xsl-list
|
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
|

Cart








