W3C home > Mailing lists > Public > xmlschema-dev@w3.org > August 2002

RE: Hex Expression

From: Bill de hÓra <dehora@eircom.net>
Date: Thu, 8 Aug 2002 20:44:44 +0100
To: "'Michael Rossi'" <mrossi@csc.com>, <xmlschema-dev@w3.org>
Message-ID: <000601c23f14$0c360d80$887ba8c0@mitchum>


> [mailto:xmlschema-dev-request@w3.org] On Behalf Of Michael Rossi
>
> I'm trying to model a type for a 16-digit Hex number. Simple, 
> right? So I use a restriction of string with the pattern 
> "([0-9][a-f][A-F]){16}". Yet when I try to validate an 
> instance containing the number: 0000000478A3200F, XML Spy 
> (v4.4) complains that the value doesn't match the pattern. 
> Anyone know what I'm missing?

I'm not much on Scheme regexes, but I'm guessing you want something like
this:

	"([0-9a-fA-F]){16}"

ie, the ([][][]){} construct implies an ordering.

regards,
Bill de hÓra
Received on Thursday, 8 August 2002 15:45:24 GMT

This archive was generated by hypermail 2.2.0+W3C-0.50 : Tuesday, 11 January 2011 00:14:34 GMT