|
[XSL-LIST Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message] Re: dynamic font
It starts with
<xsl:stylesheet xmlns:xsl="http://www.w3.org/TR/WD-xsl">
my xml structure is like that :
<TD2><TEXT COLOR="red">text 2_1</TEXT></TD2>
I want to format text 2_1 with font color="red"
----- Original Message -----
From: "David Carlisle" <davidc@xxxxxxxxx>
To: <xsl-list@xxxxxxxxxxxxxxxxxxxxxx>
Sent: Thursday, January 25, 2001 2:18 PM
Subject: Re: dynamic font
>
> > "{$xxx}" does not work. ?
> It's a bit hard to tell due to other errors but one possible reason for
> the {} syntax not working is that you are not using an implementation
> of XSLT, but rather the completely different language implemented in IE5
> (unless you have upgraded to MSXML3).
>
> Does your stylesheet start
>
>
> <xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
> version="1.0"
> >
>
>
> Assuming you _are_ using XSLT then:
>
>
> <xsl:for-each select="TEXT">
> <input type="submit" name="Sil" value="Sil"> </input>
>
> <xsl:attribute name = "xxx" ><xsl:value-of
> select="@COLOR"/></xsl:attribute>
>
> xsl:attribute has creates an attribute node. This can only be added to
> the result tree immediately after you have opened an element node.
> You have it _after_ </input> you want it before.
>
> </xsl:for-each>
> <font color={$xxx}>
>
> This would be OK if the variable xxx was defined anywhere, you don't
> say if it is. You could use something like color="{TEXT/@COLOR}"
> if that is the right XPath to the attribute value you need (Guessing
> from the way you'd constructed the for-each)
>
>
>
>
> David
>
> XSL-List info and archive: http://www.mulberrytech.com/xsl/xsl-list
>
XSL-List info and archive: http://www.mulberrytech.com/xsl/xsl-list
|
PURCHASE STYLUS STUDIO ONLINE TODAY!Purchasing Stylus Studio from our online shop is Easy, Secure and Value Priced! Download The World's Best XML IDE!Accelerate XML development with our award-winning XML IDE - Download a free trial today! Subscribe in XML format
|

Cart








