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

grouping...

Expand Messages
  • notable17
    given the following example, I d like a way to create two tables, one with a table header that groups all together and one table below it with a
    Message 1 of 3 , Jun 12, 2003
    • 0 Attachment
      given the following example, I'd like a way to create two tables, one
      with a table header that groups all <messages> together and one table
      below it with a table header that groups all <substitutions>.
      Currently my fo will read down the xml and create a new table with
      header for the first messages node and then create a new table for
      the substitutions node and then create yet another table for the next
      messages node. Any help would be greatly appreciated.

      column1 column2
      -----------------------------------------
      message f name message l name <---(table header)
      Bob Smith
      Tom Johnson
      John Doe

      ---------- end first table --------------


      column1 column2
      ----------------------------------------------
      substitution f name substitution l name <---(table header)
      Mary Smith
      Judy Johnson


      <dp category="cat1">
      <messages>
      <mn>
      <firstname>First</firstname>
      <lastname>First</lastname>
      </mn>
      </messages>
      <substitutions>
      <ms>
      <firstname>First</firstname>
      <lastname>First</lastname>
      </ms>
      <ms>
      <firstname>First</firstname>
      <lastname>First</lastname>
      </ms>
      </substitutions>
      <messages>
      <mn>
      <firstname>First</firstname>
      <lastname>First</lastname>
      </mn>
      <mn>
      <firstname>First</firstname>
      <lastname>First</lastname>
      </mn>
      <mn>
      <firstname>First</firstname>
      <lastname>First</lastname>
      </mn>
      </messages>
      </dp>
    • G. Ken Holman
      ... It sounds from your evidence as if you are trying create the table in the processing of and ... which isn t what you want. Move
      Message 2 of 3 , Jun 12, 2003
      • 0 Attachment
        At 2003-06-12 17:00 +0000, you wrote:
        >given the following example, I'd like a way to create two tables, one
        >with a table header that groups all <messages> together and one table
        >below it with a table header that groups all <substitutions>.
        >Currently my fo will read down the xml and create a new table with
        >header for the first messages node and then create a new table for
        >the substitutions node and then create yet another table for the next
        >messages node.

        It sounds from your evidence as if you are trying create the table in the
        processing of <messages> and <substitutions> ... which isn't what you want.

        Move your <table> and <table-body> creation to the processing of <dp> and
        then produce a <table-row> for each <mn> or <ms>, putting <firstname> into
        the first <table-cell> and <lastname> into the second <table-cell>.

        One is not obliged to create the entire table contents in a single template
        ... structure your template processing such that you have control over
        where the tables are started and then where they are filled.

        I hope this helps.

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


        --
        Upcoming hands-on courses: (registration still open!)
        - (XSLT/XPath and/or XSL-FO) North America: June 16-20, 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-11-X Practical Formatting Using XSL-FO
        Member of the XML Guild of Practitioners: http://XMLGuild.info
        Male Breast Cancer Awareness http://www.CraneSoftwrights.com/f/bc
      Your message has been successfully submitted and would be delivered to recipients shortly.