This is the mail archive of the xsl-list@mulberrytech.com mailing list .


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

RE: Re: topological sort


> Furthermore, if i were to build an XSL processor, i would compute
> the cardinality of a set while constructing it, which would make
> count($setvar) O(1) instead of O(card($setvar)) if the variable has
> been evaluated before. This way count($processed) would come for
> free, because the set will have to be constructed in full anyway.

It's not quite as simple as that because some of the ways of constructing a
node-set don't naturally eliminate duplicate nodes, so a processor may
construct a bag of nodes and delay converting it to a set until count() is
called.

I've no idea, of course, if Xalan does this.

Mike Kay

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


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]