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

Re: [XSL-FO] Precendence of Hidden border style

Expand Messages
  • G. Ken Holman
    ... Actually, my experience is that XSL Formatter does do this. See the test below for an example I just prepared to illustrate this. I document on page 262
    Message 1 of 11 , Nov 5, 2002
    • 0 Attachment
      At 2002-11-05 13:51 -0600, W. Eliot Kimber wrote:
      >I'm working through the rules for border precendence when
      >border-collapse="collapse-with-precendence".
      >
      >Reading the CSS2 section on borders (17.6.2), there is this statement:
      >
      >"Borders with the 'border-style' of 'hidden' take precedence over all
      >other conflicting borders. Any border with this value suppresses all
      >borders at this location."
      >
      >The second sentence seems to imply that "hidden" suppresses all borders,
      >regardless of precendence value, but XSL Formatter doesn't do that.

      Actually, my experience is that XSL Formatter does do this. See the test
      below for an example I just prepared to illustrate this.

      I document on page 262 of the Third Edition of our book what I found in the
      documentation and experience how the style includes both "hidden" and
      "none" at different ends of the precedence spectrum.

      Note in my test below how the second last example shows the dotted cell
      being lower priority than the table but the hidden cell being higher
      priority than the table. The last example shows the dotted cell being
      higher priority than the "none" cell.

      I hope this helps.

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

      <block>Both cells solid </block>
      <table>
      <table-body>
      <table-row>
      <table-cell border-style="solid">
      <block>First</block>
      </table-cell>
      <table-cell border-style="solid">
      <block>Second</block>
      </table-cell>
      </table-row>
      </table-body>
      </table>
      <block>Both cells solid, the second cell start style is hidden</block>
      <table>
      <table-body>
      <table-row>
      <table-cell border-style="solid">
      <block>First</block>
      </table-cell>
      <table-cell border-style="solid" border-start-style="hidden">
      <block>Second</block>
      </table-cell>
      </table-row>
      </table-body>
      </table>
      <block>First cell solid, the second cell hidden</block>
      <table>
      <table-body>
      <table-row>
      <table-cell border-style="solid">
      <block>First</block>
      </table-cell>
      <table-cell border-style="hidden">
      <block>Second</block>
      </table-cell>
      </table-row>
      </table-body>
      </table>
      <block>First cell solid, the second cell none</block>
      <table>
      <table-body>
      <table-row>
      <table-cell border-style="solid">
      <block>First</block>
      </table-cell>
      <table-cell border-style="none">
      <block>Second</block>
      </table-cell>
      </table-row>
      </table-body>
      </table>
      <block>Table solid, first cell dotted, the second cell hidden</block>
      <table>
      <table-body border-style="solid">
      <table-row>
      <table-cell border-style="dotted">
      <block>First</block>
      </table-cell>
      <table-cell border-style="hidden">
      <block>Second</block>
      </table-cell>
      </table-row>
      </table-body>
      </table>
      <block>Table solid, first cell dotted, the second cell none</block>
      <table>
      <table-body border-style="solid">
      <table-row>
      <table-cell border-style="dotted">
      <block>First</block>
      </table-cell>
      <table-cell border-style="none">
      <block>Second</block>
      </table-cell>
      </table-row>
      </table-body>
      </table>


      --
      Upcoming hands-on in-depth XSLT/XPath and/or XSL-FO:
      - North America: Feb 3 - Feb 7,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
      Next conference training: 2002-12-08,03-03,06
    • W. Eliot Kimber
      ... In your example all the conflicting rules have the same (implicit) precedence value. However, if you set the precedence so that the hidden border has a
      Message 2 of 11 , Nov 5, 2002
      • 0 Attachment
        G. Ken Holman wrote:

        > Actually, my experience is that XSL Formatter does do this. See the test
        > below for an example I just prepared to illustrate this.

        In your example all the conflicting rules have the same (implicit)
        precedence value. However, if you set the precedence so that the hidden
        border has a lower numeric precedence than the other rule, the hidden
        rule is *not* applied. I can read the CSS2 spec as suggesting that it
        *should* be applied. But I can read it as suggesting that it shouldn't
        (that is, numeric precedence always governs).

        Cheers,

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

        1016 La Posada Dr., Suite 240
        Austin, TX 78752 Phone: 512.656.4139
      • G. Ken Holman
        ... Really? I understand the table has higher precedence (5) than the cell (4) and that my demonstration shows how the cell s hidden is stronger than the
        Message 3 of 11 , Nov 5, 2002
        • 0 Attachment
          At 2002-11-05 14:43 -0600, W. Eliot Kimber wrote:
          >G. Ken Holman wrote:
          >
          > > Actually, my experience is that XSL Formatter does do this. See the test
          > > below for an example I just prepared to illustrate this.
          >
          >In your example all the conflicting rules have the same (implicit)
          >precedence value.

          Really? I understand the table has higher precedence (5) than the cell (4)
          and that my demonstration shows how the cell's "hidden" is stronger than
          the table's "solid".

          >However, if you set the precedence so that the hidden
          >border has a lower numeric precedence than the other rule, the hidden
          >rule is *not* applied.

          But according to 7.26.1-4 the table cell has lower precedence than the
          table, so my second last example illustrates the correct behaviour of the
          table's edge being hidden by the cell specification.

          >I can read the CSS2 spec as suggesting that it
          >*should* be applied. But I can read it as suggesting that it shouldn't
          >(that is, numeric precedence always governs).

          Remember that the XSL-FO spec overrides the CSS2 spec.

          Sections 7.26.1-4 show the implicit precedence of each of the constructs.

          Section 6.7.10 states "Any border with this value [hidden] suppresses all
          borders at this location".

          When I wrote page 262 of our book it was this same section that mentions
          how "none" is only ever invisible when *all* specifications are "none"
          (which happens to be the default).

          Does this help?

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


          --
          Upcoming hands-on in-depth XSLT/XPath and/or XSL-FO:
          - North America: Feb 3 - Feb 7,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
          Next conference training: 2002-12-08,03-03,06
        • W. Eliot Kimber
          ... You are correct--I forgot about that. But in my sample, I m setting the precedence explicitly for two conflicting cells. e.g.:
          Message 4 of 11 , Nov 5, 2002
          • 0 Attachment
            G. Ken Holman wrote:
            > At 2002-11-05 14:43 -0600, W. Eliot Kimber wrote:
            >
            >>G. Ken Holman wrote:
            >>
            >>
            >>>Actually, my experience is that XSL Formatter does do this. See the test
            >>>below for an example I just prepared to illustrate this.
            >>
            >>In your example all the conflicting rules have the same (implicit)
            >>precedence value.
            >
            >
            > Really? I understand the table has higher precedence (5) than the cell (4)
            > and that my demonstration shows how the cell's "hidden" is stronger than
            > the table's "solid".

            You are correct--I forgot about that. But in my sample, I'm setting the
            precedence explicitly for two conflicting cells. e.g.:

            <fo:table-row>
            <fo:table-cell
            border-end-precedence="9"
            border-end-style="hidden"
            border-end-width="2pt"
            ><fo:block>r1c1</fo:block</fo:table-cell>
            <fo:table-cell
            border-start-precedence="10"
            border-start-style="solid"
            border-end-width="2pt"
            ><fo:block>r1c2</fo:block</fo:table-cell>
            </fo:table-row>

            With this example, the conflicting rule is not hidden.

            > Section 6.7.10 states "Any border with this value [hidden] suppresses all
            > borders at this location".

            The problem I see is that the sentence prior to this one explicitly says
            "conficting borders"--it's ambiguous from these two sentences whether by
            "conflicting" is meant "borders with the same precedence and width" or
            "borders with a non-none value for style".

            I think that the former (stronger) meaning is intended, and it's clear
            that that's how you interpreted it as well. But my example above does
            not appear to reflect that interpretation with XSL Formatter (and XEP
            does not yet support rule collapsing).

            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
            ... Interestingly, the default preferences for the different borders (table, row, etc.) seems to conflict with condition 5 in 6.7.10, which says that cell has
            Message 5 of 11 , Nov 5, 2002
            • 0 Attachment
              G. Ken Holman wrote:

              > But according to 7.26.1-4 the table cell has lower precedence than the
              > table, so my second last example illustrates the correct behaviour of the
              > table's edge being hidden by the cell specification.

              Interestingly, the default preferences for the different borders (table,
              row, etc.) seems to conflict with condition 5 in 6.7.10, which says that
              cell has the highest. This statement only makes sense if all of the
              discussion of conflict resolution (the list and preceding para starting
              "If the value of the border-collapse trait is "collapse"...") is with
              respect to borders that have identical precedence values. This reading
              would support the behavior I'm seeing with XSL Formatter.

              Cheers,

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

              1016 La Posada Dr., Suite 240
              Austin, TX 78752 Phone: 512.656.4139
            • G. Ken Holman
              ... I just added the above (with repairs to the markup) to my test page it is is, indeed, being hidden as I thought it should. Note that the fo:block isn t
              Message 6 of 11 , Nov 5, 2002
              • 0 Attachment
                At 2002-11-05 15:37 -0600, W. Eliot Kimber wrote:
                >G. Ken Holman wrote:
                > > Really? I understand the table has higher precedence (5) than the cell
                > (4)
                > > and that my demonstration shows how the cell's "hidden" is stronger than
                > > the table's "solid".
                >
                >You are correct--I forgot about that. But in my sample, I'm setting the
                >precedence explicitly for two conflicting cells. e.g.:
                >
                ><fo:table-row>
                ><fo:table-cell
                > border-end-precedence="9"
                > border-end-style="hidden"
                > border-end-width="2pt"
                > ><fo:block>r1c1</fo:block</fo:table-cell>
                ><fo:table-cell
                > border-start-precedence="10"
                > border-start-style="solid"
                > border-end-width="2pt"
                > ><fo:block>r1c2</fo:block</fo:table-cell>
                ></fo:table-row>
                >
                >With this example, the conflicting rule is not hidden.

                I just added the above (with repairs to the markup) to my test page it is
                is, indeed, being hidden as I thought it should. Note that the fo:block
                isn't properly terminated and the second cell is setting the width of the
                end, not the start.

                So my version of XSL Formatter is working as expected ... I'm running
                version 2.3.2002.1031 that I downloaded the other day: XFE23M1A.EXE ... I'm
                not seeing what you are seeing, as I'm seeing the hidden overriding the
                solid on the shared border, so no edges are showing at all.

                I then modified it to make the second cell have the entire border turned
                on, and I see the lower precedence hidden is correctly hiding the shared edge.

                I've attached an image of what I see on my screen ... try the code below
                and let me know how it works for you. Perhaps you are only dealing with an
                old implementation issue.

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

                <block space-before="20mm">Eliot's test unmodified (but fixed)</block>
                <table>
                <table-body>
                <table-row>
                <table-cell
                border-end-precedence="9"
                border-end-style="hidden"
                border-end-width="2pt"
                ><block>r1c1</block></table-cell>
                <table-cell
                border-start-precedence="10"
                border-start-style="solid"
                border-start-width="2pt"
                ><block>r1c2</block></table-cell>
                </table-row>
                </table-body>
                </table>

                <block>Eliot's test modified</block>
                <table>
                <table-body>
                <table-row>
                <table-cell
                border-end-precedence="9"
                border-end-style="hidden"
                border-end-width="2pt"
                ><block>r1c1</block></table-cell>
                <table-cell
                border-start-precedence="10"
                border-style="solid"
                border-start-width="2pt"
                ><block>r1c2</block></table-cell>
                </table-row>
                </table-body>
                </table>

                ----------


                --
                Upcoming hands-on in-depth XSLT/XPath and/or XSL-FO:
                - North America: Feb 3 - Feb 7,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
                Next conference training: 2002-12-08,03-03,06


                [Non-text portions of this message have been removed]
              • G. Ken Holman
                ... The attachment didn t make it through. What I have is in ASCII graphics as: Eliot s test unmodified (but fixed) r1c1 r1c2 Eliot s test modified ... r1c1
                Message 7 of 11 , Nov 5, 2002
                • 0 Attachment
                  At 2002-11-05 18:30 -0500, I wrote:
                  >I've attached an image of what I see on my screen ... try the code below
                  >and let me know how it works for you. Perhaps you are only dealing with an
                  >old implementation issue.

                  The attachment didn't make it through.

                  What I have is in ASCII graphics as:

                  Eliot's test unmodified (but fixed)

                  r1c1 r1c2

                  Eliot's test modified
                  ------
                  r1c1 r1c2 |
                  ------

                  Which is what I would expect. In both cases the first cell's "hidden" is
                  overriding the higher precedence "solid" of the next cell.

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

                  <block space-before="20mm">Eliot's test unmodified (but fixed)</block>
                  <table>
                  <table-body>
                  <table-row>
                  <table-cell
                  border-end-precedence="9"
                  border-end-style="hidden"
                  border-end-width="2pt"
                  ><block>r1c1</block></table-cell>
                  <table-cell
                  border-start-precedence="10"
                  border-start-style="solid"
                  border-start-width="2pt"
                  ><block>r1c2</block></table-cell>
                  </table-row>
                  </table-body>
                  </table>

                  <block>Eliot's test modified</block>
                  <table>
                  <table-body>
                  <table-row>
                  <table-cell
                  border-end-precedence="9"
                  border-end-style="hidden"
                  border-end-width="2pt"
                  ><block>r1c1</block></table-cell>
                  <table-cell
                  border-start-precedence="10"
                  border-style="solid"
                  border-start-width="2pt"
                  ><block>r1c2</block></table-cell>
                  </table-row>
                  </table-body>
                  </table>


                  --
                  Upcoming hands-on in-depth XSLT/XPath and/or XSL-FO:
                  - North America: Feb 3 - Feb 7,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
                  Next conference training: 2002-12-08,03-03,06
                • W. Eliot Kimber
                  ... The difference is I m specifying collapse-with-precedence, not collapse. When I specify border-collapse= collapse , I get Ken s result. When I specify
                  Message 8 of 11 , Nov 5, 2002
                  • 0 Attachment
                    G. Ken Holman wrote:

                    > I just added the above (with repairs to the markup) to my test page it is
                    > is, indeed, being hidden as I thought it should. Note that the fo:block
                    > isn't properly terminated and the second cell is setting the width of the
                    > end, not the start.

                    The difference is I'm specifying collapse-with-precedence, not collapse.
                    When I specify border-collapse="collapse", I get Ken's result. When I
                    specify collapse-with-precedence, I get my results.

                    That makes sense to the degree that the "collapse" reflects the pure
                    CSS2 collapse model and I don't think there's any ambiguity about the
                    intepretation of "hidden" for "collapse".

                    However, I still think it's unclear whether or not hidden should always
                    take precedence for "collapse-with-precedence". I think XSL Formatter's
                    implementation is a reasonable one but I can't completely justify it
                    given the words in the spec.

                    Cheers,

                    E.

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

                    1016 La Posada Dr., Suite 240
                    Austin, TX 78752 Phone: 512.656.4139
                  • G. Ken Holman
                    ... I agree ... I ve just tried it with collapse-with-precedence. ... Granted ... we are now singing from the same song sheet. ... What if we looked at 6.7.10
                    Message 9 of 11 , Nov 5, 2002
                    • 0 Attachment
                      At 2002-11-05 17:52 -0600, W. Eliot Kimber wrote:
                      >The difference is I'm specifying collapse-with-precedence, not collapse.
                      >When I specify border-collapse="collapse", I get Ken's result. When I
                      >specify collapse-with-precedence, I get my results.

                      I agree ... I've just tried it with collapse-with-precedence.

                      >That makes sense to the degree that the "collapse" reflects the pure
                      >CSS2 collapse model and I don't think there's any ambiguity about the
                      >intepretation of "hidden" for "collapse".

                      Granted ... we are now singing from the same song sheet.

                      >However, I still think it's unclear whether or not hidden should always
                      >take precedence for "collapse-with-precedence". I think XSL Formatter's
                      >implementation is a reasonable one but I can't completely justify it
                      >given the words in the spec.

                      What if we looked at 6.7.10 as follows?

                      - my observations regarding hidden having precedence are
                      based on behaviours explicitly described under the
                      paragraph starting "If the border-collapse trait is
                      collapse..." and are numbered as to associate those
                      points only with a trait of that value
                      - the preceding paragraph starting "If the border-collapse
                      trait is collapse-with-precedence" explicitly states:
                      "the border for each side of the cell is determined by,
                      for each segment of a border, selecting, from all
                      border specifications for that segment, the border
                      that has the highest precedence."
                      - there is nothing in collapse-with-precedence that has
                      anything to do with style, therefore, all determination
                      is being done with precedence (hence, I suppose, the
                      name!)

                      And that I think is sufficient justification for the XSL Formatter behaviour.

                      Interestingly, I'm now getting some undesirable wrapping of the first cell,
                      but I am getting a border that is not overridden by the hidden.

                      Eliot's test unmodified (but fixed)

                      r1c1 r1c2

                      Eliot's test modified
                      ------
                      r1c1 r1c2 |
                      ------
                      Eliot's test using collapse-with-precedence
                      -------
                      r1c |r1c2 |
                      1 -------

                      All along in this discussion I was thinking of "collapse" and I never
                      considered "collapse-with-precedence", so I apologize for not having even
                      looked at that part of the spec during my writing today.

                      Now I have to add this caveat to page 262 of the book.

                      Thanks, Eliot, for working through this with me. Please let me know if you
                      still have reservations regarding the XSL Formatter behaviour, because I've
                      been convinced by what I cited above (except for the undesirable wrapping).

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

                      <block space-before="20mm">Eliot's test unmodified (but fixed)</block>
                      <table>
                      <table-body>
                      <table-row>
                      <table-cell
                      border-end-precedence="9"
                      border-end-style="hidden"
                      border-end-width="2pt"
                      ><block>r1c1</block></table-cell>
                      <table-cell
                      border-start-precedence="10"
                      border-start-style="solid"
                      border-start-width="2pt"
                      ><block>r1c2</block></table-cell>
                      </table-row>
                      </table-body>
                      </table>

                      <block>Eliot's test modified</block>
                      <table>
                      <table-body>
                      <table-row>
                      <table-cell
                      border-end-precedence="9"
                      border-end-style="hidden"
                      border-end-width="2pt"
                      ><block>r1c1</block></table-cell>
                      <table-cell
                      border-start-precedence="10"
                      border-style="solid"
                      border-start-width="2pt"
                      ><block>r1c2</block></table-cell>
                      </table-row>
                      </table-body>
                      </table>

                      <block>Eliot's test using collapse-with-precedence</block>
                      <table border-collapse="collapse-with-precedence">
                      <table-body>
                      <table-row>
                      <table-cell
                      border-end-precedence="9"
                      border-end-style="hidden"
                      border-end-width="2pt"
                      ><block>r1c1</block></table-cell>
                      <table-cell
                      border-start-precedence="10"
                      border-style="solid"
                      border-start-width="2pt"
                      ><block>r1c2</block></table-cell>
                      </table-row>
                      </table-body>
                      </table>



                      --
                      Upcoming hands-on in-depth XSLT/XPath and/or XSL-FO:
                      - North America: Feb 3 - Feb 7,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
                      Next conference training: 2002-12-08,03-03,06
                    • W. Eliot Kimber
                      ... I think you are correct--I think I was reading precedence in that paragraph in the generic sense (the sense it is meant for collapse ) and not in the
                      Message 10 of 11 , Nov 6, 2002
                      • 0 Attachment
                        G. Ken Holman wrote:

                        >>However, I still think it's unclear whether or not hidden should always
                        >>take precedence for "collapse-with-precedence". I think XSL Formatter's
                        >>implementation is a reasonable one but I can't completely justify it
                        >>given the words in the spec.
                        >
                        >
                        > What if we looked at 6.7.10 as follows?
                        >
                        > - my observations regarding hidden having precedence are
                        > based on behaviours explicitly described under the
                        > paragraph starting "If the border-collapse trait is
                        > collapse..." and are numbered as to associate those
                        > points only with a trait of that value
                        > - the preceding paragraph starting "If the border-collapse
                        > trait is collapse-with-precedence" explicitly states:
                        > "the border for each side of the cell is determined by,
                        > for each segment of a border, selecting, from all
                        > border specifications for that segment, the border
                        > that has the highest precedence."
                        > - there is nothing in collapse-with-precedence that has
                        > anything to do with style, therefore, all determination
                        > is being done with precedence (hence, I suppose, the
                        > name!)
                        >
                        > And that I think is sufficient justification for the XSL Formatter behaviour.

                        I think you are correct--I think I was reading precedence in that
                        paragraph in the generic sense (the sense it is meant for "collapse")
                        and not in the border-*-precedence sense.

                        Thanks, I feel better about this now.

                        Cheers,

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

                        1016 La Posada Dr., Suite 240
                        Austin, TX 78752 Phone: 512.656.4139
                      Your message has been successfully submitted and would be delivered to recipients shortly.