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 Taras Tielkes <ta...@info.nl> on 2001/11/07 14:46:47 UTC

SAXParser says it's not validating while underlying XMLReader is

Hi,

It seems that the isValidating() method of the implementation of SAXParser
doesn't query the underlying XMLReader instance.

The following code:
-------------------
SAXParserFactory spf = SAXParserFactory.newInstance();
		
SAXParser sp = spf.newSAXParser();
XMLReader xr = sp.getXMLReader();
		
xr.setFeature("http://xml.org/sax/features/namespaces", true);
xr.setFeature("http://xml.org/sax/features/validation", true);
xr.setProperty(SCHEMA_PROP, schemaFile);

System.out.println("Reader validating: " +
xr.getFeature("http://xml.org/sax/features/validation"));
System.out.println("Parser validating: " + sp.isValidating());
-------------------

will say:
Reader validating: true
Parser validating: false

Is this the intended behaviour?

Thanks,

// tt
		

---------------------------------------------------------------------
To unsubscribe, e-mail: xerces-j-user-unsubscribe@xml.apache.org
For additional commands, e-mail: xerces-j-user-help@xml.apache.org