Hi,
I need to sort the $results based on element columnAlias in $sorting.
for eg :
In the below scenario, I want to first sort the $results with
AgreementType(desc) and then with CollectionNo(asc).If there is not <sort>
element in $sorting/sorting then do not use that element <columnAlias> for
sorting.
Moreover the elements in $sorting & $results will be dynamic and not fixed.
let $sorting :=<a> <sorting>
<columnAlias>Currency</columnAlias>
</sorting>
<sorting>
<sort>desc</sort>
<columnAlias>AgreementType</columnAlias>
</sorting>
<sorting>
<sort>asc</sort>
<columnAlias>CollectionNo</columnAlias>
</sorting></a>
let $results :=
<report>
<columns>
<title>Currency</title>
<title>AgreementType</title>
<title>CollectionNo</title>
</columns>
<results>
<result>
<Currency>US dollar</Currency>
<AgreementType>abc</AgreementType>
<CollectionNo>0000050</CollectionNo>
</result>
<result>
<Currency>Pound sterling</Currency>
<AgreementType>xyz</AgreementType>
<CollectionNo>0000048</CollectionNo>
</result>
<result>
<Currency>Euro</Currency>
<AgreementType>ebf</AgreementType>
<CollectionNo>0000049</CollectionNo>
</result>
</results>
</report>
Thanks
Pragya
?
"This e-mail and any attachments transmitted with it are for the sole use of
the intended recipient(s) and may contain confidential , proprietary or
privileged information. If you are not the intended recipient, please contact
the sender by reply e-mail and destroy all copies of the original message. Any
unauthorized review, use, disclosure, dissemination, forwarding, printing or
copying of this e-mail or any action taken in reliance on this e-mail is
strictly prohibited and may be unlawful."
_______________________________________________
General mailing list
[email protected]
Manage your subscription at:
http://developer.marklogic.com/mailman/listinfo/general