On Monday 03 March 2008 18:00:30 Michael Glavassevich wrote:
>
> The JAXP 1.3 Validation API is better suited for what you want to do. If
> you use a Schema [1] (created by the SchemaFactory [2]) for validation any
> xsi: schema location hints in your document will be ignored.

Thank you very much, it works :-).

A side note though : having cut'n pasted code code from various validation 
examples gathered around, I had this line  

domFactory.setValidating(true);

in the setting up of my DomFactory. My first try after using setSchema() 
resulted this error, no matter what I tried to parse : SAXParseException: 
Document is invalid: no grammar found.

A bit of googling got me to this mail 
http://marc.info/?l=xerces-j-user&m=112183239206822&w=2 which solved the 
problem.

While I understand that setValidating() is for DTD validation and that it was 
indeed a mistake to have it set, I still find it puzzling that the setting 
was apparently a no-op when used in conjunction with 
setAttribute(JAXP_SCHEMA_SOURCE, schema), but conflicts when used with 
setSchema(schema).

-- 
Guillaume Laurent
OASIS, Inria Sophia-Antipolis
http://www-sop.inria.fr/oasis/

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to