[erlang-questions] If you are homesick for object.selector

Richard O'Keefe <>
Mon Jan 28 02:01:03 CET 2013


This is _so_ on-topic...

http://thedailywtf.com/Articles/Ancestors.aspx

From reading
http://www.xml.org//sites/www.xml.org/files/xslt_efficient_programming_techniques.pdf
it appears that the Kaysian technique is a horrible kluge to work around
the fact that XPath 1.0 does not have set operations.

XPath 2.0 _does_ have set operations:
3.3.3 Combining Node Sequences

[14]   	UnionExpr	    ::= IntersectExceptExpr ( ("union" | "|") IntersectExceptExpr )*
[15]   	IntersectExceptExpr ::= InstanceofExpr ( ("intersect" | "except") InstanceofExpr )*

It would be interesting to see measurements of intersections computed
using "say-exactly-what-you-mean" vs "Kaysian-kluge".  
Given that the results of union, intersect, except are returned in document order,
these operations would _probably_ be implemented as linear time merges; hard to beat.





More information about the erlang-questions mailing list