[XSL-LIST Mailing List Archive Home]
[By Thread]
[By Date]
I got the moan you talked about (my understanding of regex is quite limited) so I looked at Chapter 11 in Kay's XPath 2.0 and found an alteration of it that worked:
'^0*'
as did your revised suggestion
'^ *0+'.
I assume your revised expression removes any whitespace in front of the leading zero, so I am using it rather than the one I came up with.
As for your suggestion about altering the collation [I do use Saxox 8 .NET], Michael Kay suggested a long time ago a collation that solved some other much more serious issues, so I dare not change from his earlier suggestion.
Again, thanks for the prompt responses from you and Florent Georges. What a helpful and useful list this is!
Mark
----- Original Message ----- From: "David Carlisle" <davidc@xxxxxxxxx>
To: <xsl-list@xxxxxxxxxxxxxxxxxxxxxx>
Sent: Monday, August 21, 2006 10:01 AM
Subject: Re: [xsl] Eliminating leading zeros
Re: [xsl] Eliminating leading zeros
Subject: Re: [xsl] Eliminating leading zeros From: "Mark Wilson" <drmark@xxxxxxxxxxxxxxx> Date: Mon, 21 Aug 2006 10:28:03 -0400 |
I got the moan you talked about (my understanding of regex is quite limited) so I looked at Chapter 11 in Kay's XPath 2.0 and found an alteration of it that worked:
'^0*'
as did your revised suggestion
'^ *0+'.
I assume your revised expression removes any whitespace in front of the leading zero, so I am using it rather than the one I came up with.
As for your suggestion about altering the collation [I do use Saxox 8 .NET], Michael Kay suggested a long time ago a collation that solved some other much more serious issues, so I dare not change from his earlier suggestion.
Again, thanks for the prompt responses from you and Florent Georges. What a helpful and useful list this is!
Mark
----- Original Message ----- From: "David Carlisle" <davidc@xxxxxxxxx>
To: <xsl-list@xxxxxxxxxxxxxxxxxxxxxx>
Sent: Monday, August 21, 2006 10:01 AM
Subject: Re: [xsl] Eliminating leading zeros
Yes I am using XSLT2 (albeit very poorly understood). Will try your suggestion.
if you do change the second * to a + otherwise it will moan at you that the pattern matches a zero length string.
david
Current Thread |
---|
|
<- Previous | Index | Next -> |
---|---|---|
Re: [xsl] Eliminating leading zeros, David Carlisle | Thread | RE: [xsl] Eliminating leading zeros, Michael Kay |
Re: [xsl] Eliminating leading zeros, andrew welch | Date | RE: [xsl] Eliminating leading zeros, Michael Kay |
Month |
Keywords