|
Subject: RE: [xsl] Illegal attribute name From: Jarno.Elovirta@xxxxxxxxx Date: Thu, 3 Jan 2002 08:57:51 +0200 |
Hi,
> I use the template .
> <xsl:template match="/test/T">
> <xsl:element name="{@fldname}">
> <xsl:apply-templates />
> <xsl:value-of select="@reserve2"/>
> </xsl:element>
> </xsl:template>
>
> It gives illegal attribute name when I am using a number as
> the 'fldname' value.
> If its an alphabet it works fine.what is the work around?
An element name must be a QName--see
<http://www.w3.org/TR/xslt#section-Creating-Elements-with-xsl:element>. If
you really want to generate looks-like-XML-but-isn't output, you could
generate the elements e.g. with name="x-{@fldname}" and then write your own
serializer to remove the "x-".
Cheers,
Santtu
XSL-List info and archive: http://www.mulberrytech.com/xsl/xsl-list
| Current Thread |
|---|
|
| <- Previous | Index | Next -> |
|---|---|---|
| RE: [xsl] Illegal attribute name, Michael Kay | Thread | [xsl] Re: Re: Re: Assignment no, dy, Dimitre Novatchev |
| RE: [xsl] Element - centric output, Jarno . Elovirta | Date | [xsl] Re: Re: Re: Assignment no, dy, Dimitre Novatchev |
| Month |