You are viewing a plain text version of this content. The canonical link for it is here.
Posted to j-dev@xerces.apache.org by Jeffrey Rodriguez <je...@hotmail.com> on 2000/06/22 21:56:57 UTC
Re: No validation performed with recurringDuration and its derived types
Mr. Fernandez,
I am currently working on getting the implementation of the date/time
validators.
Regular expression are only being used on the Pattern facet.
So if you have a Pattern facet it will use the regular expression
parser.
The implementation that I am working uses SimpleDateFormat.
I will post them within the next couple of days.
Thanks,
Jeffrey Rodriguez
>From: Antonio Menchero Fernández <am...@aqs.es>
>Reply-To: xerces-j-dev@xml.apache.org
>To: xerces-j-dev@xml.apache.org
>Subject: No validation performed with recurringDuration and its derived
>types
>Date: Thu, 22 Jun 2000 13:18:07 +0200
>
>I cannot get validation of recurringDuration and its derived types
>(timeInstant, date) work. In fact, no validation is performed.
>
>Checking RecurringDurationDatatypeValidator validate() method, it seems a
>pattern is expected to check validity using a RegularExpression object. But
>in DatatypeFactoryImpl initializeRegistry(), when
>RecurringDurationDatatypeValidator is associated with 'recurringDuration'
>type (or derived types) no pattern is passed along. Perhaps it could be
>done as with 'language' type in the same method, passing a hashtable with
>ELT_PATTERN key and the corresponding pattern. A possible work around is
>defining a xsd:pattern facet in the schema for the attribute, but though a
>pattern could be defined, what about checking e.g. that a valid number of
>days for a month has been defined or other more complex questions with
>dates?.
>
>I have a method to instantiate an object of the corresponding class given
>an attribute xml type and its value (of course value as a string) and it's
>a matter of convenience that RecurringDurationDatatypeValidator validation
>mechanism and DateFormat parsing are in some sense synchronized.
>
>I see some commented code that invokes normalizeInstant() which in turn
>builds a Calendar. I'm just wondering if DateFormat (SimpleDateFormat)
>parsing capabilities could have been used directly to implement
>RecurringDurationDatatypeValidator instead of
>regular expressions.
>
>Looking forward your comments. Thanks.
>
>Antonio
>
>[Working with last Xerces release in CVS.]
>
>
>---------------------------------------------------------------------
>To unsubscribe, e-mail: xerces-j-dev-unsubscribe@xml.apache.org
>For additional commands, e-mail: xerces-j-dev-help@xml.apache.org
>
________________________________________________________________________
Get Your Private, Free E-mail from MSN Hotmail at http://www.hotmail.com