[jdom-interest] Has anyone considered doing an interface for schema's?

adam flinton aflinton at armature.com
Fri Jul 13 09:12:53 PDT 2001


Dear All,

Considering all the different schema types around (DTD,W3C Schema,
Schematron,Trex etc) has anyone thought about a common interface along the
lines of the JDBC one?

i.e As far as I can see the info contained within a schema is of 2 types:

Structural

Metadata.

e.g. What am I, what children can I have etc are all structural whereas "If
I have a default value what is it?" is metadata.

i.e. I can produce the exact same document via any of the above schema types
(i.e. the output is the same) and at the end of the day the fact that the
doc is produced & is valid is what matters.

This strikes me as so obvious & so in keeping with the J bit of JDOM. 

e.g. lets say I want to create an document which is perfectly valid but
devoid of any "non-default" data by reference to a "pattern" laid out in any
of the above schema types. How would I do this at the moment?

What I'd like to do is in effect to call (pseudo-code)

SchemaHandler h = new SchemaHandler();
h = (SchemaHandler)instantiateClass("SchemaHandler_DTD_implementation");
Element e = h.getRootElement;

etc.

i.e so someone who wants Trex or Schematron handling can write an
implementation etc.



Adam Flinton
Armature Ltd.
Mobile: 0780 3180830
EMail: aflinton at armature.com 



More information about the jdom-interest mailing list