Three question which is not yet answered clearly and correct so far !! challenging question in xsl a

Discussion in 'XML' started by Philip Meyer, Nov 30, 2003.

  1. Philip Meyer

    Philip Meyer Guest

    1) setting image as Background with alignment in center not
    working..help

    Explanation :

    i need to set a image as background and also it should be
    dispalyed in the center.i am using apache fop 0.25
    Problem :
    i am using apache fop 0.25 and i used the below to set a gif as
    background and alignment to be center...
    <fo:block background-image="c:\sample.gif" background-repeat="no-
    repeat" text-align="center" display-align="center">
    i tried with all the possiblities of setting image as background in
    the center...
    please tell me solution how to make or set image as background and
    also to be displayed in the center at the back of the data.

    2) Xsl fo-White Space Problem - At end Why ????
    Explanation of the content :
    a) 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>
    b) 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
    c) 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
    d) 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:eek:therwise>
    <fo:block space-after.optimum="2pt" text-align="left" white-space-
    collapse="false"><xsl:value-of select="."/></fo:block>
    </xsl:eek:therwise>
    </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>

    i think that the problem with the xsl query ...as when we do
    xsl:for-each it will defaultely creates a white space at the end...so
    is there is any way to check the position of the
    'MOBILE/CONNECTION/SOUTH//REGION' without using the xsl:for-each...

    3) i was trying to use the arial font in xsl fo ..i am using apache
    fop
    0.25 when i use font-family="Arial" an error is coming
    [ERROR] unknown font Arial,normal,bold so defaulted font to any
    when i use font-family="Arial Unicode MS, sans-serif"
    it is working...i also have all fonts installed in my system..
    what are the fonts it will support..please tell me the name of the
    font correctly that has to be applied in font-family=" "...i need to
    use Arial font..please tell me the solution to this
    i want to use "Arial" font please help me....

    please send me the solution to my mail id
    ....as soon as possible..

    Thanks in Advance

    Philip
     
    Philip Meyer, Nov 30, 2003
    #1
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Replies:
    1
    Views:
    3,636
    A. Bolmarcich
    May 27, 2005
  2. Andy Dingley
    Replies:
    45
    Views:
    1,677
    Andy Mabbett
    Jun 11, 2006
  3. Kenneth McDonald
    Replies:
    1
    Views:
    339
    David Boddie
    Apr 5, 2004
  4. RC
    Replies:
    2
    Views:
    454
    Chase Preuninger
    Jan 8, 2008
  5. Lozaketh
    Replies:
    0
    Views:
    527
    Lozaketh
    Jun 25, 2009
Loading...

Share This Page