View Single Post
  #1 (permalink)  
Old January 5th, 2010, 09:36 AM
bonekrusher bonekrusher is offline
Friend of Wrox
Points: 1,676, Level: 16
Points: 1,676, Level: 16 Points: 1,676, Level: 16 Points: 1,676, Level: 16
Activity: 0%
Activity: 0% Activity: 0% Activity: 0%
 
Join Date: Jul 2006
Location: , , .
Posts: 430
Thanks: 28
Thanked 5 Times in 5 Posts
Send a message via Yahoo to bonekrusher
Default Sorting by Roman Numerals

Hi,

Is it possible to sort by roman numeral?

Suppose my xml is:
Code:
<part title="PAPERS" chapter="CHAPTER II/>
<part title="PAPERS" chapter="CHAPTER I/>
<part title="PAPERS" chapter="CHAPTER III/>
<part title="PAPERS" chapter="CHAPTER IV/>
Xslt Fragment:
Code:
<xsl:for-each-group select="part" group-by="@chapter">
            <xsl:sort select="current-grouping-key()" case-order="upper-first" order="ascending" data-type="text"/>
This will result as

Code:
CHAPTER III
CHAPTER II
CHAPTER I
CHAPTER IV
Desired Result:
Code:
CHAPTER I
CHAPTER II
CHAPTER III
CHAPTER IV
Thanks for the help.
Reply With Quote