[xsl] Detecting precedence of string content in XSLT 1.0

Subject: [xsl] Detecting precedence of string content in XSLT 1.0
From: Harry Liljeström <harry.liljestrom@xxxxxxxxxxxxx>
Date: Thu, 21 Dec 2006 09:55:49 +0200 (EET)
Hi,

I have following input:
<fw-rule-order>
  fw_rule3
  fw_rule1
  fw_rule2
</fw-rule-order>

and the desired output:
<rule name="fw_rule3" precedence="0"/>
<rule name="fw_rule1" precedence="1"/>
<rule name="fw_rule2" precedence="2"/>

Could someone give me any hints how this could be solved in XSLT 1.0?

Thanks,

Harry Liljestrvm

Current Thread