This is the mail archive of the
xsl-list@mulberrytech.com
mailing list .
RE: Using an XSLT value as a HTML parameter
- To: <xsl-list at lists dot mulberrytech dot com>
- Subject: RE: [xsl] Using an XSLT value as a HTML parameter
- From: "Carlos Fragoso Mariscal" <cfragoso at terra dot es>
- Date: Sat, 15 Sep 2001 19:10:20 +0200
- Reply-To: xsl-list at lists dot mulberrytech dot com
You can define an element name and
then attributes that are nodes of the
origin xml file.
Something like this
<xsl:template match="text">
<xsl:element name="font">
<xsl:attribute name="@format">
<xsl:value-of select="@value"/>
</xsl:attribe>
</xsl:element>
</xsl:template>
I don't know if @format goes with {} or not,
have a try.
I hope it helps you.
--------
Carlos Fragoso Mariscal
<cfragoso@terra.es>
-----Mensaje original-----
De: owner-xsl-list@lists.mulberrytech.com
[mailto:owner-xsl-list@lists.mulberrytech.com]En nombre de J.Brown
(Ender/Amigo)
Enviado el: viernes, 14 de septiembre de 2001 6:38
Para: xsl-list@lists.mulberrytech.com
Asunto: [xsl] Using an XSLT value as a HTML parameter
Hey all.
I'm trying to do something similar to this:
(xml)
<text format="color" value="#113344">
(/xml)
(xsl)
<xsl:template match="text">
<font "{./@format}"="{./@value}">
<xsl:apply-templates/>
</font>
</xsl:template>
(/xsl)
Alternativly a way to simply say <text color="#1111111"> without having to
put in a large number of ifs (as the color tag may be something different)
would be neat :)
TIA!
- Ender
XSL-List info and archive: http://www.mulberrytech.com/xsl/xsl-list
XSL-List info and archive: http://www.mulberrytech.com/xsl/xsl-list