[XSL-LIST Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message] Re: Problem sorting incoming node list
On 08.05.2019 19:18, Michael Kay mike@xxxxxxxxxxxx wrote:
I haven't had a chance to study all of this, but please note that if you want to use the XPath 3.1 function then you should be using a more recent Saxon release than 9.3. The current version is 9.9. Also, only the 1-argument version of sort() will work in Saxon-HE; the more useful versions of the function (that allow a user-defined sort key) are higher order functions and therefore require Saxon-PE or Saxon-EE. The syntax would be
function($entry) {data($entry/(isodate,time))})" group-by="statistics_category"> To do it with HE you could implement a sort function with xsl:function based on xsl:perform-sort e.g. declare some namespace for your function xmlns:mf="http://example.com/mf" and define <xsl:function name="mf:sort-entries" as="element(entry)*"> <xsl:param name="entries" as="element(entry)*"/> <xsl:perform-sort select="$entries"> <xsl:sort select="isodate"/> <xsl:sort select="time"/> </xsl:perform-sort> </xsl:function> then you can use <xsl:for-each-group select="mf:sort-entries(entry[location=$undulator])" group-by="..."
|
PURCHASE STYLUS STUDIO ONLINE TODAY!Purchasing Stylus Studio from our online shop is Easy, Secure and Value Priced! Download The World's Best XML IDE!Accelerate XML development with our award-winning XML IDE - Download a free trial today! Subscribe in XML format
|