This is the mail archive of the
xsl-list@mulberrytech.com
mailing list .
xsl:element question
- To: xsl-list at lists dot mulberrytech dot com
- Subject: [xsl] xsl:element question
- From: mjyoungblut at mmm dot com
- Date: Mon, 5 Mar 2001 12:10:35 -0600
- Reply-To: xsl-list at lists dot mulberrytech dot com
I have a series of elements that I want to add an attribute to. So I want
to call a template that will work on any element, and add the attribute to
that element. The problem that I am having is having a generic template do
this because I am not able to name the element. I am trying to do this:
<xsl:element name="name( )"> or <xsl:element name="$THIS_ELEMENTS_NAME">
<xsl:copy-of select="@*"/>
<xsl:attribute name="Action"><xsl:value-of select
="$ACTION"/></xsl:attribute>
<xsl:value-of select="."/>
</xsl:element>
I get a recoverable error at the first line, but an error after that
because I have an empty element. Is there a way to solve this problem?
Thanks in advance,
Matt Youngblut
XSL-List info and archive: http://www.mulberrytech.com/xsl/xsl-list