Re: Re: [xsl] Collation for dotted decimal?

Subject: Re: Re: [xsl] Collation for dotted decimal?
From: Dimitre Novatchev <dnovatchev@xxxxxxxxx>
Date: Wed, 8 Feb 2006 06:14:48 +1100
> > What I understand this to do is to select the shortest dotted-decimal in
the document,
> er, I think that's a bug, should be longest (change 1 to last())

yes, and I missed

So, once again the code (corrected):

<xsl:stylesheet version="2.0"
   <xsl:output indent="yes"/>

   <xsl:template match="x">
     <xsl:variable name="vPattern">
       <xsl:for-each select="*">
         <xsl:sort select="string-length(.) order="descending""/>
           <xsl:if test="position() = 1">
             <xsl:sequence select="translate(.,'123456789.', '000000000')"/>
   <xsl:perform-sort select="*">
     <xsl:sort select="string-join(for $i in tokenize(.,'\.') return

Dimitre Novatchev
The significant problems we have cannot be solved at the same level of
thinking with which we created them.

Current Thread