> Tangentially, is there a use case where xsl:key is expected to be
> preferable in performance terms to using maps?
No, I don't think so. Some people may find keys more intuitive, and they're
probably easier to manage if you need one-index-per-document with multiple
documents, but I don't think they will ever give a performance benefit.
Haven't measured it though.
One exception may be where you use the same "lookup document" for multiple
transformations using the same stylesheet - Saxon will then try to reuse the
xsl:key index. But you can organize that for yourself using maps quite easily
-- the simplest way of doing it is simply to pass a parsed JSON document as
the lookup index.
Michael Kay
Saxonica
|