Skip to Content

Archived discussions are read-only. Learn more about SAP Q&A

xsl:element: generate name of element dynamic

Hi everybody,

in the target structure I have to create elements dynamically.

But this does not work:

	<xsl:template name="process-message">
		<!-- params: pattern, role -->
		<xsl:variable name="ELEMENTNAME">
		<xsl:value-of select="anyNode"/>
		<xsl:element name="($ELEMENTNAME)"> // HERE IS THE ERROR
			<xsl:apply-templates mode="text"/>

Any ideas?

Regards Mario

Former Member
Not what you were looking for? View more on this topic or Ask a question