You are viewing a plain text version of this content. The canonical link for it is here.
Posted to j-dev@xerces.apache.org by "Morealli, Lori" <mo...@ctc.com> on 2002/06/13 23:22:14 UTC

Instantiating DOM parser with an XMLParserConfiguration file

Sorry, I'm posting an addendum to my last post in order to clarify what I'm
asking ...

A configuration file has already been written as an XNI sample
(xerces-2_0_1\samples\xni\parser\NonValidatingParserConfiguration.java) to
create a non-validating parser.

My problem:  I'm trying to write a configuration file that extends
org.apache.xerces.parsers.StandardParserConfiguration to configure the
parser for validation against a schema.  I want to pass this configuration
file into the DOM constructor.  This is all similar to the XNI sample above.
I'm having troubles on the way.   

My configuration file compiles and I'm able to obtain the DOM in memory, but
the XML instance being inputted is not being validated against the schema.
Can anybody offer me any advice to get over this barrier?

Thanks

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


Re: Instantiating DOM parser with an XMLParserConfiguration file

Posted by Elena Litani <el...@ca.ibm.com>.
"Morealli, Lori" wrote:
> My problem:  I'm trying to write a configuration file that extends
> org.apache.xerces.parsers.StandardParserConfiguration to configure the
> parser for validation against a schema. 

When you say "a schema" do you mean XML Schema?
If so, StandardParserConfiguration is already configured to include the
XMLSchemaValidator in the pipeline.
The validator is included if you turn on validation and
validation/schema features as suggested by Joe.

Thx,
-- 
Elena Litani / IBM Toronto

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