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

Re: [XSL-FO] Left- and right-aligned text on same line?

Expand Messages
  • Rolf Hustad
    A little question from a xml and xsl:fo novice from norway. I`ve following the discussion on left right alignment problems for a while now to see if some one
    Message 1 of 10 , Jan 31, 2001
    View Source
    • 0 Attachment
      A little question from a xml and xsl:fo novice from norway.
      I`ve following the discussion on left right alignment problems for a
      while now to see if some one has had the same problem as me and has
      found a solution to it.
      I`ve tried leaders and tables so far but not to my satisfaciton. My
      problem is as follows:
      I want to make a telephone catalog where I have an element
      "department" which can have zero or more external numbers, zero or more
      internal numbers or ofcourse a combination of those. I am able to get
      the dept name and one of each type of number but not several numbers of
      for instance intnr. example:
      "dept A..................................extnr 1xx..and extnr
      2xx.........intnr xx3..and intnr xx4"
      My dtd is as follows
      <!ELEMENT dept (#PCDATA | extnr | intnr )*>
      <!ATTLIST dept name CDATA #IMPLIED >
      and in the xsl file as follows:

      <xsl:template match="deptnr">
      <fo:table>
      <fo:table-column column-width="80mm"/>
      <fo:table-column column-width="20mm"/>
      <fo:table-column column-width="20mm"/>
      <fo:table-body>
      <fo:table-row>
      <fo:table-cell>
      <fo:block>
      <xsl:value-of select="dept/@name" <mailto:dept/@name>/>
      </fo:block>
      </fo:table-cell>
      <fo:table-cell>
      <fo:block>
      <xsl:value-of select="dept/intnr"/>
      </fo:block>
      </fo:table-cell>
      <fo:table-cell>
      <fo:block text-align="end">
      <xsl:value-of select="dept/extnr"/>
      </fo:block>
      </fo:table-cell>
      </fo:table-row>
      </fo:table-body>
      </fo:table>
      </xsl:template>

      This does the trick for the first element after dept, but not the
      following siblings, how do I get the following siblings to show together
      with the first element? I have been using fop to do the job.

      regards,
      Rolf
    Your message has been successfully submitted and would be delivered to recipients shortly.