On Thursday, November 14, 2002, at 07:21  AM, Peter Donald wrote:
would this be a startup
process, scan all classloaders for schemas and build a static catalog
or build it on demand as a schema is needed?
I was thinking it would build it as in something like the following

//The next line would register all
//schemas in the current classes classloader
ValidatorFactory vf =
  new ValidatorFactory( getClass().getClassLoader() );

//get validating content handler
//schema uri could be null as could the handler
ContentHandler ch =
  vf.newInstance( "http://relaxng.org/ns/structure/1.0";,
                  new InputSource( mySchema ),
                  myHandler );

... do xml loading as usual ...
... or ...
... convert configuration object to dom/sax and pass through ...

The ValidatorFactory would do all lazy caching and stuff like that.

That make sense?
Getting there :) If the ValidatorFactory finds and regsiters all schemas, what is the 'mySchema' that is passed into the newInstance method? Would we not pass in a hint indicating what we need a schema for (required) as well as an optional schema type (which you have).

My gut would be to make this aspect work on SAX streams only, as wrappers for anything else could be done.

  1) schema discovery
  2) entity resolver using #1
  3) validation API (maybe standardize JARV, or very light wrappers,
since it already does just that. perhaps we could do away with
specifying the schema-type and autodetect based on namespaces?)
+1
(though I would allow for both specifying and autodetection)
kewl. i'll be stuck in an airport for many hours tomorrow, plenty of time to hack.

my only question to you is: what are the autodetection methods that you are thinking of? I saw some notes in the info package commits (i'll have to go back and look further), but would that be the jist of them?
-pete

--
peter royal -> [EMAIL PROTECTED]


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

Reply via email to