Hello:
Here are the forces:
- there are many types of schemas: DTD, RelaxNG, Schematron, XML-Schema
- the changes any given processor library will implement *all four* are
virtually nil
- DTD is different b/c it is mentioned in the document, the others are
linked externally
These forces are leading me towards creating four small Zope classes:
DTDValidator, RelaxNGValidator, SchematronValidator, XMLSchemaValidator.
== or ==
we will have a complex property management page in the ZMI.
It will have to list all of the available *combinations* of
schema types and processors:
<choose one>
4suite DTD
4Suite RelaxNG
Libxslt DTD
Libxslt XML-Schema
Sablotron DTD
Or we do a fancy UI with Javascript with two seperate menus that
respond to each other dynamically. That is not in keeping with the
standard ZMI look and feel.
Also, we need a field for the "Schema Object ID" *only* if it is
not a DTD.
yuk.
The alternative is four small classes. Problem is in Zope2 inheritance
is broken, so we can't create a Validator base class, right? IIRC
this is because of the fact that Zope2 uses a special base class
for persistence written in C that does not obey all of the normal
Python rules wrt inheritance. Of course, we could create a Validator
interface and put the shared methods there....
Thoughts?
--Craeg
|