xsl-list
[Top] [All Lists]

Re: [xsl] A compelling use case for employing binary trees in XML processing?

2012-12-09 16:56:41
With xsl:sort you can get all the transactions in date order.

With xsl:key you can get the transactions for a specific date.

If you want all the transactions from 2012-04-15 to 2012-05-15, then neither keys nor sort is well suited, and a simple filter could be very inefficient. But binary trees will handle this well.

Michael Kay
Saxonica

On 09/12/2012 22:49, Costello, Roger L. wrote:
Hi Folks,

Dimitre has created a beautiful set of functions for building binary trees [1].

I understand that binary trees can be used to sort data. But XSLT already has 
<xsl:sort>, so using binary trees for sorting isn't a particularly compelling 
use case.

I am seeking a compelling use case for binary trees -- given XML document 
foo.xml and processing requirement P, a binary tree is ideally suited.

Would you provide a simple, compelling use case please?

/Roger

[1] 
http://dnovatchev.wordpress.com/2012/01/09/the-binary-search-tree-data-structurehaving-fun-with-xpath-3-0/

--~------------------------------------------------------------------
XSL-List info and archive:  http://www.mulberrytech.com/xsl/xsl-list
To unsubscribe, go to: http://lists.mulberrytech.com/xsl-list/
or e-mail: <mailto:xsl-list-unsubscribe(_at_)lists(_dot_)mulberrytech(_dot_)com>
--~--




--~------------------------------------------------------------------
XSL-List info and archive:  http://www.mulberrytech.com/xsl/xsl-list
To unsubscribe, go to: http://lists.mulberrytech.com/xsl-list/
or e-mail: <mailto:xsl-list-unsubscribe(_at_)lists(_dot_)mulberrytech(_dot_)com>
--~--