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

break line

Expand Messages
  • hero_venus
    Hi, I am working on an application, which transforms XML to PDF. Sometimes the content of a block is larger then the cell of the table. The content is a string
    Message 1 of 7 , Mar 21 6:02 AM
    • 0 Attachment
      Hi,

      I am working on an application, which transforms XML to PDF.
      Sometimes the content of a block is larger then the cell of the table.
      The content is a string without blanks (D=X1KZ4F01234566K*E=5436K). I
      tried to use hyphenation, but it doesn't work (I think because the
      content has no syllables).
      Is there something in SXL-FO, that works similar with <br> in HTML ?

      I hope, someone can help me.

      Heidi
    • G. Ken Holman
      ... - because this breaks the flow in the block progression direction, but adds a block of zero height so as to not introduce any space. If you want
      Message 2 of 7 , Mar 21 6:10 AM
      • 0 Attachment
        At 2003-03-21 14:02 +0000, hero_venus wrote:
        >I am working on an application, which transforms XML to PDF.
        >Sometimes the content of a block is larger then the cell of the table.
        >The content is a string without blanks (D=X1KZ4F01234566K*E=5436K). I
        >tried to use hyphenation, but it doesn't work (I think because the
        >content has no syllables).
        >Is there something in SXL-FO, that works similar with <br> in HTML ?

        <block/> - because this breaks the flow in the block progression
        direction, but adds a block of zero height so as to not introduce any space.

        If you want a *conditional* break, such that it only breaks if it doesn't
        fit in the cell but will not break if it does fit in the cell (I need this
        when displaying long subdirectory path names), you can inject a zero-width
        space ​ instead into the text where you need the conditional break
        to happen.

        I hope this helps.

        .............. Ken


        --
        Upcoming hands-on in-depth XSLT/XPath and/or XSL-FO
        North America: June 16-20, 2003

        G. Ken Holman mailto:gkholman@...
        Crane Softwrights Ltd. http://www.CraneSoftwrights.com/f/
        Box 266, Kars, Ontario CANADA K0A-2E0 +1(613)489-0999 (F:-0995)
        ISBN 0-13-065196-6 Definitive XSLT and XPath
        ISBN 0-13-140374-5 Definitive XSL-FO
        ISBN 1-894049-08-X Practical Transformation Using XSLT and XPath
        ISBN 1-894049-10-1 Practical Formatting Using XSL-FO
        Male Breast Cancer Awareness http://www.CraneSoftwrights.com/f/bc
      • smita thomas
        Try using hyphenate= true in as an attribute and also language= en .It should work. Thanks, Smita ...
        Message 3 of 7 , Mar 21 12:23 PM
        • 0 Attachment
          Try using hyphenate="true" in <fo:block> as an
          attribute and also language="en".It should work.
          Thanks,
          Smita
          --- "G. Ken Holman" <gkholman@...>
          wrote:
          > At 2003-03-21 14:02 +0000, hero_venus wrote:
          > >I am working on an application, which transforms
          > XML to PDF.
          > >Sometimes the content of a block is larger then the
          > cell of the table.
          > >The content is a string without blanks
          > (D=X1KZ4F01234566K*E=5436K). I
          > >tried to use hyphenation, but it doesn't work (I
          > think because the
          > >content has no syllables).
          > >Is there something in SXL-FO, that works similar
          > with <br> in HTML ?
          >
          > <block/> - because this breaks the flow in the
          > block progression
          > direction, but adds a block of zero height so as to
          > not introduce any space.
          >
          > If you want a *conditional* break, such that it only
          > breaks if it doesn't
          > fit in the cell but will not break if it does fit in
          > the cell (I need this
          > when displaying long subdirectory path names), you
          > can inject a zero-width
          > space ​ instead into the text where you need
          > the conditional break
          > to happen.
          >
          > I hope this helps.
          >
          > .............. Ken
          >
          >
          > --
          > Upcoming hands-on in-depth XSLT/XPath and/or XSL-FO
          > North America:
          > June 16-20, 2003
          >
          > G. Ken Holman
          > mailto:gkholman@...
          > Crane Softwrights Ltd.
          > http://www.CraneSoftwrights.com/f/
          > Box 266, Kars, Ontario CANADA K0A-2E0
          > +1(613)489-0999 (F:-0995)
          > ISBN 0-13-065196-6 Definitive
          > XSLT and XPath
          > ISBN 0-13-140374-5
          > Definitive XSL-FO
          > ISBN 1-894049-08-X Practical Transformation Using
          > XSLT and XPath
          > ISBN 1-894049-10-1 Practical Formatting
          > Using XSL-FO
          > Male Breast Cancer Awareness
          > http://www.CraneSoftwrights.com/f/bc
          >
          >


          __________________________________________________
          Do you Yahoo!?
          Yahoo! Platinum - Watch CBS' NCAA March Madness, live on your desktop!
          http://platinum.yahoo.com
        • Xavier Robert
          Hello everybody, Does somebody understand why the cell which contains periode du overrides other cells in the same line? Thanks, Xavier
          Message 4 of 7 , Apr 1, 2003
          • 0 Attachment
            Hello everybody,

            Does somebody understand why the cell which contains "periode du"
            overrides other cells in the same line?



            Thanks,

            Xavier









            <?xml version="1.0" encoding="iso-8859-1"?>

            <pdf:stylesheet xmlns:fo="http://www.w3.org/1999/XSL/Format"
            xmlns:pdf="http://www.w3.org/1999/XSL/Transform" version="1.0">

            <pdf:output doctype-public="-//W3C//DTD HTML 3.2 Final//EN"
            indent="yes" encoding="ISO-8859-1" method="xml" />

            <xsl:variable xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
            name="annee" select="//imprime/@millesime" />



            <pdf:template match="/imprime">

            <fo:root>

            <fo:layout-master-set>

            <fo:simple-page-master margin-right="1.5cm"
            margin-left="1.5cm" margin-bottom="0.3cm" margin-top="0.3cm"
            page-width="21cm" page-height="29.7cm" master-name="first">

            <fo:region-body background-color="rgb(230,230,230)"
            display-align="center" margin-bottom="1cm" margin-top="2cm" />



            <fo:region-before extent="2cm" />



            <fo:region-after extent="0.5cm" />

            </fo:simple-page-master>



            <fo:simple-page-master margin-right="1.5cm"
            margin-left="1.5cm" margin-bottom="0.3cm" margin-top="0.3cm"
            page-width="21cm" page-height="29.7cm" master-name="rest">

            <fo:region-body background-color="rgb(230,230,230)"
            display-align="center" margin-bottom="1cm" margin-top="2cm" />



            <fo:region-before extent="2cm" />



            <fo:region-after extent="0.5cm" />

            </fo:simple-page-master>



            <fo:page-sequence-master master-name="basicPSM">

            <fo:repeatable-page-master-alternatives>

            <fo:conditional-page-master-reference
            page-position="first" master-reference="first" />



            <fo:conditional-page-master-reference
            page-position="rest" master-reference="rest" />



            <fo:conditional-page-master-reference
            master-reference="rest" />

            </fo:repeatable-page-master-alternatives>

            </fo:page-sequence-master>

            </fo:layout-master-set>



            <fo:page-sequence master-reference="basicPSM">

            <fo:title>2035 - 1</fo:title>



            <fo:static-content flow-name="xsl-region-before">

            <fo:block font-size="8pt" font-family="Arial,
            Helvetica, sans-serif">

            <fo:block>Consultation ...</fo:block>



            <fo:block>Dénomination : ... N° SIREN
            : ...</fo:block>



            <fo:block>Titre</fo:block>



            <fo:block>Date et Heure Impression</fo:block>



            <fo:block>Date dernière mise à
            jour</fo:block>

            </fo:block>

            </fo:static-content>



            <fo:static-content flow-name="xsl-region-after">

            <fo:block text-align="right" font-size="8pt"
            font-family="Arial, Helvetica, sans-serif">page

            <fo:page-number />



            /

            <fo:page-number-citation ref-id="terminator" />

            </fo:block>

            </fo:static-content>



            <fo:flow flow-name="xsl-region-body">

            <fo:table table-layout="fixed" border-width="0">

            <fo:table-column column-width="4.5cm" />



            <fo:table-column column-width="2.25cm" />



            <fo:table-column column-width="1.6875cm" />



            <fo:table-column column-width="1.546875cm" />



            <fo:table-column column-width="0.703125cm" />



            <fo:table-column column-width="7.3125cm" />



            <fo:table-body>

            <fo:table-row>

            <fo:table-cell display-align="center"
            number-columns-spanned="3">

            <fo:block font-family="Arial,
            Helvetica, sans-serif">

            <fo:inline
            font-size="10pt">  RENSEIGNEMENTS RELATIFS A L'ANNEE
            20</fo:inline>

            </fo:block>

            </fo:table-cell>



            <fo:table-cell display-align="center"
            background-color="white">

            <fo:block font-family="Arial,
            Helvetica, sans-serif">

            <fo:block font-family="Arial,
            Helvetica, sans-serif" text-align="left">

            <fo:inline font-size="10pt">

            <xsl:value-of
            xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
            select="//imprime/donnee[@code='ca_2002792']/@valeur" />



             </fo:inline>

            </fo:block>

            </fo:block>

            </fo:table-cell>



            <fo:table-cell display-align="center">

            <fo:block font-family="Arial,
            Helvetica, sans-serif"> </fo:block>

            </fo:table-cell>



            <fo:table-cell display-align="center"
            number-rows-spanned="2">

            <fo:block font-family="Arial,
            Helvetica, sans-serif">

            <fo:block font-family="Arial,
            Helvetica, sans-serif" text-align="center">

            <fo:inline
            font-size="10pt">(si l'activité a commencé</fo:inline>



            <fo:block />



            <fo:inline
            font-size="10pt">ou cessé dans l'année)</fo:inline>

            </fo:block>

            </fo:block>

            </fo:table-cell>

            </fo:table-row>



            <fo:table-row>

            <fo:table-cell display-align="center">

            <fo:block font-family="Arial,
            Helvetica, sans-serif">

            <fo:block font-family="Arial,
            Helvetica, sans-serif" text-align="center">

            <fo:inline
            font-size="10pt">OU A LA PERIODE DU</fo:inline>

            </fo:block>

            </fo:block>

            </fo:table-cell>



            <fo:table-cell display-align="center"
            background-color="white">

            <fo:block font-family="Arial,
            Helvetica, sans-serif">

            <fo:block font-family="Arial,
            Helvetica, sans-serif" text-align="center">

            <fo:inline font-size="10pt">

            <xsl:value-of
            xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
            select="//imprime/donnee[@code='ca_2002793']/@valeur" />



             </fo:inline>

            </fo:block>

            </fo:block>

            </fo:table-cell>



            <fo:table-cell display-align="center">

            <fo:block font-family="Arial,
            Helvetica, sans-serif">

            <fo:block font-family="Arial,
            Helvetica, sans-serif" text-align="center">

            <fo:inline
            font-size="10pt">AU</fo:inline>

            </fo:block>

            </fo:block>

            </fo:table-cell>



            <fo:table-cell display-align="center"
            number-columns-spanned="2" background-color="white">

            <fo:block font-family="Arial,
            Helvetica, sans-serif">

            <fo:block font-family="Arial,
            Helvetica, sans-serif" text-align="center">

            <fo:inline font-size="10pt">

            <xsl:value-of
            xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
            select="//imprime/donnee[@code='ca_2002794']/@valeur" />



             </fo:inline>

            </fo:block>

            </fo:block>

            </fo:table-cell>

            </fo:table-row>

            </fo:table-body>

            </fo:table>



            <fo:block id="terminator" />

            </fo:flow>

            </fo:page-sequence>

            </fo:root>

            </pdf:template>

            </pdf:stylesheet>



            [Non-text portions of this message have been removed]
          • Roland Neilands
            Xavier, ... Why the nested blocks? ... Isn t this the same?
            Message 5 of 7 , Apr 1, 2003
            • 0 Attachment
              Xavier,

              > Does somebody understand why the cell which contains "periode du"
              > overrides other cells in the same line?

              Why the nested blocks?

              > <fo:table-cell display-align="center">
              >
              > <fo:block font-family="Arial,
              > Helvetica, sans-serif">
              >
              > <fo:block font-family="Arial,
              > Helvetica, sans-serif" text-align="center">
              >
              > <fo:inline
              > font-size="10pt">OU A LA PERIODE DU</fo:inline>
              >
              > </fo:block>
              >
              > </fo:block>
              >
              > </fo:table-cell>

              Isn't this the same?
              <fo:table-cell display-align="center">
              <fo:block font-family="Arial,Helvetica, sans-serif" text-align="center"
              font-size="10pt">OU A LA PERIODE DU</fo:block>
              </fo:table-cell>

              Don't know if this will help, send .fo if it doesn't.

              Cheers,
              Roland
            • Xavier Robert
              Hello, Yes Roland I m sure that your solution works. Thank you. However I have to change content of the last cell of the line before. But this code is
              Message 6 of 7 , Apr 1, 2003
              • 0 Attachment
                Hello,



                Yes Roland I m sure that your solution works. Thank you.

                However I have to change content of the last cell of the line before.

                But this code is automatically generated. So I need to understand why it
                doesn t work, to modify generator. I wonder if it is a FOP bug.



                This is the fo document :



                <?xml version="1.0" encoding="utf-8"?>

                <fo:root xmlns:fo="http://www.w3.org/1999/XSL/Format">

                <fo:layout-master-set>

                <fo:simple-page-master margin-right="1.5cm" margin-left="1.5cm"
                margin-bottom="0.3cm" margin-top="0.3cm" page-width="21cm"
                page-height="29.7cm" master-name="first">

                <fo:region-body background-color="rgb(230,230,230)"
                display-align="center" margin-bottom="1cm" margin-top="2cm" />



                <fo:region-before extent="2cm" />



                <fo:region-after extent="0.5cm" />

                </fo:simple-page-master>



                <fo:simple-page-master margin-right="1.5cm" margin-left="1.5cm"
                margin-bottom="0.3cm" margin-top="0.3cm" page-width="21cm"
                page-height="29.7cm" master-name="rest">

                <fo:region-body background-color="rgb(230,230,230)"
                display-align="center" margin-bottom="1cm" margin-top="2cm" />



                <fo:region-before extent="2cm" />



                <fo:region-after extent="0.5cm" />

                </fo:simple-page-master>



                <fo:page-sequence-master master-name="basicPSM">

                <fo:repeatable-page-master-alternatives>

                <fo:conditional-page-master-reference
                page-position="first" master-reference="first" />



                <fo:conditional-page-master-reference
                page-position="rest" master-reference="rest" />



                <fo:conditional-page-master-reference
                master-reference="rest" />

                </fo:repeatable-page-master-alternatives>

                </fo:page-sequence-master>

                </fo:layout-master-set>



                <fo:page-sequence master-reference="basicPSM">

                <fo:title>2035 - 1</fo:title>



                <fo:static-content flow-name="xsl-region-before">

                <fo:block font-size="8pt" font-family="Arial, Helvetica,
                sans-serif">

                <fo:block>Consultation ...</fo:block>



                <fo:block>Dénomination : ... N° SIREN :
                ...</fo:block>



                <fo:block>Titre</fo:block>



                <fo:block>Date et Heure Impression</fo:block>



                <fo:block>Date dernière mise à jour</fo:block>

                </fo:block>

                </fo:static-content>



                <fo:static-content flow-name="xsl-region-after">

                <fo:block text-align="right" font-size="8pt"
                font-family="Arial, Helvetica, sans-serif">page

                <fo:page-number />



                /

                <fo:page-number-citation ref-id="terminator" />

                </fo:block>

                </fo:static-content>



                <fo:flow flow-name="xsl-region-body">

                <fo:table table-layout="fixed" border-width="0">

                <fo:table-column column-width="4.5cm" />



                <fo:table-column column-width="2.25cm" />



                <fo:table-column column-width="1.6875cm" />



                <fo:table-column column-width="1.546875cm" />



                <fo:table-column column-width="0.703125cm" />



                <fo:table-column column-width="7.3125cm" />



                <fo:table-body>

                <fo:table-row>

                <fo:table-cell display-align="center"
                number-columns-spanned="3">

                <fo:block font-family="Arial, Helvetica,
                sans-serif">

                <fo:inline
                font-size="10pt">  RENSEIGNEMENTS RELATIFS A L'ANNEE
                20</fo:inline>

                </fo:block>

                </fo:table-cell>



                <fo:table-cell display-align="center"
                background-color="white">

                <fo:block font-family="Arial, Helvetica,
                sans-serif">

                <fo:block font-family="Arial, Helvetica,
                sans-serif" text-align="left">

                <fo:inline font-size="10pt">

                <xsl:value-of
                xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
                select="//imprime/donnee[@code='ca_2002792']/@valeur" />



                 </fo:inline>

                </fo:block>

                </fo:block>

                </fo:table-cell>



                <fo:table-cell display-align="center">

                <fo:block font-family="Arial, Helvetica,
                sans-serif"> </fo:block>

                </fo:table-cell>



                <fo:table-cell display-align="center"
                number-rows-spanned="2">

                <fo:block font-family="Arial, Helvetica,
                sans-serif">

                <fo:block font-family="Arial, Helvetica,
                sans-serif" text-align="center">

                <fo:inline font-size="10pt">(si
                l'activité a commencé</fo:inline>



                <fo:block />



                <fo:inline font-size="10pt">ou
                cessé dans l'année)</fo:inline>

                </fo:block>

                </fo:block>

                </fo:table-cell>

                </fo:table-row>



                <fo:table-row>

                <fo:table-cell display-align="center">

                <fo:block font-family="Arial, Helvetica,
                sans-serif">

                <fo:block font-family="Arial, Helvetica,
                sans-serif" text-align="center">

                <fo:inline font-size="10pt">OU A LA
                PERIODE DU</fo:inline>

                </fo:block>

                </fo:block>

                </fo:table-cell>



                <fo:table-cell display-align="center"
                background-color="white">

                <fo:block font-family="Arial, Helvetica,
                sans-serif">

                <fo:block font-family="Arial, Helvetica,
                sans-serif" text-align="center">

                <fo:inline font-size="10pt">

                <xsl:value-of
                xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
                select="//imprime/donnee[@code='ca_2002793']/@valeur" />



                 </fo:inline>

                </fo:block>

                </fo:block>

                </fo:table-cell>



                <fo:table-cell display-align="center">

                <fo:block font-family="Arial, Helvetica,
                sans-serif">

                <fo:block font-family="Arial, Helvetica,
                sans-serif" text-align="center">

                <fo:inline
                font-size="10pt">AU</fo:inline>

                </fo:block>

                </fo:block>

                </fo:table-cell>



                <fo:table-cell display-align="center"
                number-columns-spanned="2" background-color="white">

                <fo:block font-family="Arial, Helvetica,
                sans-serif">

                <fo:block font-family="Arial, Helvetica,
                sans-serif" text-align="center">

                <fo:inline font-size="10pt">

                <xsl:value-of
                xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
                select="//imprime/donnee[@code='ca_2002794']/@valeur" />



                 </fo:inline>

                </fo:block>

                </fo:block>

                </fo:table-cell>

                </fo:table-row>

                </fo:table-body>

                </fo:table>

                </fo:flow>

                </fo:page-sequence>

                </fo:root>

                -----Message d'origine-----
                De : Roland Neilands [mailto:rneilands@...]
                Envoyé : mercredi 2 avril 2003 00:47
                À : XSL-FO@yahoogroups.com
                Objet : RE: [XSL-FO] override cell in table



                Xavier,

                > Does somebody understand why the cell which contains "periode du"
                > overrides other cells in the same line?

                Why the nested blocks?

                > <fo:table-cell display-align="center">
                >
                > <fo:block font-family="Arial,
                > Helvetica, sans-serif">
                >
                > <fo:block font-family="Arial,
                > Helvetica, sans-serif" text-align="center">
                >
                > <fo:inline
                > font-size="10pt">OU A LA PERIODE DU</fo:inline>
                >
                > </fo:block>
                >
                > </fo:block>
                >
                > </fo:table-cell>

                Isn't this the same?
                <fo:table-cell display-align="center">
                <fo:block font-family="Arial,Helvetica, sans-serif"
                text-align="center"
                font-size="10pt">OU A LA PERIODE DU</fo:block>
                </fo:table-cell>

                Don't know if this will help, send .fo if it doesn't.

                Cheers,
                Roland






                Yahoo! Groups Sponsor



                ADVERTISEMENT

                <http://rd.yahoo.com/M=246920.2960106.4328965.1728375/D=egroupweb/S=1705
                016061:HM/A=1513703/R=0/*http:/www.gotomypc.com/u/tr/yh/cpm/grp/300_06F/
                g22lp?Target=mm/g22lp.tmpl>



                <http://us.adserver.yahoo.com/l?M=246920.2960106.4328965.1728375/D=egrou
                pmail/S=:HM/A=1513703/rand=797354028>


                To unsubscribe from this group, send an email to:
                XSL-FO-unsubscribe@egroups.com



                Your use of Yahoo! Groups is subject to the Yahoo!
                <http://docs.yahoo.com/info/terms/> Terms of Service.



                [Non-text portions of this message have been removed]
              • Roland Neilands
                Xavier, ... I m confused now. You sent a .xsl file, not the .fo. XSL is what automatically generates FO from your XML. If you re using some tool to generate
                Message 7 of 7 , Apr 2, 2003
                • 0 Attachment
                  Xavier,

                  > However I have to change content of the last cell of the line before.
                  >
                  > But this code is automatically generated. So I need to
                  > understand why it
                  > doesn t work, to modify generator. I wonder if it is a FOP bug.

                  I'm confused now. You sent a .xsl file, not the .fo. XSL is what
                  automatically generates FO from your XML. If you're using some tool to
                  generate the XSL file as given, raise the question with the vendor,
                  otherwise you'll need to be more specific.

                  Regards,
                  Roland
                Your message has been successfully submitted and would be delivered to recipients shortly.