This is the mail archive of the
xsl-list@mulberrytech.com
mailing list .
Re: That didnt work either! RE: How to add a "less than" or "greater than" sign?
- To: xsl-list at mulberrytech dot com
- Subject: Re: That didnt work either! RE: How to add a "less than" or "greater than" sign?
- From: "John E. Simpson" <simpson at polaris dot net>
- Date: Wed, 12 Apr 2000 19:49:15 -0400
- References: <01BA10F0CD20D3119B2400805FD40F9F278851@MDYNYCMSX1>
- Reply-To: xsl-list at mulberrytech dot com
At 05:47 PM 04/12/2000 -0500, Moazzam Ahmed wrote:
>couple of you suggested the following. But that returns this :
>
><{@Type}>myvalue</@Type>
Bob duCharme's solution:
<xsl:element name="{@Type}">myvalue</xsl:element>
does indeed work with XT and with Saxon.
The sample I just ran used this XML:
<?xml version="1.0"?>
<?xml:stylesheet type="text/xsl" href="demo1.xsl" ?>
<root>
<subelem Type="ATAG"/>
</root>
and this XSLT:
<xsl:stylesheet version="1.0"
xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
<xsl:template match="subelem">
<xsl:element name="{@Type}">myvalue</xsl:element>
</xsl:template>
</xsl:stylesheet>
What XSLT processor are you using? (That is *always* crucial information to
provide.)
(Btw, my own "solution," posted shortly before Bob's, matched his except
for the curly braces around the attribute reference, which are required;
without them you do indeed get start and end tags <@Type> and </@Type>,
respectively.)
================================================================
John E. Simpson | "After they make styrofoam, what do
http://www.flixml.org | they ship it in?" (Steven Wright)
simpson@polaris.net |
XSL-List info and archive: http://www.mulberrytech.com/xsl/xsl-list