Sandy Gao wrote:-
> In Xerces1, similar code of handling facets is copied all over the datatype
> classes. So there was lots of redundant code and made it difficult to
> maintain.

Yes.. I have checked that.

> So the basic idea of the redesign is to separate "facets" from various
> datatype classes. A new XSSimpleTypeDecl class will be introduced (to
> replace the old DatatypeValidator interface), which handles all facets:
> check the validity of the facets and validate strings against the facets.

The attached file (XSSimpleTypeDecl ) gives a picture that we are not keeping 
any registry either for built-in or User-derived datatypes. An static array is 
used to keep the references of basic types. For derived types, we will use that 
array with facets defined which will return an compiled object. 

I am seeing good use of memory, but a performance lack (not much).

> There will still be many DV classes to do the special handling of each
> type. (StringDV, DecimalDV, etc., which all implements the same
> TypeValidator interface.)
> 
> Other changes include:
> - Not throw exception from the constructor of XSSimpleTypeDecl, so that a
> simpleType decl will be created even if there if an error.

It is not making much sense to me. Can you be more descriptive?

> - The facets passed to XSSimpleTypeDecl are stored in an array instead of a
> hashtable. This is supposed to be more efficient.

Good point..

> - XSSimpleType.validate() will return compiled form of the value. For
> example, if the type is decimal (or a type derived from decimal), the
> validate() method will return a BigDecimal object.

mentioned above.

Cheers

Gopal
-----------------------
SUN Microsystems, India


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

Reply via email to