Skip to Content.
Sympa Menu

xom-interest - Re: [XOM-interest] XSD Schema and Validation problems

xom-interest AT lists.ibiblio.org

Subject: XOM API for Processing XML with Java

List archive

Chronological Thread  
  • From: Elliotte Harold <elharo AT metalab.unc.edu>
  • To: peter murray-rust <pm286 AT cam.ac.uk>
  • Cc: 'xom-interest' <xom-interest AT lists.ibiblio.org>
  • Subject: Re: [XOM-interest] XSD Schema and Validation problems
  • Date: Mon, 19 Dec 2005 09:34:14 -0500

peter murray-rust wrote:

Many thanks - I think this is very close to my current approach which is to subclass every element at add the constraints in Java. You are starting to convince me that I should refactor to RELAX-NG - (how) does XOM support this - is it likely to be less problematic than Xerces? My schema is extensive but simple and modular - all elements, attributes and types are in separate xsd:* elements so I hope it should be easy to transform it to RELAX-NG in an automatic manner.


I should add that the RELAX NG approach only works for simple types. There's no current support for writing Java code to verify complex types, though if you had a use case the RELAX NG folks might consider it.

XOM currently has no built-in support for RELAX NG. It's definitely something I'd consider if there were a demand for it. So far I've had other priorities, and no one's asked for RELAX NG. I'm not sure if it's possible to easily tie it to the SAX XMLReader and just have XOM pick it up like it does with W3C schemas or not.

I hope this isn't off-topic (if so please mail separately), but my design includes the use of extensive dictionaries (perhaps with 1000 or more terms) all of which can be turned into schema-elements. There is a core of objects (ca 100) that serve the most straightforward cases and the others (for example a 4th rank tensor) are assembled on demand from (currently) XSD-like code in the dictionaries. It might make sense for this to use RELAX-NG instead.

Perhaps. I'm really not sure. It might be worth asking the RELAX mailing list.

--
´╗┐Elliotte Rusty Harold elharo AT metalab.unc.edu
XML in a Nutshell 3rd Edition Just Published!
http://www.cafeconleche.org/books/xian3/
http://www.amazon.com/exec/obidos/ISBN=0596007647/cafeaulaitA/ref=nosim




Archive powered by MHonArc 2.6.24.

Top of Page