This is the mail archive of the xsl-list@mulberrytech.com mailing list .


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

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@nag.co.uk>
To: <xsl-list@lists.mulberrytech.com>
Sent: Thursday, January 25, 2001 2:18 PM
Subject: Re: [xsl] 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


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]