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(_at_)nag(_dot_)co(_dot_)uk>
To: <xsl-list(_at_)lists(_dot_)mulberrytech(_dot_)com>
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
--~------------------------------------------------------------------
XSL-List info and archive: http://www.mulberrytech.com/xsl/xsl-list
To unsubscribe, go to: http://lists.mulberrytech.com/xsl-list/
or e-mail: <mailto:xsl-list-unsubscribe(_at_)lists(_dot_)mulberrytech(_dot_)com>
--~--
--~------------------------------------------------------------------
XSL-List info and archive: http://www.mulberrytech.com/xsl/xsl-list
To unsubscribe, go to: http://lists.mulberrytech.com/xsl-list/
or e-mail: <mailto:xsl-list-unsubscribe(_at_)lists(_dot_)mulberrytech(_dot_)com>
--~--