I have a xml given below:
<root title='الصفحة الرئيسة'> <item title='الصفحة الرئيسة' itemuri='tcm:8-29-4' ShowInNav='True' type='sg' pageuri='tcm:8-10592-64' sLink='/ara/index.aspx'> <item title='من نحن' itemuri='tcm:8-779-4' ShowInNav='True' type='sg' pageuri='tcm:8-9934-64' navorder='00500' sLink='/ara/about/index.aspx'> </item> <item title='برامجنا' itemuri='tcm:8-817-4' ShowInNav='True' type='sg' pageuri='tcm:8-10112-64' navorder='00100' sLink='/ara/courses/language-study-abroad.aspx'> </item> <item title='مدارسنا' itemuri='tcm:8-824-4' ShowInNav='True' type='sg' pageuri='tcm:8-10162-64' navorder='00300' sLink='/ara/schools/english-language.aspx'> </item> </item> </root>
Now I want to the value of maximum navorder, so that I can use that value further in ‘if‘ condition.
Below is the XSLT 1.0 code of two possible solutions.
A third solution is to use EXSLT.
A fourth solution is to use the
maximumtemplate of FXSL.When the above transformatio is applied on the original XML document:
the wanted result is produced: