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

Re: [xsl] Is this node, the document root... best test?


Subject: Re: [xsl] Is this node, the document root... best test?
From: David Carlisle <davidc@xxxxxxxxx>
Date: Mon, 20 Oct 2003 21:21:24 +0100

There's no point comparing the times as they test completely different
things.

not(parent::*)

tests whether the current node has a parent element, so this is true of
the document node /, the top level element and any top level comments
and processing instructions.

> ". = /"

is a wildly expensive test that tests the string value of the current
node with the string value of the entire document. This could be true on
any number of nodes, depending on the document structure.
On a document with just elements and attributes and no text, it is true
on every node for example.

David

 XSL-List info and archive:  http://www.mulberrytech.com/xsl/xsl-list



Current Thread