[XSLT] select strings in reverse two by two

jag

Joined
Apr 21, 2008
Messages
1
Reaction score
0
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
 

Ask a Question

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

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,744
Messages
2,569,483
Members
44,901
Latest member
Noble71S45

Latest Threads

Top