[XSL-LIST Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message]

Re: Conditional sort instruction as parameter within

Subject: Re: Conditional sort instruction as parameter within group && Syntactic matter of multilevel grouping | XSLT 2.0 | P2
From: "Martin Honnen martin.honnen@xxxxxx" <xsl-list-service@xxxxxxxxxxxxxxxxxxxxxx>
Date: Sun, 6 Jun 2021 18:29:09 -0000
Re:  Conditional sort instruction as parameter within
On 06.06.2021 19:34, Fiona Chen anonymousjuly1@xxxxxxxx wrote:

Question One: The conditional sort is based on the search:highlight, if
it is decimal, sort the putAmount and then incarnate the document.
Notice: The "Rationale" is that currency and amount must be paired. In
each search:snippet, the currency is one search:highlight while amount
another. I would imagine a pure XSLT conditional sort in below manner.

=====================================================
 B B B  <xsl:param name="sortAmount">
 B B B B B B B  <xsl:for-each select="highlight">
 B B B B B B B B B B B  <xsl:sort select="if (normalize-space() castable as
xs:decimal) then descending
 B B B B B B B B B B B B B B B  else ()"/>
 B B B B B B B  </xsl:for-each>
 B B B  </xsl:param>

 B B B  <xsl:template match="result">
 B B B B B B B  <xsl:variable name="doc" select="document(@uri)"/>
 B B B B B B B  <xsl:element name="Trade">
 B B B B B B B B B B B  <xsl:for-each-group select="." group-by="@uri">

A select="." on for-each-group is an attempt to group a single element and if the group-by="@uri" selects a single grouping key value I fail to understand what that whole attempt is about.


Question Two: Below produces the same result by replacing Line 55 - 60
in my original XSLT module. Can someone point out if below module is
syntactically correct? (It runs fine in the Oxygen.)

B B B B B B B <xsl:for-each-group select="." group-by="@uri">

Same here, a single element grouped by its single @uri attribute value simply processes that single element. Grouping doesn't make sense on a single element with a single grouping key, in my understanding.

Current Thread

PURCHASE STYLUS STUDIO ONLINE TODAY!

Purchasing Stylus Studio from our online shop is Easy, Secure and Value Priced!

Buy Stylus Studio Now

Download The World's Best XML IDE!

Accelerate XML development with our award-winning XML IDE - Download a free trial today!

Don't miss another message! Subscribe to this list today.
Email
First Name
Last Name
Company
Subscribe in XML format
RSS 2.0
Atom 0.3
Site Map | Privacy Policy | Terms of Use | Trademarks
Free Stylus Studio XML Training:
W3C Member
Stylus Studio® and DataDirect XQuery ™are products from DataDirect Technologies, is a registered trademark of Progress Software Corporation, in the U.S. and other countries. © 2004-2013 All Rights Reserved.