XSL - Display of matching element values in same <tr>

webmasterbeta

New Member
I have an XML which will contain some matching element values. The XML is generated from two different physical files.

The XML generated will be like below:
<View>
<Attributes identity="CPS_FILE_ONE">
<Attribute>
<AttributeID>1089</AttributeID>
<AttributeName>driplatform</AttributeName>
<AttributeAlias>DRI Platform</AttributeAlias>
</Attribute>
<Attribute>
<AttributeID>1199</AttributeID>
<AttributeName>brand</AttributeName>
<AttributeAlias>Vehicle Brand</AttributeAlias>
</Attribute>
</Attributes>
<Attributes identity="CPS_FILE_TWO">
<Attribute>
<AttributeID>1086</AttributeID>
<AttributeName>drimodrange</AttributeName>
<AttributeAlias>DRI Model Range</AttributeAlias>
</Attribute>
<Attribute>
<Attribute>
<AttributeID>1199</AttributeID>
<AttributeName>brand</AttributeName>
<AttributeAlias>Vehicle Brand</AttributeAlias>
</Attribute>
</Attributes>
</View>

The <AttributeID> has the matching value as 1199 .
The two different <Attributes> set is differentiated using the identity attribute having values as "CPS_FILE_ONE" and "CPS_FILE_TWO" respectively.

In the XSL, I have a table with rows that contains three <td> cells, and the first<td> contains the serial number. The consecutive <td>'s should display the <AttributeName> and <AttributeAlias> in the same row if the <AttributeID> matches in the <Attributes> set.

Please help.

Thanks in advance
John Bright. J
 
Back
Top