[XSL-LIST Mailing List Archive Home]
[By Thread]
[By Date]
RE: [xsl] Node test--> text -->different format
Subject: RE: [xsl] Node test--> text -->different format From: "Andreas L. Delmelle" <a_l.delmelle@xxxxxxxxxx> Date: Thu, 13 Nov 2003 12:22:32 +0100 |
> -----Original Message----- > From: Barry van Weldam > > Now i just want to test if Row/Column_01 has a value of "Total" > and if so i want to format the text bold. > > Tried the following: > > <!--Here i use a tmpl for each cell --> > <xsl:template match="Row/*"> > <xsl:when test='Row/Column_01[.!="Total"]'> Ouch! You are testing on a Row child of the Row element here, forgetting the enclosing xsl:choose and using square brackets where none are needed Try your code below again but ... > > <!--Here i use a tmpl for each cell --> > <xsl:template match="Row/Column_01[not(='Total']"> ^^^ put a . before = > <fo:table-cell border="solid black 1 px" > border-collapse="collapse" padding-right="5px" padding-top="3px"> > <fo:block> > <xsl:value-of select="node()[not(.='null')]"/> > </fo:block> > </fo:table-cell> > </xsl:template> > <!-- if column-01 is Total diff format --> > <xsl:template match="Row/Column_01[.="Total"]"> ^^^ ^^^ use single quotes here > <fo:table-cell border="solid black 1 px" > border-collapse="collapse" padding-right="5px" padding-top="3px"> > <fo:block font-weight="bold"> > <xsl:value-of select="node()[not(.='null')]"/> > </fo:block> > </fo:table-cell> > </xsl:template> > Cheerz, Andreas XSL-List info and archive: http://www.mulberrytech.com/xsl/xsl-list
Current Thread |
---|
|
<- Previous | Index | Next -> |
---|---|---|
[xsl] Node test--> text -->differen, Barry van Weldam | Thread | Re: [xsl] Node test--> text -->diff, Barry van Weldam |
Re: [xsl] simple question: <fo: and, Barry van Weldam | Date | Re: [xsl] empty elements to filled , James Cummings |
Month |
Keywords