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

Re: [XSL-FO] conditional-page-master-reference

Expand Messages
  • W. Eliot Kimber
    ... Conditional page sequences are evaluated in the order they are specified in the page sequence master, so if you put the last page master first, it should
    Message 1 of 12 , Dec 3, 2002
    • 0 Attachment
      gpearson_ccc wrote:
      > I need to be very specific in my page masters and the sequences. Is
      > there anyway I can specify a conditional-page-master-reference to be
      > both the first AND last pages (i.e., the only page) in the sequence?
      > I need to use a specific layout if the body region lies entirely
      > within one physical page.

      Conditional page sequences are evaluated in the order they are specified
      in the page sequence master, so if you put the last page master first,
      it should take precedence over the first page master and should match
      the page in a single-page flow.

      However, XEP 3.* does not support the "last" condition. As far as I
      know, only XSL Formatter supports "last" at the moment.

      Cheers,

      Eliot
      --
      W. Eliot Kimber, eliot@...
      Consultant, ISOGEN International

      1016 La Posada Dr., Suite 240
      Austin, TX 78752 Phone: 512.656.4139
    • David Tolpin
      ... ??? It does.
      Message 2 of 12 , Dec 3, 2002
      • 0 Attachment
        > However, XEP 3.* does not support the "last" condition. As far as I
        > know, only XSL Formatter supports "last" at the moment.

        ??? It does.
      • gpearson_ccc
        Eliot - Thanks for the response, but I don t think that will work (besides the XEP support issue). I need to also do separate formatting depending if the page
        Message 3 of 12 , Dec 3, 2002
        • 0 Attachment
          Eliot - Thanks for the response, but I don't think that will work
          (besides the XEP support issue). I need to also do separate
          formatting depending if the page is last of many or last of 1. I
          need to discretely identify different page masters for the following
          situations:
          - First and only page (odd)
          - First and only page (even)
          - First of multiple pages (odd)
          - First of multiple pages (even)
          - Middle page (odd) (something other than first or last)
          - Middle page (even) (something other than first or last)
          - Last of multiple pages (odd)
          - Last of multiple pages (even)
          Actually, this is for a work-around for a complex formatting problem
          that I can't figure out any other way of accomplishing other than
          separate page masters.



          --- In XSL-FO@y..., "W. Eliot Kimber" <eliot@i...> wrote:
          > gpearson_ccc wrote:
          > > I need to be very specific in my page masters and the sequences.
          Is
          > > there anyway I can specify a conditional-page-master-reference to
          be
          > > both the first AND last pages (i.e., the only page) in the
          sequence?
          > > I need to use a specific layout if the body region lies entirely
          > > within one physical page.
          >
          > Conditional page sequences are evaluated in the order they are
          specified
          > in the page sequence master, so if you put the last page master
          first,
          > it should take precedence over the first page master and should
          match
          > the page in a single-page flow.
          >
          > However, XEP 3.* does not support the "last" condition. As far as I
          > know, only XSL Formatter supports "last" at the moment.
          >
          > Cheers,
          >
          > Eliot
          > --
          > W. Eliot Kimber, eliot@i...
          > Consultant, ISOGEN International
          >
          > 1016 La Posada Dr., Suite 240
          > Austin, TX 78752 Phone: 512.656.4139
        • gpearson_ccc
          Eliot - Thanks for the response, but I don t think that will work (besides the XEP support issue). I need to also do separate formatting depending if the page
          Message 4 of 12 , Dec 3, 2002
          • 0 Attachment
            Eliot - Thanks for the response, but I don't think that will work
            (besides the XEP support issue). I need to also do separate
            formatting depending if the page is last of many or last of 1. I
            need to discretely identify different page masters for the following
            situations:
            - First and only page (odd)
            - First and only page (even)
            - First of multiple pages (odd)
            - First of multiple pages (even)
            - Middle page (odd) (something other than first or last)
            - Middle page (even) (something other than first or last)
            - Last of multiple pages (odd)
            - Last of multiple pages (even)
            Actually, this is for a work-around for a complex formatting problem
            that I can't figure out any other way of accomplishing other than
            separate page masters.



            --- In XSL-FO@y..., "W. Eliot Kimber" <eliot@i...> wrote:
            > gpearson_ccc wrote:
            > > I need to be very specific in my page masters and the sequences.
            Is
            > > there anyway I can specify a conditional-page-master-reference to
            be
            > > both the first AND last pages (i.e., the only page) in the
            sequence?
            > > I need to use a specific layout if the body region lies entirely
            > > within one physical page.
            >
            > Conditional page sequences are evaluated in the order they are
            specified
            > in the page sequence master, so if you put the last page master
            first,
            > it should take precedence over the first page master and should
            match
            > the page in a single-page flow.
            >
            > However, XEP 3.* does not support the "last" condition. As far as I
            > know, only XSL Formatter supports "last" at the moment.
            >
            > Cheers,
            >
            > Eliot
            > --
            > W. Eliot Kimber, eliot@i...
            > Consultant, ISOGEN International
            >
            > 1016 La Posada Dr., Suite 240
            > Austin, TX 78752 Phone: 512.656.4139
          • David Tolpin
            ... [Non-text portions of this message have been removed]
            Message 5 of 12 , Dec 3, 2002
            • 0 Attachment
              >
              > gpearson_ccc wrote:
              > > I need to be very specific in my page masters and the sequences. Is
              > > there anyway I can specify a conditional-page-master-reference to be
              > > both the first AND last pages (i.e., the only page) in the sequence?
              > > I need to use a specific layout if the body region lies entirely
              > > within one physical page.
              >
              > Conditional page sequences are evaluated in the order they are specified
              > in the page sequence master, so if you put the last page master first,
              > it should take precedence over the first page master and should match
              > the page in a single-page flow.
              >
              > However, XEP 3.* does not support the "last" condition. As far as I
              > know, only XSL Formatter supports "last" at the moment.
              >
              > Cheers,
              >
              > Eliot
              > --
              > W. Eliot Kimber, eliot@...
              > Consultant, ISOGEN International
              >
              > 1016 La Posada Dr., Suite 240
              > Austin, TX 78752 Phone: 512.656.4139
              >
              >
              > To unsubscribe from this group, send an email to:
              > XSL-FO-unsubscribe@egroups.com
              >
              >
              >
              > Your use of Yahoo! Groups is subject to http://docs.yahoo.com/info/terms/
              >
              >
              >
              >



              [Non-text portions of this message have been removed]
            • W. Eliot Kimber
              ... The docs don t say it doesn t anywhere I can find and all my uses of last have worked. But... ...the following test case gives identical results with XSL
              Message 6 of 12 , Dec 3, 2002
              • 0 Attachment
                David Tolpin wrote:
                >>However, XEP 3.* does not support the "last" condition. As far as I
                >>know, only XSL Formatter supports "last" at the moment.
                >
                >
                > ??? It does.

                The docs don't say it doesn't anywhere I can find and all my uses of
                "last" have worked. But...

                ...the following test case gives identical results with XSL Formatter
                and XEP 3.13. This test case should be testing whether or not "last"
                pages match but it might be working because of some fallback behavior
                that happens to land on the "last" page master (or the test case could
                be flawed).

                <?xml version="1.0"?>
                <fo:root xmlns:fo="http://www.w3.org/1999/XSL/Format"
                font-family="sans-serif"
                font-size="12pt"
                >
                <fo:layout-master-set>
                <fo:simple-page-master master-name="page-A"
                page-height="11in"
                page-width="8.5in">
                <fo:region-body
                margin-left="1in"
                margin-right="1in"
                margin-top="1.5in"
                margin-bottom="1.5in"/>
                <fo:region-before
                precedence="false"
                background-color="red"
                extent="1in"/>
                <fo:region-after
                background-color="green"
                extent="1in"/>
                <fo:region-start
                background-color="blue"
                extent="1in"/>
                <fo:region-end
                background-color="yellow"
                extent="1in"/>
                </fo:simple-page-master>
                <fo:simple-page-master master-name="page-B"
                page-height="11in"
                page-width="8.5in">
                <fo:region-body
                margin-left="1in"
                margin-right="1in"
                margin-top="1.5in"
                margin-bottom="1.5in"/>
                <fo:region-before
                precedence="false"
                background-color="aqua"
                extent="1in"/>
                <fo:region-after
                background-color="silver"
                extent="1in"/>
                <fo:region-start
                background-color="blue"
                extent="1in"/>
                <fo:region-end
                background-color="yellow"
                extent="1in"/>
                </fo:simple-page-master>
                <fo:simple-page-master master-name="page-C"
                page-height="11in"
                page-width="8.5in">
                <fo:region-body
                margin-top="1.5in"
                margin-bottom="1.5in"
                margin-left="1in"
                margin-right="1in"
                />
                <fo:region-before
                precedence="false"
                background-color="fuchsia"
                extent="1in"/>
                <fo:region-after
                background-color="purple"
                extent="1in"/>
                <fo:region-start
                background-color="blue"
                extent="1in"/>
                <fo:region-end
                background-color="yellow"
                extent="1in"/>
                </fo:simple-page-master>
                <fo:page-sequence-master master-name="body-pages">
                <fo:repeatable-page-master-alternatives>
                <fo:conditional-page-master-reference
                master-reference="page-C"
                page-position="last"/>
                <fo:conditional-page-master-reference
                master-reference="page-A"
                page-position="first"/>
                <fo:conditional-page-master-reference
                master-reference="page-B"
                page-position="any"/>
                <fo:conditional-page-master-reference
                master-reference="page-B"
                page-position="any"/>
                </fo:repeatable-page-master-alternatives>
                </fo:page-sequence-master>
                </fo:layout-master-set>
                <fo:page-sequence master-reference="body-pages">
                <fo:flow flow-name="xsl-region-body"
                >
                <fo:block
                >This is page 1 of 4. Should use first page master page-A
                (green region-after).</fo:block>
                <fo:block break-before="page"
                >This is page 2 of 4. Should use "any" page master page-B
                (silver region-after).</fo:block>
                <fo:block break-before="page"
                >This is page 3 of 4. Should use "any" page master page-B
                (silver region-after).</fo:block>
                <fo:block break-before="page"
                >This is page 4 of 4. Should use last page master page-C
                (purple region-after).</fo:block>
                </fo:flow>
                </fo:page-sequence>
                <fo:page-sequence master-reference="body-pages">
                <fo:flow flow-name="xsl-region-body"
                >
                <fo:block
                >This is page 1 of 1. Should use last page master page-C
                (purple region-after).</fo:block>
                </fo:flow>
                </fo:page-sequence>
                </fo:root>

                --
                W. Eliot Kimber, eliot@...
                Consultant, ISOGEN International

                1016 La Posada Dr., Suite 240
                Austin, TX 78752 Phone: 512.656.4139
              • David Tolpin
                ... There is no XEP support issue. XEP does support page-position= last . Since 3.0. ... Wouldn t it be more useful to address the original problem, not its
                Message 7 of 12 , Dec 3, 2002
                • 0 Attachment
                  >
                  > Eliot - Thanks for the response, but I don't think that will work
                  > (besides the XEP support issue). I need to also do separate

                  There is no XEP support issue. XEP does support page-position="last".
                  Since 3.0.

                  > Actually, this is for a work-around for a complex formatting problem
                  > that I can't figure out any other way of accomplishing other than
                  > separate page masters.

                  Wouldn't it be more useful to address the original problem, not its consequences?
                  What kind of formatting requires such a complex layout-master-set?

                  David Tolpin
                  RenderX
                • gpearson_ccc
                  ... problem ... consequences? ... Yes, you re right. It was complicated and I was looking for a quick answer. Here s the overall problem. I need to format
                  Message 8 of 12 , Dec 3, 2002
                  • 0 Attachment
                    --- In XSL-FO@y..., David Tolpin <dvd@r...> wrote:
                    >
                    > > Actually, this is for a work-around for a complex formatting
                    problem
                    > > that I can't figure out any other way of accomplishing other than
                    > > separate page masters.
                    >
                    > Wouldn't it be more useful to address the original problem, not its
                    consequences?
                    > What kind of formatting requires such a complex layout-master-set?
                    >
                    Yes, you're right. It was complicated and I was looking for a quick
                    answer. Here's the overall problem.

                    I need to format procedures for pilots...sort of like checklists.
                    Since they are important, it has to be blatantly obvious that text
                    continues on the next page if this is the case. I don't have much
                    freedom in the final look.

                    On the first page, the title of the procedure appears at the top. If
                    the procedure spans multiple pages, each subsequent page has the
                    title repeated except with "CONT'D" following the title.

                    At the bottom of the page, if the procedure needs to be continued on
                    the following page, a down arrow must appear to indicate that the
                    reader must turn the page.

                    So the problem is that the title has to vary from the first page to
                    the remaining pages. And all pages of the procedure except the last
                    need an arrow at the bottom.

                    Since it appears on a page basis, this seems to require something in
                    the way of static text in the page master layouts. Maybe I'm missing
                    a more obvious solution.
                  • W. Eliot Kimber
                    ... [...] ... You should be able to do this with markers. If you can make each of these things a distinct page sequence, then you can use this basic technique:
                    Message 9 of 12 , Dec 3, 2002
                    • 0 Attachment
                      gpearson_ccc wrote:

                      > On the first page, the title of the procedure appears at the top. If
                      > the procedure spans multiple pages, each subsequent page has the
                      > title repeated except with "CONT'D" following the title.

                      [...]

                      > Since it appears on a page basis, this seems to require something in
                      > the way of static text in the page master layouts. Maybe I'm missing
                      > a more obvious solution.

                      You should be able to do this with markers. If you can make each of
                      these things a distinct page sequence, then you can use this basic
                      technique:

                      - Use different first and any page masters and name the region-before
                      differently in each.

                      - In the flow, put out a marker with the title and the "CONT'D" string
                      at the start and then an empty marker of the same class at the end

                      - In the static content for the any page region-before, reference this
                      marker with a last-within-page postion.

                      This will have the effect of putting out the continued header on all but
                      the first and last pages, not at all on single- or two-page flows.

                      Cheers,

                      E.
                      --
                      W. Eliot Kimber, eliot@...
                      Consultant, ISOGEN International

                      1016 La Posada Dr., Suite 240
                      Austin, TX 78752 Phone: 512.656.4139
                    • W. Eliot Kimber
                      ... I stand happily corrected--for some reason I was under the impression that XEP does not support last, but clearly it does. Sorry (it s becoming harder and
                      Message 10 of 12 , Dec 3, 2002
                      • 0 Attachment
                        David Tolpin wrote:
                        >>Eliot - Thanks for the response, but I don't think that will work
                        >>(besides the XEP support issue). I need to also do separate
                        >
                        >
                        > There is no XEP support issue. XEP does support page-position="last".
                        > Since 3.0.

                        I stand happily corrected--for some reason I was under the impression
                        that XEP does not support last, but clearly it does. Sorry (it's
                        becoming harder and harder to keep track of which implementations do
                        what, expecially when they are constantly being improved).

                        Cheers,

                        E.
                        --
                        W. Eliot Kimber, eliot@...
                        Consultant, ISOGEN International

                        1016 La Posada Dr., Suite 240
                        Austin, TX 78752 Phone: 512.656.4139
                      • gpearson_ccc <gpearson@creativecorp.com>
                        ... top. If ... in ... missing ... before ... string ... this ... all but ... Happy to say that after a great deal of effort I got this to work, based on the
                        Message 11 of 12 , Dec 12, 2002
                        • 0 Attachment
                          --- In XSL-FO@yahoogroups.com, "W. Eliot Kimber" <eliot@i...> wrote:
                          > gpearson_ccc wrote:
                          >
                          > > On the first page, the title of the procedure appears at the
                          top. If
                          > > the procedure spans multiple pages, each subsequent page has the
                          > > title repeated except with "CONT'D" following the title.
                          >
                          > [...]
                          >
                          > > Since it appears on a page basis, this seems to require something
                          in
                          > > the way of static text in the page master layouts. Maybe I'm
                          missing
                          > > a more obvious solution.
                          >
                          > You should be able to do this with markers. If you can make each of
                          > these things a distinct page sequence, then you can use this basic
                          > technique:
                          >
                          > - Use different first and any page masters and name the region-
                          before
                          > differently in each.
                          >
                          > - In the flow, put out a marker with the title and the "CONT'D"
                          string
                          > at the start and then an empty marker of the same class at the end
                          >
                          > - In the static content for the any page region-before, reference
                          this
                          > marker with a last-within-page postion.
                          >
                          > This will have the effect of putting out the continued header on
                          all but
                          > the first and last pages, not at all on single- or two-page flows.
                          >

                          Happy to say that after a great deal of effort I got this to work,
                          based on the suggestion(s) provided here. The problem was actually
                          more complicated that what I stated, but this suggestion got me
                          started down the right path.

                          Thanks Eliot and others.
                        Your message has been successfully submitted and would be delivered to recipients shortly.