| Subject: [xsl] Replace blank rows From: "Kim Tran" <tav1210@xxxxxxxxxxx> Date: Mon, 07 Apr 2003 14:11:17 -0700 | 
My xml is as follows: <row> <column name="firstname">K1</column> <column name="lastname">L1</column </row> <row> --> Empty Row contains empty cells <column name="firstname></column> --> These should be replaced by <column name="lastname></column> --> "K1" and "L1" from prev. row. </row> <row> --> Empty row again. <column name="firstname></column> <column name="lastname></column> </row> ....
<?xml version="1.0" encoding="utf-8"?> <xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
 <xsl:choose>
   <xsl:when test="$STR != ''">
     <xsl:copy-of select="."/>
   </xsl:when>
   <xsl:when test="$STR = '' and position() > 0 and $fillCell = 'Y'">
     <xsl:variable name="pos" select="position() -1"/>
        <xsl:copy-of select="//Document/row[$pos]"/>
   </xsl:when>
 </xsl:choose></xsl:for-each> </Document>
<xsl:template match="text()" mode="row"> <xsl:value-of select="."/> </xsl:template>
| Current Thread | 
|---|
| 
 | 
| <- Previous | Index | Next -> | 
|---|---|---|
| RE: [xsl] Strip space in Sablotron , Avula, Raj | Thread | RE: [xsl] Replace blank rows, Lars Huttar | 
| Re: [xsl] Template matching similia, Vasu Chakkera | Date | Re: [xsl] "--" question, bix xslt | 
| Month |