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

align=char in cals table model and XSLFO implementation

Expand Messages
  • mina_hurray
    Hi: 1) Can someone please explain the use of align= char attribute at an entry in the cals table? 2) How can this be implemented on XSLFO tables? Thank you
    Message 1 of 4 , Mar 27, 2007
    • 0 Attachment
      Hi:

      1) Can someone please explain the use of align="char" attribute at an
      "entry" in the cals table?

      2) How can this be implemented on XSLFO tables?


      Thank you in advance.
    • G. Ken Holman
      ... Consider a list of numbers in which a decimal point is being used with varying amounts of precision: 1.23 23.456 2.5678 124. 12.1 If you are reading this
      Message 2 of 4 , Mar 27, 2007
      • 0 Attachment
        At 2007-03-27 14:38 +0000, mina_hurray wrote:
        >1) Can someone please explain the use of align="char" attribute at an
        >"entry" in the cals table?

        Consider a list of numbers in which a decimal point is being used
        with varying amounts of precision:

        1.23
        23.456
        2.5678
        124.
        12.1

        If you are reading this email with a monospaced (e.g. Courier) font,
        the decimal points in the above listing all align.

        Reading http://www.oasis-open.org/specs/tm9901.html#AEN578 in section
        3.3.2.6 you would say:

        align="."

        ... to get the above effect.

        >2) How can this be implemented on XSLFO tables?

        If your XSL-FO engine supports text-align="<string>" as specified here:

        http://www.w3.org/TR/2001/REC-xsl-20011015/xslspec.html#text-align

        .... then the text in the table columns will align, so you would use:

        text-align="."

        .... to get the desired effect.

        For example, the following works in Antenna House without error,
        illustrating that a block with text-align="<string>" outside of a
        table cell has no effect, while a block with text-align="<string>"
        aligns all of the blocks in the table cell:

        <flow xmlns="http://www.w3.org/1999/XSL/Format" flow-name="frame-body"
        font-family="Times" font-size="20pt">

        <block text-align=".">10.001%</block>
        <block text-align=".">(.001%)</block>
        <block text-align=".">5.02%</block>
        <block text-align=".">(.2%)</block>

        <table border="solid 1pt">
        <table-body>
        <table-row>
        <table-cell>
        <block text-align=".">10.001%</block>
        </table-cell>
        </table-row>
        <table-row>
        <table-cell>
        <block text-align=".">(.001%)</block>
        </table-cell>
        </table-row>
        <table-row>
        <table-cell>
        <block text-align=".">5.02%</block>
        </table-cell>
        </table-row>
        <table-row>
        <table-cell>
        <block text-align=".">(.2%)</block>
        </table-cell>
        </table-row>
        </table-body>
        </table>
        </flow>

        I hope this helps.

        . . . . . . . . Ken

        --
        World-wide corporate, govt. & user group XML, XSL and UBL training
        RSS feeds: publicly-available developer resources and training
        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)
        Male Cancer Awareness Aug'05 http://www.CraneSoftwrights.com/f/bc
        Legal business disclaimers: http://www.CraneSoftwrights.com/legal
      • mina_hurray
        As usual Mr.Holman, your answer has helped me understand this a lot better. I just have one more question. While authoring any cals table model, if I have to
        Message 3 of 4 , Mar 27, 2007
        • 0 Attachment
          As usual Mr.Holman, your answer has helped me understand this a lot
          better. I just have one more question. While authoring any cals table
          model, if I have to use this attribute the way to do it as I
          understand is:

          <entry align="char" char="."/>
          Even though I do have a text-align attribute on this entry, XEP throws
          an error saying "Attribute text-align cannot have a value "char" "
          As per your explanation, text-align="." should align the decimal
          point, which means that I should be assigning the value of "char" to
          the "text-align" attribute.

          Is this a correct understanding?




          --- In XSL-FO@yahoogroups.com, "G. Ken Holman" <gkholman@...> wrote:
          >
          > At 2007-03-27 14:38 +0000, mina_hurray wrote:
          > >1) Can someone please explain the use of align="char" attribute at an
          > >"entry" in the cals table?
          >
          > Consider a list of numbers in which a decimal point is being used
          > with varying amounts of precision:
          >
          > 1.23
          > 23.456
          > 2.5678
          > 124.
          > 12.1
          >
          > If you are reading this email with a monospaced (e.g. Courier) font,
          > the decimal points in the above listing all align.
          >
          > Reading http://www.oasis-open.org/specs/tm9901.html#AEN578 in section
          > 3.3.2.6 you would say:
          >
          > align="."
          >
          > ... to get the above effect.
          >
          > >2) How can this be implemented on XSLFO tables?
          >
          > If your XSL-FO engine supports text-align="<string>" as specified here:
          >
          > http://www.w3.org/TR/2001/REC-xsl-20011015/xslspec.html#text-align
          >
          > .... then the text in the table columns will align, so you would use:
          >
          > text-align="."
          >
          > .... to get the desired effect.
          >
          > For example, the following works in Antenna House without error,
          > illustrating that a block with text-align="<string>" outside of a
          > table cell has no effect, while a block with text-align="<string>"
          > aligns all of the blocks in the table cell:
          >
          > <flow xmlns="http://www.w3.org/1999/XSL/Format" flow-name="frame-body"
          > font-family="Times" font-size="20pt">
          >
          > <block text-align=".">10.001%</block>
          > <block text-align=".">(.001%)</block>
          > <block text-align=".">5.02%</block>
          > <block text-align=".">(.2%)</block>
          >
          > <table border="solid 1pt">
          > <table-body>
          > <table-row>
          > <table-cell>
          > <block text-align=".">10.001%</block>
          > </table-cell>
          > </table-row>
          > <table-row>
          > <table-cell>
          > <block text-align=".">(.001%)</block>
          > </table-cell>
          > </table-row>
          > <table-row>
          > <table-cell>
          > <block text-align=".">5.02%</block>
          > </table-cell>
          > </table-row>
          > <table-row>
          > <table-cell>
          > <block text-align=".">(.2%)</block>
          > </table-cell>
          > </table-row>
          > </table-body>
          > </table>
          > </flow>
          >
          > I hope this helps.
          >
          > . . . . . . . . Ken
          >
          > --
          > World-wide corporate, govt. & user group XML, XSL and UBL training
          > RSS feeds: publicly-available developer resources and training
          > 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)
          > Male Cancer Awareness Aug'05 http://www.CraneSoftwrights.com/f/bc
          > Legal business disclaimers: http://www.CraneSoftwrights.com/legal
          >
        • G. Ken Holman
          ... Yes, that s what I see in the OASIS specification. ... Yes, something along the lines of text-align= {@char} based on where you have this in your
          Message 4 of 4 , Mar 27, 2007
          • 0 Attachment
            At 2007-03-27 18:46 +0000, mina_hurray wrote:
            >As usual Mr.Holman, your answer has helped me understand this a lot
            >better. I just have one more question. While authoring any cals table
            >model, if I have to use this attribute the way to do it as I
            >understand is:
            >
            ><entry align="char" char="."/>

            Yes, that's what I see in the OASIS specification.

            >Even though I do have a text-align attribute on this entry, XEP throws
            >an error saying "Attribute text-align cannot have a value "char" "
            >As per your explanation, text-align="." should align the decimal
            >point, which means that I should be assigning the value of "char" to
            >the "text-align" attribute.
            >
            >Is this a correct understanding?

            Yes, something along the lines of text-align="{@char}" based on where
            you have this in your stylesheet.

            However, looking at the current XEP Reference of the implementation
            of formatting objects and their properties, this documentation
            explicitly states that a <string> value for text-align= is not implemented:

            http://www.renderx.com/reference.html#ftn.d0e2417

            So I don't think you are going to have any luck even if you do make
            your change to the stylesheet.

            In your earlier message you did not mention which formatter you were
            using ... the example I gave you works with Antenna House ... had you
            mentioned you were using XEP then a review of the implementation
            documentation would have answered this earlier.

            I hope this helps, though it seems it may not be what you were looking for.

            . . . . . . . . . . Ken


            --
            World-wide corporate, govt. & user group XML, XSL and UBL training
            RSS feeds: publicly-available developer resources and training
            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)
            Male Cancer Awareness Aug'05 http://www.CraneSoftwrights.com/f/bc
            Legal business disclaimers: http://www.CraneSoftwrights.com/legal
          Your message has been successfully submitted and would be delivered to recipients shortly.