[relaxng-user] Jing api

Bob Foster bob at objfac.com
Thu Jan 13 11:02:56 ICT 2005


Andrew Welch wrote:
 >>If you must, you can invoke Jing by reading how JC does it and doing
 >>likewise. The following method is an example. It will either check a
 >>schema and/or use it to validate an instance. Please excuse
 >>the mystery
 >>classes; if their function isn't apparent, ask.
[example snipped]
 >
 > Thanks for the example - that's exactly what I needed, but I'm puzzled
 > by 'if you must' and the 'awful kludge' comment:  aren't we meant to use
 > the api?  How else does everyone validate against RNG in their apps?

As you know, Kohsuke and I and no doubt others have found ways of 
invoking RNG at the object level, but I'm not sure the ways amount to an 
API. An API is really more a matter of intent, so you'd have to ask 
James Clark if any of the ways of calling jing internally are intended 
to be API.

One of the issues, IIRC, is that setting an entityresolver doesn't work 
100% in jing because of some classloading tricks it plays. I had to hack 
the code. If what I was calling was API, I'd have a reasonable 
expectation such problems would be fixed.

Bob

 > This is a strange stumbling block on the road of RNG elightenment, up
 > until now everything has been fantastic...



More information about the relaxng-user mailing list