1

I have an xls template that has multiple for-each groups. I would like to do a sorting over the result of all groups, however, I can't find how to do this. Do you guys have any suggestions?

If you require details, please let me know!

edit: Here's a sample of the xdo metadata sheet, it contains two for each groups , the result is a row in excel for each group that is in the xml input file. Now I want to sort those rows;

XDO_?XDOFIELD24?    <?../../../../Assignment_Details/Person_Number?>    
XDO_?XDOFIELD26?    <?concat(substring(../Termination_Date,9,2),'-',substring(../Termination_Date,6,2),'-',substring(../Termination_Date,1,4))?>    
XDO_?XDOFIELD27?    <?../Termination_Action?>   
XDO_?XDOFIELD28?    <?../Termination_Reason?>   
XDO_GROUP_?XDOG3?   <xsl:for-each select=".//Termination_Details/Termination_Date[text() != '']">   </xsl:for-each>
XDO_?XDOFIELD29?    <?sum(../Absence_Balance)?> 
XDO_?XDOFIELD30?    <?../Absence_Plan?> 
XDO_?XDOFIELD31?    <?../Absence_UOM?>  
XDO_?XDOFIELD32?    <?../../../../../../../../PAYROLL_ACTION_ID?>   
XDO_?XDOFIELD33?    <?../../../../Assignment_Details/Person_Number?>    
XDO_GROUP_?XDOG4?   <xsl:for-each select=".//Absence_Balance_Details/Absence_Accrual_Entry_ID[text() != '']">   </xsl:for-each>
jorishaak
  • 13
  • 4
  • We definitely need more details! Please show us that template and your code that you already tried, what exactly errors faced etc – Prophet Aug 26 '21 at 07:31
  • Hi Prophet, thanks for your quick reply! I added a sample, as I don't see an option to add the whole template. Does this make sense? – jorishaak Aug 26 '21 at 07:44
  • At least now I see I can't help with this. Sorry. – Prophet Aug 26 '21 at 07:46
  • Sort based on which value? `xsl:for-each` allows child elements `xsl:sort ` e.g. ` `. I don't know, however, how those snippets of XSLT in your code work, I have only seen the question due to the XSLT tag, I have never seen that format you have shown there. – Martin Honnen Aug 26 '21 at 12:00
  • https://stackoverflow.com/questions/9194732/sorting-in-xslt-within-nested-for-each : Is this what you are looking for? – Sai Patil Aug 29 '21 at 00:26

0 Answers0