xsl-list
[Top] [All Lists]

Re: [xsl] Data extraction

2018-12-17 13:50:37
Thanks David.

On Mon, Dec 17, 2018, 2:38 PM David Carlisle 
d(_dot_)p(_dot_)carlisle(_at_)gmail(_dot_)com <
xsl-list-service(_at_)lists(_dot_)mulberrytech(_dot_)com wrote:

On Mon, 17 Dec 2018 at 19:31, Mailing Lists Mail 
daktapaal(_at_)gmail(_dot_)com
<xsl-list-service(_at_)lists(_dot_)mulberrytech(_dot_)com> wrote:

David,
Thanks for the reply. My apologies, i didn't give example of my XML. The
XML contains single occurance of ElementToExtract/ node. In which case I
thought that instead of going through the whole tree, jumping to the
element using descendant::*:ElementToExtract is firstly small in code and
secondly eleminating the useless node traversal ?

Wanted to validate my thought ..

well still it may or may not be quicker, in particular if the element
is near the top of the tree the apply templates iteration will stop
quickly but the descendant::*:ElementToExtract in principle forces a
search of the whole document to find all the occurrences, as (assuming
no schema processing) xslt doesn't know there is only one. Of course
it might not need to search the document as the element names may have
been pre-indexed, but in ether case adding [1] to the end wouldn't
hurt and would make it stop after finding the element.

David


--~----------------------------------------------------------------
XSL-List info and archive: http://www.mulberrytech.com/xsl/xsl-list
EasyUnsubscribe: http://lists.mulberrytech.com/unsub/xsl-list/1167547
or by email: xsl-list-unsub(_at_)lists(_dot_)mulberrytech(_dot_)com
--~--
<Prev in Thread] Current Thread [Next in Thread>