xsl-list
[Top] [All Lists]

RE: [xsl] matching elements of a list

2007-05-08 15:19:46

However, I've got to check for cycles ...


Well, don't use the algorithm on page 199 of my book (XSLT Prog Ref 3rd Ed),
because it's wrong!

To check for cycles you basically take the recursive function that traverses
the (logical) tree and pass an extra parameter which is the list of
ancestors in the (logical) tree, and then check that the node being
processed is not one of those ancestors. On each step down the tree you add
the current node to this list of ancestors.

Michael Kay
http://www.saxonica.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>
--~--

<Prev in Thread] Current Thread [Next in Thread>