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]
Other format: [Raw text]

Re: space-after/space-before


For a correct output you shouldn't put a empty line before and after G-rows,
but after G-rows and after the last of the D-rows according to one group. So
after your </xsl:otherwise> you need a test, whether the next row is of type
G or D:

<xsl:if test="following-sibling::table-row[1]/@type='G'">
     <!-- add a empty line here -->
</xsl:if>

Hope this helps,

Joerg

> My xml is as follows:
> 
> 	<table-row type="G">
> 		<row-title lang="EN">AFRICA</row-title>
> 		<row-value>  ....</row-value>
> 		<row-symb>F </row-symb>
>             <row-value>  ....</row-value>
>              ...
> 	</table-row>
> 	<table-row type="D">
> 		<row-title lang="EN">ALGERIA</row-title>
> 		<row-value>  ....</row-value>
> 			etc..
> 	</table-row>
>       <table-row type="D">
> 		<row-title lang="EN">BURKINO FASO</row-title>
> 		<row-value>  ....</row-value>
> 		<row-symb> </row-symb>
> 		etc ..
> 	</table-row>
>       <table-row type="G">
> 	   <row-title lang="EN">N AMERICA</:row-title>
> 	   <row-value>  ....</row-value>
> 	   <row-symb> </row-symb>
> 		 etc..
> 	</table-row>
>                etc..
> 
> 
> My xsl:
> .....
>  <xsl:when test="./@type='G'">
>     <fo:table-row>
>        <fo:table-cell>
>           <fo:block text-align="start">
>             <xsl:value-of select="./row-title"/>
>           </fo:block>
>        </fo:table-cell>
>       <xsl:for-each select="./row-value">
>        <fo:table-cell>
>            <fo:block text-align="center" space-after.optimum="10pt">
>             <xsl:value-of select="."/>
>              <xsl:value-of select="following-sibling::row-symb"/>
>           </fo:block>
>        </fo:table-cell>
>       </xsl:for-each>
>     </fo:table-row>
>     </xsl:when>
>     <xsl:otherwise>
>      <fo:table-row>
>        <fo:table-cell>
>           <fo:block text-align="start">
>             <xsl:value-of select="./row-title"/>
>           </fo:block>
>        </fo:table-cell>
>       <xsl:for-each select="./row-value">
>        <fo:table-cell>
>            <fo:block text-align="center">
>             <xsl:value-of select="."/>
>              <xsl:value-of select="following-sibling::row-symb"/>
>           </fo:block>
>        </fo:table-cell>
>       </xsl:for-each>
>     </fo:table-row>
>     </xsl:otherwise>
>   ....
> -------------------------------------
> Output:
> AFRICA
> 
> ALGERIA
> BURKINO FASO
> N.AMERICA
> ------------------------------------
> Desired Output:
> AFRICA
> 
> ALGERIA
> BURKINO FASO
> 
> N.AMERICA
> ---------------------------------------
> That is a space after and before those rows of type="G". Any suggestions?
> -
> so far I have the after but not the before.
> 
> Thanks.
> 
> Tanz

-- 
GMX - Die Kommunikationsplattform im Internet.
http://www.gmx.net


 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]