Subject:XML Attribute Element output from XSLT Author:Rick Scofield Date:31 Aug 2011 08:28 PM
I'm sure a very simple solution exists for for this...but it escapes me. I have a input file transformation that looks like this:
-root
--row
---season
---style
---color
my output file needs to look like this:
<Provision>
<Store code="XYZ">
<InventoryProductSettings_Update product_code="A02_BLK_OFA">
<TrackInventory>Yes</TrackInventory>
...more tags...etc
</InventoryProductSettings_Update>
</Store>
</Provision>
where the attribute element 'product_code' needs the value of 'style' from the input file. Not sure how to out the value of 'style' within the XML node/tag
The XSLT starts out like:
<xsl:for-each select="root/row">
<InventoryProductSettings_Update product_code= value="style">
<row>
...
</xsl:for-each>