There is xml. I create an Html page from it.
<price> <period cost="1000.0000" type="3" typename="year" length="1">1 год</period> <period cost="99.0000" type="1" typename="month" length="1">1 месяц</period> <period cost="250.0000" type="1" typename="month" length="3">3 месяца</period> <period cost="500.0000" type="1" typename="month" length="6">6 месяцев</period> <period cost="14990.0000" type="0" typename="day" length="" >Бессрочная лицензия</period> </price> How to organize sorting for a cycle so that the node goes first 1 month, 2 months ... 1 year .., Perpetual license ?
<xsl:for-each select="price/period"> <xsl:sort select="???"/> <!--мои действия с нодом --> </xsl:for-each> you need to somehow organize the sort function with the condition of something like
mnemonic
if type = 1 then return length * 30 if type = 3 then return length * 365 if type = 0 then return 1000000