I may be misunderstanding you, but no we could not do that. The issue is
that we have a validation mechanism that plugs in under the parser, not on
top of it. The reason for this is massive performance improvements.  So the
validators are an abstraction that plugs into the low level scanner, and
does a kind of 'look aside' validation. It doesn't sit on top of the output
methods and work on that information.

At least thats how the C++ version works and I don't think that the Java
version has strayed from this. They might have for the experimental schema
validator stuff that was done, but I would imagine (though I don't want to
put words in their mouths) that they would implement the 'real' schema
validator as a derivative of the base XMLValidator interface, which would
make it a swappable peer of the DTD validator.

They are though completely layered from the scanner. The scanner just
understands an abstraction via which it can pass out data it sees, to have
it validated. It doesn't really know about DTDs or Schemas and such. It
does have to know how they are introduced into the target entity to be
validated, but beyond that, it doesn know or care whether the plugged
invalidator is a schema or DTD or JoeBlow validator really.

The primary reason for this architecture is speed. By having the validator
plug in underneath and to have it operated on via a special abstract API,
the scanner and validator can speak with each other in the same, highly
optimized and abreviated language. If the validation was moved to the top,
and worked via the public APIs, much speed would be lost. This is not to
say that someone cannot write such a 'sit on top' validator if they wanted
to, but the Xerces parsers aren't designed that way. Here again, I'm
speaking for the C++ parser and in the belief that we have not diverged in
this area of the design.

----------------------------------------
Dean Roddey
Software Weenie
IBM Center for Java Technology - Silicon Valley
[EMAIL PROTECTED]



Paul Prescod <[EMAIL PROTECTED]> on 01/13/2000 03:33:54 PM

Please respond to [EMAIL PROTECTED]

To:   "[EMAIL PROTECTED]" <[EMAIL PROTECTED]>
cc:
Subject:  Validator



Will it, in future versions, be possible to use Xerces' XML schemas
validator as a separate component? My problem is that I have multiple
validators competing to be my "parser" and as I recall, XML was designed
to allow a clean split.

I understand how the current situation came about because earlier
versions of the Schema specification were not nicely layerable. I was
one of several who fought hard to reverse that situation and I wonder if
the Xerces team has a plan to take advantage of this change by turning
the validator into just another SAX filter.

Those that do the work make the decisions but please consider this a
feature request from a single  user.

--
 Paul Prescod  - ISOGEN Consulting Engineer speaking for himself
"Remember, Ginger Rogers did everything that Fred Astaire did,
but she did it backwards and in high heels."
                                               --Faith Whittlesey



Reply via email to