xml-general mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Neeraj Bajaj <Neeraj.Ba...@Sun.COM>
Subject Re: BUG in JAXP-Xerces?
Date Wed, 05 Feb 2003 08:24:25 GMT
Jan Les wrote:
> I'm using the following code:
> 
> ....
> documentFactory.DocumentBuilderFactory.newInstance();
> documentFactory.setAttribute(schemaLanguage, schemaNamespace);
> documentFactory.setValidating(validate);
> ....
> 
> 
> I keep reference to a document builder factory, and when I need to to create 
non-validating parser I simply call documentFactory.setValidating(false) before 
creating document builder.
> When I need to create a validating parser I call 
documentFactory.setValidating(true) before creating document builder.
> 
> This worked fine with previous releases of Xerces.
> 
> When using with Xerces 2.3.0 an error is generated when parsing with
> non-validating parser. The error referes to not defined root element, so even 
if 
> validate is set to false, parser looks for a schema.
> 
> Why is so? 
> I assume that this is because documentFactory has set schemaLanguage, and 
schemaNamespace attributes. I could not reset these attributes.  Can I do this? 
Any advice?

Set the attribute value to "null".


Neeraj


---------------------------------------------------------------------
In case of troubles, e-mail:     webmaster@xml.apache.org
To unsubscribe, e-mail:          general-unsubscribe@xml.apache.org
For additional commands, e-mail: general-help@xml.apache.org


Mime
View raw message