[XSLT] select strings in reverse two by two

Discussion in 'XML' started by jag, Apr 21, 2008.

  1. jag

    jag

    Joined:
    Apr 21, 2008
    Messages:
    1
    Hi ppl,

    I have a xml document with:
    <georss:line> latitude longitude latitude longitude </georss:line> and i want the same but in reverse order, two by two, latitude and longitude switched:
    <line>longitude, latitude, longitude, latitude </line>

    <xsl:for-each select="tokenize(normalize-space(georss:line),' '))">
    <xsl:value-of select="."/>,
    </xsl:for-each>

    My inicial thought was two create two params, pair and latitude and save the latitude and test when it was pair. XSLT give me errors that i couldn't xsl:param must be immediately within a template, function or stylesheet

    then i found out that there was for-each-group and tried to group two by two but i don't know how.

    How can i do it?

    Thanks,
    jag
    jag, Apr 21, 2008
    #1
    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. dogbite
    Replies:
    4
    Views:
    679
    osmium
    Oct 10, 2003
  2. thrill5
    Replies:
    3
    Views:
    16,139
    Jeff Higgins
    May 14, 2006
  3. Ben

    Strings, Strings and Damned Strings

    Ben, Jun 22, 2006, in forum: C Programming
    Replies:
    14
    Views:
    733
    Malcolm
    Jun 24, 2006
  4. Victor B. Gonzalez
    Replies:
    5
    Views:
    293
    Bruno Desthuilliers
    Oct 17, 2007
  5. palmiere
    Replies:
    1
    Views:
    384
    Erwin Moller
    Feb 9, 2004
Loading...

Share This Page