You are viewing a plain text version of this content. The canonical link for it is here.
Posted to j-users@xerces.apache.org by tr...@katamail.com on 2002/03/29 13:04:29 UTC
laxly schema valid
HI ALL,
I think I understand what lax means in the w3c schema spec, i' am able to
strict schema validate, but I'm not sure which features i need to laxly
validate
an element . I set ( in a DOMParser)
parser.setFeature("http://xml.org/sax/features/namespaces",true);
parser.setFeature("http://xml.org/sax/features/validation",true);
parser.setFeature("http://apache.org/xml/features/validation/dynamic",true);
parser.setFeature("http://apache.org/xml/features/validation/schema",true);
parser.setFeature("http://apache.org/xml/features/validation/schema-full-checking",true);
// it dosen't seem to work for xerces 1.4.x nor 2.0.x
parser.setFeature("http://apache.org/xml/features/validation/warn-on-undeclared-elemdef",true);
// it "throws" an error always not a warning
parser.setProperty("http://apache.org/xml/properties/schema/external-schemaLocation",
"http://www.w3.org/2000/09/xmldsig# xmldsig-core-schema.xsd" );
When a parse a file with a not shema-defined element a take a wonderful
SAXPARSException, by the way how to bind this exception with the element ? Or
more general, I'm not sure if I have to write the app that check the element
or if this task is perfomed by the parser simply setting some features that I miss ?
Thanks in advance ! - Bob Trasverso
__________________________________________
Fai i tuoi acquisti su www.kwshopping.it
---------------------------------------------------------------------
To unsubscribe, e-mail: xerces-j-user-unsubscribe@xml.apache.org
For additional commands, e-mail: xerces-j-user-help@xml.apache.org