I just started working with XSLT, so this question might be obvios for some; i'm struggling trying to concatenate 2 tags inside the same node. I will be receiving one XML file and my output is another XML file.
This is a sample of the xml i will be receiving:
Expand|Select|Wrap|Line Numbers
- <EquipmentList>
- <EquipmentDetail>
- <AssetSupplierName>Dealer 1</AssetSupplierName>
- <Quantity>1</Quantity>
- <Specification>Asset 1</Specification>
- </EquipmentDetail>
- <EquipmentDetail>
- <AssetSupplierName>Dealer 2</AssetSupplierName>
- <Quantity>1</Quantity>
- <Specification>Asset 2</Specification>
- </EquipmentDetail>
- <EquipmentDetail>
- <AssetSupplierName>Dealer 3</AssetSupplierName>
- <Quantity>1</Quantity>
- <Specification>Asset 3</Specification>
- </EquipmentDetail>
- <EquipmentList>
Expand|Select|Wrap|Line Numbers
- <xsl:template match="//Specification">
- <xsl:copy>
- <xsl:copy-of select="concat(., ' ', //EquipmentDetail/AssetSupplierName)"/>
- </xsl:copy>
- </xsl:template>
Asset 1 Dealer 1
Asset 2 Dealer 1
Asset 3 Dealer 1
when im really expecting
Asset 1 Dealer 1
Asset 2 Dealer 2
Asset 3 Dealer 3
I have tried putting the same code above inside a for-each and i get the same results...
Thanks in advance!