Is it possible to write xml within an xml element using XSLT.
Since im already within an element im unable to use match template function. I am trying to use xsl copy of but it results in the following error
an item of type 'element' cannot be constructed within a node of type 'attribute'
XML Format pre Transformation
<Results>
<Locations>
<Location>
<xyz>asa</xyz>
<extended>
<abc>blah</abc>
</extended>
<another>
<abc>blah</abc>
</another>
</Location>
<Location>
<xyz>asa</xyz>
<extended>
<abc>blah</abc>
</extended>
<another>
<abc>blah</abc>
</another>
</Location>
</Locations>
</Results>
** Desired XML Format After Transformation**
<TransactionResponse ResponseType="Location_Query_Response1">
<ParsedData Name="MessageData" Value="




*******************************Location*******"/>
<Location>
<xyz>asa</xyz>
<extended>
<abc>blah</abc>
</extended>
<another>
<abc>blah</abc>
</another>
</Location>
<Location>
<xyz>asa</xyz>
<extended>
<abc>blah</abc>
</extended>
<another>
<abc>blah</abc>
</another>
</Location>
</TransactionResponse>
XSLT
<xsl:template match="/">
<xsl:element name="TransactionResponse">
<xsl:element name="Data">
<xsl:element name="ParsedData">
this piece works
</xsl:element>
<xsl:for-each select="Locations/Location/*>
<xsl:copy-of select="Location"/>
</xsl:for-each>
</xsl:element>
</xsl:element>