[XSL-LIST Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message]

Re: That didnt work either! RE: How to add a "less than" or

Subject: Re: That didnt work either! RE: How to add a "less than" or "greater than" sign?
From: "John E. Simpson" <simpson@xxxxxxxxxxx>
Date: Wed, 12 Apr 2000 19:49:15 -0400
add less than to xml
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@xxxxxxxxxxx      |


XSL-List info and archive: http://www.mulberrytech.com/xsl/xsl-list



Current Thread

PURCHASE STYLUS STUDIO ONLINE TODAY!

Purchasing Stylus Studio from our online shop is Easy, Secure and Value Priced!

Buy Stylus Studio Now

Download The World's Best XML IDE!

Accelerate XML development with our award-winning XML IDE - Download a free trial today!

Don't miss another message! Subscribe to this list today.
Email
First Name
Last Name
Company
Subscribe in XML format
RSS 2.0
Atom 0.3
Site Map | Privacy Policy | Terms of Use | Trademarks
Free Stylus Studio XML Training:
W3C Member
Stylus Studio® and DataDirect XQuery ™are products from DataDirect Technologies, is a registered trademark of Progress Software Corporation, in the U.S. and other countries. © 2004-2013 All Rights Reserved.