[XSL-LIST Mailing List Archive Home] [By Thread] [By Date]

[xsl] Which XPath evaluates faster: count(../A) eq 1 or not( following-sibling::A)


Subject: [xsl] Which XPath evaluates faster: count(../A) eq 1 or not( following-sibling::A)
From: "Costello, Roger L. costello@xxxxxxxxx" <xsl-list-service@xxxxxxxxxxxxxxxxxxxxxx>
Date: Tue, 4 Nov 2014 13:56:59 -0000

Hi Folks,

I am positioned in the XML tree at the first <A> element, within a <parent>
element.

Requirement: There must be only one <A> element within <parent>.

Here are two XPath expressions to check that there is only one <A> element:

	count(../A) eq 1

or

	not(following-sibling::A)

Which XPath expression evaluates faster?

/Roger


Current Thread
Keywords