xom-interest AT lists.ibiblio.org
Subject: XOM API for Processing XML with Java
List archive
Re: [XOM-interest] XSD Schema and Validation problems
- From: peter murray-rust <pm286 AT cam.ac.uk>
- To: Elliotte Harold <elharo AT metalab.unc.edu>
- Cc: 'xom-interest' <xom-interest AT lists.ibiblio.org>
- Subject: Re: [XOM-interest] XSD Schema and Validation problems
- Date: Mon, 19 Dec 2005 14:17:53 +0000
At 13:09 19/12/2005, Elliotte Harold wrote:
peter murray-rust wrote:
[Note - I do not like the idea of adding schema references within the XML instance but it seems to be one of the current ways of using XSD. I do not actually like XSD at all, but feel that I am constrained to use it - it solves ca 10% of validation problems in chemistry. Schematron adds somewhat more but ultimately we need much more expressive semantics.]
I suspect you need a custom type library and RELAX NG to really handle this use case. See http://www-128.ibm.com/developerworks/java/library/x-custyp/
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 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.
...
<erh>
This error message comes from Xerces. See http://issues.apache.org/jira/browse/XERCESJ-1124 which I just filed. However your specific problem (50% certainty) is using a FileReader. Don't do that. FileReaders don't know where they came from and thus cannot resolve relative URLs. Plus they're more likely to get the encoding wrong than right. Instead try this:
</erh>
Thanks for this - it sounds a promising diagnosis.
P.
--
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
Peter Murray-Rust
Unilever Centre for Molecular Sciences Informatics
University of Cambridge,
Lensfield Road, Cambridge CB2 1EW, UK
+44-1223-763069
-
Re: [XOM-interest] Error output stream,
Elliotte Harold, 12/18/2005
-
[XOM-interest] XSD Schema and Validation problems,
peter murray-rust, 12/19/2005
-
Re: [XOM-interest] XSD Schema and Validation problems,
Elliotte Harold, 12/19/2005
-
Re: [XOM-interest] XSD Schema and Validation problems,
peter murray-rust, 12/19/2005
-
Re: [XOM-interest] XSD Schema and Validation problems,
Elliotte Harold, 12/19/2005
-
Re: [XOM-interest] XSD Schema and Validation problems,
Tatu Saloranta, 12/19/2005
- Re: [XOM-interest] XSD Schema and Validation problems, Wolfgang Hoschek, 12/19/2005
-
Re: [XOM-interest] XSD Schema and Validation problems,
Tatu Saloranta, 12/19/2005
-
Re: [XOM-interest] XSD Schema and Validation problems,
Elliotte Harold, 12/19/2005
-
Re: [XOM-interest] XSD Schema and Validation problems,
peter murray-rust, 12/19/2005
-
Re: [XOM-interest] XSD Schema and Validation problems,
Elliotte Harold, 12/19/2005
- Re: [XOM-interest] XSD Schema and Validation problems, peter murray-rust, 12/19/2005
-
Re: [XOM-interest] XSD Schema and Validation problems,
Steve Loughran, 12/19/2005
-
Message not available
- Re: [XOM-interest] XSD Schema and Validation problems, peter murray-rust, 12/19/2005
-
Message not available
- Re: [XOM-interest] XSD Schema and Validation problems, Elliotte Harold, 12/19/2005
-
Re: [XOM-interest] XSD Schema and Validation problems,
Elliotte Harold, 12/19/2005
- Re: [XOM-interest] XSD Schema and Validation problems, Wolfgang Hoschek, 12/19/2005
-
[XOM-interest] XSD Schema and Validation problems,
peter murray-rust, 12/19/2005
Archive powered by MHonArc 2.6.24.