> Thanx for the hint. It was not set to true. Now the following features are
> set:
>
> parser.setFeature( "http://xml.org/sax/features/validation", true );
> parser.setFeature( "http://apache.org/xml/features/validation/schema", true
> );
>
> Still the EntityResolver is not called, but now the validation is done.
> However
> the validation process proclaims about any tag, says it should be defined.
> It
> looks like the xsd file has not been found. Any idea?
u must be setting entity resolver (parser.setEntityResolver( new
yourEntityResolver()).. right !! Now, does your instance document contains any
schemaLocation attribute or noNamespaceSchemaLocation attribute to give hint
about schema file, entityResolver gives you chance to over-ride the location
hint specified using those attributes. If those attributes are not part of your
instance document entity resolver wont be called.
However, if it is not possible for you to modify instance
document (getting it from third party.. ) , xerces provides a way to specify
the
location of schema file externally using "externalSchemaLocation" and
"external-noNamespaceSchemaLocation" properties.
To have more info, refer to..
http://xml.apache.org/xerces2-j/properties.html
--
Neeraj B.
Sun Microsystems, inc.
> > -----Urspr�ngliche Nachricht-----
> > Von: Neeraj Bajaj [mailto:[EMAIL PROTECTED]
> > Gesendet: Mittwoch, 20. Februar 2002 21:26
> > An: [EMAIL PROTECTED]
> > Betreff: Re: EntityResolver problem
> >
> >
> > > <?xml version="1.0" encoding="UTF-8"?>
> > > <FOO xsi:noNamespaceSchemaLocation="file:///D:/foo.xsd"
> > > xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
> > Version="1.09a">
> > >
> > > the EntityResolver gets not called and my xml file is not
> > validated. Do i
> > > miss something here?
> >
> > Shouldn't be like that.. :-) can you provide more information ?
> > is Feature http://apache.org/xml/features/validation/schema
> > turned "true" ?
> >
> > --
> > Neeraj B.
> > Sun Microsystems, inc.
> >
> >
> >
> >
> >
> >
> > ---------------------------------------------------------------------
> > To unsubscribe, e-mail: [EMAIL PROTECTED]
> > For additional commands, e-mail: [EMAIL PROTECTED]
> >
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
>
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]