Loading ...
Sorry, an error occurred while loading the content.

Xsl fo-White Space Problem - At end Why ????

Expand Messages
  • sguy_chennai
    Explanation of the content : 1) My xml will be like data .........like this it has many
    Message 1 of 1 , Nov 28, 2003
    • 0 Attachment
      Explanation of the content :

      1) My xml will be like

      <Mobile>
      <connection><south><region> data </region></south></connection>
      .........like this it has many connection child with same tags
      <connection><north><region> data </region></north></connection>
      .........like this it has many connection child with these tags
      </mobile>

      2) first i retrieve some of the second tags i.e some of the childs of
      mobile relating to the tags
      <connection><north><region> data</region></north></connection>
      ....some

      3) second i will retrieve all the tags of first tags i.e all the
      childs of mobile relating to the tags
      <connection><south><region>data</region></south></connection
      ...all

      4) third i will retrieve the all the tags which were left in the
      first tags..i.e remaining tags of

      <connection><north><region> data </region></north></connection>


      Explanation of the problem :

      1) i don't have problem till the third step.i have problem when i
      come to the fourth step.
      2) I checked with the xml data.the data is correct but the alignment
      is not coming properly from the
      fourth step.
      3) It gives more space then actually specified for all the fourth
      tags.
      4) i have used CDATA in the xml so my output is correct throughout
      the third step..i don't know from fourth
      5) it gives more space for all the fourth tags after the third tags.

      Example:

      Expected Output

      WEB DESIGN ENVIRONMENT

      Ouput Coming WEB DESIGN
      ENVIRONMENT

      my xsl is :

      <fo:table-body>
      <xsl:for-each select= 'MOBILE/CONNECTION/SOUTH//REGION'>
      <fo:table-row text-align="left" font-family="Courier New, Courier"
      font-size="8pt" line-height="15pt">
      <fo:table-cell number-columns-spanned="7">
      <xsl:choose>
      <xsl:when test="position()!=last()">
      <fo:block text-align="left" white-space-collapse="false"><xsl:value-
      of select="."/></fo:block>
      </xsl:when>
      <xsl:otherwise>
      <fo:block space-after.optimum="2pt" text-align="left" white-space-
      collapse="false"><xsl:value-of select="."/></fo:block>
      </xsl:otherwise>
      </xsl:choose>
      </fo:table-cell>
      </fo:table-row>
      </xsl:for-each>
      </fo:table-body>
      </fo:table>
      <xsl:for-each select= 'MOBILE/CONNECTION/SOUTH//REGION'>
      <xsl:if test="position()=last()">
      <xsl:for-each select="../../following::*[NORTH]">
      <fo:block text-align="left" font-family="Courier New, Courier" font-
      size="8pt" white-space-collapse="false" font-weight="bold"><xsl:value-
      of select="."/></fo:block>
      </xsl:for-each>
      </xsl:if>
      </xsl:for-each>
    Your message has been successfully submitted and would be delivered to recipients shortly.