I did try "[0-9]{1,10}", that did not work either.  For this case, there are other solutions to get around it, but my main concern is why the regular _expression_ failed, seems it only compare the substring of the content instead of the entire content.  I found the following in the Xerces API Doc regarding the RegularExpression class with option "X", 
"X"
By this option, the engine confoms to XML Schema: Regular _expression_. The match() method does not do subsring matching but entire string matching.
 
I also found the follwoing in the AbstractNumericFacetValidator.java file, line 112 and 113.  It indeed pass the "X" option, but somehow it does not work.  May be someon in the Xerces development group has the answer.
                        if ( fPattern != null )
                            fRegex = new RegularExpression(fPattern, "X" );
 
Thanks,
Benson.

-----Original Message-----
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]
Sent: Wednesday, October 17, 2001 7:50 AM
To: xerces-j-user
Subject: Re: AW: Schema - regular _expression_ question


Did you try  "[0-9]{1,10}"?

vlad


Please respond to xerces-j-user <[EMAIL PROTECTED]>

To:        "'[EMAIL PROTECTED]'" <[EMAIL PROTECTED]>
cc:        

Subject:        AW: Schema - regular _expression_ question

Dear Benson Cheng,

what about deriving your new Quantity-Type
from xsd:string ?
Best regards,

Andr� Mengel

> -----Urspr�ngliche Nachricht-----
> Von: Benson Cheng [mailto:[EMAIL PROTECTED]
> Gesendet: Dienstag, 16. Oktober 2001 22:55
> An: '[EMAIL PROTECTED]'
> Betreff: RE: Schema - regular _expression_ question
>
>
> I tried that, but <xsd:minLength> and <xsd:maxLength> are not
> allowed for
> type of "double".
>
> Thanks,
> Benson.
>
> -----Original Message-----
> From: Bob Schloss [mailto:[EMAIL PROTECTED]
> Sent: Tuesday, October 16, 2001 1:47 PM
> To: [EMAIL PROTECTED]
> Subject: Re: Schema - regular _expression_ question
>
>
>
> Try <xsd:minLength value="1"/> <xsd:maxLength value="10"/>
> and see if it
> works that way.
>
> Bob
>
> Bob Schloss
> Extensible Technologies group
> IBM T. J. Watson Research Center
> Yorktown Heights, New York, USA
>
>
> Benson Cheng <[EMAIL PROTECTED]> on 10/16/2001 04:31:50 PM
>
> Please respond to [EMAIL PROTECTED]
>
> To:   [EMAIL PROTECTED]
> cc:
> Subject:  Schema - regular _expression_ question
>
>
>
> Hi All,
>
> I have a regular _expression_ qeustion in Xerces 1.4.3, in the following
> piece
> of the schema I want define the "Quantity" element as a
> double but only
> allow 1 to 10 digits.  But for some reason the parser does
> not throw an
> error for the value of "100000000000000", does anyone know
> how should I
> define this kind of the schema.
>
> <xsd:element   name="Quantity">
>      <xsd:simpleType>
>           <xsd:restriction base="xsd:double">
>                <xsd:pattern value="\d{1,10}"/>
>           </xsd:restriction>
>      </xsd:simpleType>
> </xsd:element>
>
> Thanks,
> Benson.
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
>
>
>
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
>

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to