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

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

Expand Messages
  • 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 1 of 11 , Nov 5 1:51 PM
      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 2 of 11 , Nov 5 3:30 PM
        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 3 of 11 , Nov 5 3:40 PM
          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 4 of 11 , Nov 5 3:52 PM
            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 5 of 11 , Nov 5 4:30 PM
              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 6 of 11 , Nov 6 7:03 AM
                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.