While bemoaning about lack of associative containers in xpath type system, we
have came up with a good implementation of t:allocate-names(). Implementation
can be seen at location
It is based on recursion and on the use of xsl:for-each-group.
Alogrithmic worst case complexity is O(N*LogN*LogL), where N is number of names, and L is a length of
a longest name.
This does not invalidate the idea that associative containers
are very wishful, as blessed one who naturally types such implementation. For us, it went the hard way, and has taken three days to realize that original algorithm is problematic, and to work out the better one.
In practice this means 2 seconds for the new implementation against 25 minutes for the old one.
a@href@title, b, blockquote@cite, em, i, strike, strong, sub, super, u