[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: "Barry van Weldam" <barry@xxxxxxx>
Date: Thu, 13 Nov 2003 12:34:32 +0100

also tried:

 <xsl:template match="Row/*">
 
     <fo:table-cell border="solid black 1 px" border-collapse="collapse" padding-right="5px" padding-top="3px">
      <xsl:when test="Row/Column_01[not(.='Total')]">
         <fo:block>
         <xsl:value-of select="node()[not(.='null')]"/>
         </fo:block> 
      </xsl:when>
      <!-- if column-01 is Total diff format -->
     <xsl:otherwise>
         <fo:block font-weight="bold">
         <xsl:value-of select="node()[not(.='null')]"/>
         </fo:block> 
     </xsl:otherwise>
     </fo:table-cell>
  

 </xsl:template>

no succes.

Just posting for other noobs, that this isn't the way to go;)


----- Original Message ----- 
From: "Barry van Weldam" <barry@xxxxxxx>
To: <xsl-list@xxxxxxxxxxxxxxxxxxxxxx>
Sent: Thursday, November 13, 2003 12:00 PM
Subject: [xsl] Node test--> text -->different format 


Hi there,

First apoligize for my many questions.

Oke this is what i have working:

 <!--Here i use a tmpl for each cell -->
 <xsl:template match="Row/*">
     <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>

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"]'>
     <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:when>
<!-- if column-01 is Total diff format -->
  <xsl:otherwise>
   <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:otherwise>
 </xsl:template>

and also tried

 <!--Here i use a tmpl for each cell -->
 <xsl:template match="Row/Column_01[not(='Total']">
     <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"]">
     <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>

Enlight me!



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



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



Current Thread
Keywords