>Andy Clark wrote:
> I started looking at the code that has been checked into the
> impl.v2.new_datatypes package and I'm having a few problems
> with the code.
Seems as one of the class was missing,so there was compilation problem.
as it has been sent so that problem should be solved. What problems are u facing
except this ?
>Could someone please explain to me what was
> fundamentally wrong with the old interfaces that we needed
> to define completely new ones?
fundamentally no issue but sometime we need to take care of simplicity
and maintainability of the code keeping in mind the extensibility.
Sandy did mention some points when he proposed new simple type design 2-3 weeks
back which seemed pretty valid. As same set of validations were being done in
different datatype validators ,it makes it more prone to errors, complex and
more difficult to maintain. New design handles these problems really well as the
code of handling facets is centalized in the new interfaces. it makes things
simple , easier to maintain and less error prone.
> Reviewing what is currently in Xerces2, checked into the
> impl.v2.datatypes package, we have a datatype validator
> factory interface for creating datatype instances and we
> have a datatype validator interface for doing the actual
> validation of datatype values. By using the factory design
> pattern, we allow different datatype library implementations
> to be used interchangeably by the parser. I see this as a
> good thing. :)
i feel using factory design pattern was the best approach to get
datatype library dynamically ,the way they are doing independent
facet+lexical+valuespace validations.
In the new design things are more simple and clean. Though i initially thought
of providing some kind of interface for built-in and user defined declarations.
But i feel that is not required as we have only one object interface
(XSSimpleTypeDecl) to interact to. We can have separate grammar for built-in
datatype where they can be stored once and reused, if required. In the new
design Facet handling/validatons has been taken off from individual datatypes to
common level (XSSimpleTypeDecl) and individual datatypes (DV classes) take care
of their lexical and valuespace handlings. Interaction with different DV classes
is done through TypeValidator interface. Benefit of this approach is that the
code which was duplicated all over different datatype validators need not be
done.
>One of my goals is that
> the datatype validator implementation will be general
> enough that it can support the union of all of the data-
> types available in DTD and XML Schema grammars.
I don't see any problem why it should not work with DTD. I don't see
difference in the behavior of DTD datatypes as they are subset of Schema
Datatypes. Its an independent component so it can be very well used to support
DTD datatypes as well. But yes we can discuss about it for any issue, if i am
missing any ?
I have seen ur series of mails, and u will get the response very soon.
regards
Neeraj Bajaj
---------------------
Sun Microsystems, inc.
Ph.91-80-2298989 x87425.
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]