xsl-list
[Top] [All Lists]

[xsl] Data extraction

2018-12-17 11:54:36
Hi all
I have a requirement where I need to write an xslt to extract a particular
node from source tree.


Someone wrote an xslt that looked like this.. pseudo code

Template Match node()|@*
  Apply-template select node()|@*

Template match *:ElementToExtract
    Copy of select .

I thought the developer was making a lot of traversing using the above
approach and he could have instead done

Template match "/"
   Copy of select descendant::*:ElementToExtract


Would you agree ? I thought this was very obviously better and faster ...

Forgive my pseudo code.


Dr.pal








--~----------------------------------------------------------------
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>