I'm transforming one xml document to another using a stylesheet.
1.) I would like to know how to include an attribute with a value in a tag, eg. how do I transform
<tag1>hey</tag1> to
<tag1 value1 ="1" value2="text">h ey</tag1>
2.)the root tag of the xml document i'm transforming has an attribute.how do I instruct the XSL to retrieve data from a child of this tag using <xsl:template > element and/or <xsl:apply-templates>?
Any ideas would be much appreciated. Thanks y'all!
1.) I would like to know how to include an attribute with a value in a tag, eg. how do I transform
<tag1>hey</tag1> to
<tag1 value1 ="1" value2="text">h ey</tag1>
2.)the root tag of the xml document i'm transforming has an attribute.how do I instruct the XSL to retrieve data from a child of this tag using <xsl:template > element and/or <xsl:apply-templates>?
Any ideas would be much appreciated. Thanks y'all!
Comment