XSLT: Split into multiple columns

Discussion in 'XML' started by Gary Johnson, Dec 10, 2003.

  1. Gary Johnson

    Gary Johnson Guest

    I am wanting to create an HTML table using XSLT that looks like: -

    -------------
    | A | B | C |
    -------------
    | D | E | F |
    -------------
    | G | H | |
    -------------

    based on some XML that looks like:

    <items>
    <item>A</item>
    <item>B</item>
    <item>C</item>
    <item>D</item>
    <item>E</item>
    <item>F</item>
    <item>G</item>
    <item>H</item>
    </items>

    .... and (as you can probably guess from the fact I am writing this!) I
    can't work out how to do it. Anyone got any ideas?

    Many thanks
    G
     
    Gary Johnson, Dec 10, 2003
    #1
    1. Advertising

  2. Re: Split into multiple columns

    http://www.topxml.com/code/default.asp?p=3&id=v20020514091249


    =====
    Cheers,

    Dimitre Novatchev.
    http://fxsl.sourceforge.net/ -- the home of FXSL


    "Gary Johnson" <> wrote in message
    news:...
    > I am wanting to create an HTML table using XSLT that looks like: -
    >
    > -------------
    > | A | B | C |
    > -------------
    > | D | E | F |
    > -------------
    > | G | H | |
    > -------------
    >
    > based on some XML that looks like:
    >
    > <items>
    > <item>A</item>
    > <item>B</item>
    > <item>C</item>
    > <item>D</item>
    > <item>E</item>
    > <item>F</item>
    > <item>G</item>
    > <item>H</item>
    > </items>
    >
    > ... and (as you can probably guess from the fact I am writing this!) I
    > can't work out how to do it. Anyone got any ideas?
    >
    > Many thanks
    > G
     
    Dimitre Novatchev, Dec 10, 2003
    #2
    1. Advertising

  3. Gary Johnson

    Baldo Guest

    Re: Split into multiple columns

    > > -------------
    > > | A | B | C |

    > -------------
    > > | D | E | F |

    > -------------
    > > | G | H | |
    > > -------------
    > >
    > > based on some XML that looks like:
    > >
    > > <items>
    > > <item>A</item>
    > > <item>B</item>
    > > <item>C</item>
    > > <item>D</item>
    > > <item>E</item>
    > > <item>F</item>
    > > <item>G</item>
    > > <item>H</item>
    > > </items>
    > >
    > > ... and (as you can probably guess from the fact I am writing this!) I
    > > can't work out how to do it. Anyone got any ideas?


    try with position() or mod() functions
     
    Baldo, Dec 11, 2003
    #3
  4. Gary Johnson

    Baldo Guest

    > ... and (as you can probably guess from the fact I am writing this!) I
    > can't work out how to do it. Anyone got any ideas?


    use position() function (and "mod" math function)
     
    Baldo, Dec 16, 2003
    #4
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. SL_McManus

    Want to split a file into columns

    SL_McManus, Oct 1, 2003, in forum: Perl
    Replies:
    2
    Views:
    523
    Jim Gibson
    Oct 2, 2003
  2. Willempie
    Replies:
    2
    Views:
    494
    Kevin Spencer
    Mar 1, 2005
  3. =?Utf-8?B?RGF2ZQ==?=

    Split datagrid into newspaper-style columns?

    =?Utf-8?B?RGF2ZQ==?=, Mar 16, 2006, in forum: ASP .Net
    Replies:
    5
    Views:
    2,693
    =?Utf-8?B?RWx0b24gVw==?=
    Mar 18, 2006
  4. Replies:
    2
    Views:
    724
    Henry S. Thompson
    Oct 19, 2005
  5. Cristian
    Replies:
    6
    Views:
    14,929
    Bergamot
    Apr 11, 2008
Loading...

Share This Page