[eml-dev] [Bug 3232] - EML parser limitations

bugzilla-daemon at ecoinformatics.org bugzilla-daemon at ecoinformatics.org
Thu Jul 10 12:01:04 PDT 2008


http://bugzilla.ecoinformatics.org/show_bug.cgi?id=3232


mob at icess.ucsb.edu changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |tao at nceas.ucsb.edu




------- Comment #6 from mob at icess.ucsb.edu  2008-07-10 12:01 -------
Hi Jing -
examples from the Walmsley 2002 book are online, but the text is not. My print
copy (Ch 5, p91-92) says that schema-full-checking is the feature that checks
for non-deterministic content models, which is what bug 2054 revealed about
EML2.0.1   

See
http://www.datypic.com/books/defxmlschema/chapter05.html
Here's walmsley's example code:

Example 5-8. Java code to set schema validation in Xerces

SAXParser p=new SAXParser();
try {

// Turn schema validation on
p.setFeature
 ("http://xml.org/sax/features/validation", true);
p.setFeature
 ("http://apache.org/xml/features/validation/schema", true);
p.setFeature
 ("http://apache.org/xml/features/validation/schema-full-checking",
   true);
} catch (SAXException e) {
  System.out.println("error turning on validation");
}




whereas in eml/src/org/ecoinformatics/eml/SAXValidate.java it's like this:
...
   if (schemavalidate) {
        parser.setFeature(
            "http://apache.org/xml/features/validation/schema",
            true);
    }
...

which Walmsley says "allows most schema checking to take place"


BTW, googling for schema-full-checking xerces turned up this index on both the
xerces page and stylus studio (xmlSpy) so maybe that means that spy is using
xerces?
http://xerces.apache.org/xerces2-j/javadocs/xerces2/index-all.html
http://www.stylusstudio.com/api/xerces2/index-all.htm


More information about the Eml-dev mailing list