>> Would you give an example of an XPath function that solves a common task
and you would put in a library?
>>
When I saw your question I found it hard to think of any functions or
templates I have reused across multiple projects in unrelated fields, though
of course I have often reused ideas.
But then I realised the reason: when I do come across things that look
reusable, I either try and get them added to the core features in the language
specification, or I implement them as Saxon-specific extension functions. If
you look at the list of extension functions in Saxon at
https://www.saxonica.com/documentation12/index.html#!functions/saxon
they are all things that I (or a user) found useful enough to feel that it was
worth making them available to everyone.
And the same is true of many features that found their way into the language,
things such as xsl:result-document, xsl:for-each-group, xsl:iterate, and many
others.
Michael Kay
|