creamcitian
MIS
I am trying to use XSL to transform an XML element's attribute and value, however the attribute is always different but always in the same place (it is the fifth attribute in the element). Is there a way to display this attribute and its value knowing its place (5th attribute) but not its name? Unfortunately I have no control over the XML I am working with.
Exmaple:
<CustomIndicator targetCategory="3" targetClassification="1" targetNumber="4">
<Source category="39" classification="-1" number="2" />
<Combine target="A" type="OneToOne" sourceCount="1" sourceCount1="CL-1CA39N2" CL-1CA39N2="S" />
<Combine target="U" type="OneToOne" sourceCount="1" sourceCount1="CL-1CA39N2" CL-1CA39N2="U" />
<Combine target="N" type="OneToOne" sourceCount="1" sourceCount1="CL-1CA39N2" CL-1CA39N2="N" />
</CustomIndicator>
<CustomIndicator targetCategory="3" targetClassification="1" targetNumber="5">
<Source category="79" classification="-1" number="3" />
<Combine target="Y" type="OneToOne" sourceCount="1" sourceCount1="CL-1CA79N3" CL-1CA79N3="Y" />
<Combine target="M" type="OneToOne" sourceCount="1" sourceCount1="CL-1CA79N3" CL-1CA79N3="X" />
<Combine target="H" type="OneToOne" sourceCount="1" sourceCount1="CL-1CA79N3" CL-1CA79N3="N" />
<Combine target="H" type="OneToOne" sourceCount="1" sourceCount1="CL-1CA79N3" CL-1CA79N3="E" />
</CustomIndicator>
<CustomIndicator targetCategory="11" targetClassification="1" targetNumber="2">
<Source category="39" classification="-1" number="13" />
<Combine target="D" type="OneToOne" sourceCount="1" sourceCount1="CL-1CA39N13" CL-1CA39N13="D" />
<Combine target="E" type="OneToOne" sourceCount="1" sourceCount1="CL-1CA39N13" CL-1CA39N13="E" />
<Combine target="N" type="OneToOne" sourceCount="1" sourceCount1="CL-1CA39N13" CL-1CA39N13="M" />
<Combine target="O" type="OneToOne" sourceCount="1" sourceCount1="CL-1CA39N13" CL-1CA39N13="N" />
</CustomIndicator>
The attribute is the 5th attribute of the Combine element.
Thanks in advance for any help!
Exmaple:
<CustomIndicator targetCategory="3" targetClassification="1" targetNumber="4">
<Source category="39" classification="-1" number="2" />
<Combine target="A" type="OneToOne" sourceCount="1" sourceCount1="CL-1CA39N2" CL-1CA39N2="S" />
<Combine target="U" type="OneToOne" sourceCount="1" sourceCount1="CL-1CA39N2" CL-1CA39N2="U" />
<Combine target="N" type="OneToOne" sourceCount="1" sourceCount1="CL-1CA39N2" CL-1CA39N2="N" />
</CustomIndicator>
<CustomIndicator targetCategory="3" targetClassification="1" targetNumber="5">
<Source category="79" classification="-1" number="3" />
<Combine target="Y" type="OneToOne" sourceCount="1" sourceCount1="CL-1CA79N3" CL-1CA79N3="Y" />
<Combine target="M" type="OneToOne" sourceCount="1" sourceCount1="CL-1CA79N3" CL-1CA79N3="X" />
<Combine target="H" type="OneToOne" sourceCount="1" sourceCount1="CL-1CA79N3" CL-1CA79N3="N" />
<Combine target="H" type="OneToOne" sourceCount="1" sourceCount1="CL-1CA79N3" CL-1CA79N3="E" />
</CustomIndicator>
<CustomIndicator targetCategory="11" targetClassification="1" targetNumber="2">
<Source category="39" classification="-1" number="13" />
<Combine target="D" type="OneToOne" sourceCount="1" sourceCount1="CL-1CA39N13" CL-1CA39N13="D" />
<Combine target="E" type="OneToOne" sourceCount="1" sourceCount1="CL-1CA39N13" CL-1CA39N13="E" />
<Combine target="N" type="OneToOne" sourceCount="1" sourceCount1="CL-1CA39N13" CL-1CA39N13="M" />
<Combine target="O" type="OneToOne" sourceCount="1" sourceCount1="CL-1CA39N13" CL-1CA39N13="N" />
</CustomIndicator>
The attribute is the 5th attribute of the Combine element.
Thanks in advance for any help!