Hi,
My load grammar function fails when I return NULL from my own entity
resolver class and  xmlri->getResourceIdentifierType() is
XMLResourceIdentifier::ExternalEntity and I had disabled the
fgXercesDisableDefaultEntityResolution.

Thanks.
Regards,
Umesh  
On Tue, 2007-05-29 at 12:11 +0200, Alberto Massari wrote:
> At 15.36 29/05/2007 +0530, Umesh Chandak wrote:
> >Thanks for the reply.
> >But I am using the SAX2XMLReaderImpl class of the exerces and I don't
> >see any such method in this class.
> 
> You need to use 
> setFeature(XMLUni::fgXercesDisableDefaultEntityResolution, true)
> 
> Alberto
> 
> 
> >Thanks.
> >Regards,
> >Umesh
> >On Tue, 2007-05-29 at 11:15 +0200, Alberto Massari wrote:
> > > Hi Umesh,
> > > you neeed to use setDisableDefaultEntityResolution(true)
> > >
> > > void AbstractDOMParser::setDisableDefaultEntityResolution (  const
> > > bool  newValue  )
> > >
> > > Set the 'disable default entity resolution' flag.
> > >
> > > This method gives users the option to not perform default entity
> > > resolution. If the user's resolveEntity method returns NULL the
> > > parser will try to resolve the entity on its own. When this option is
> > > set to true, the parser will not attempt to resolve the entity when
> > > the resolveEntity method returns NULL.
> > >
> > > The parser's default state is false
> > >
> > > Parameters:
> > > newValue The state to set
> > >
> > > Alberto
> > >
> > > At 14.38 29/05/2007 +0530, Umesh Chandak wrote:
> > > >Hi All,
> > > >
> > > >I have installed my custom entity resolver like this
> > > >XMLEntityResolver * currentEntityResolver =
> > > >parser->getXMLEntityResolver();
> > > >XMLImportIncludeResolverWrapper* r = new
> > > >XMLImportIncludeResolverWrapper(currentEntityResolver,
> > > >entityResolver,entityResolverArg, errors) ;
> > > >parser->setXMLEntityResolver(r);
> > > >
> > > >But if my custom entityResolver returns NULL then I got the error
> > > >An exception occurred! Type:NetAccessorException, Message:The
> > > >host/address 'schemas.xmlsoap.org' could not be resolved.
> > > >
> > > >One of the reason for this is I had shut down my network service. But As
> > > >I have installed my own custom enityResolver then why it is trying to
> > > >access the network. Is there any way to get rid of this error by setting
> > > >any flag or property so that Xerces will not try to access the network.
> > > >
> > > >Thanks.
> > > >Regards,
> > > >Umesh
> > > >--
> > > >Umesh Chandak <[EMAIL PROTECTED]>
> > >
> >--
> >Umesh Chandak <[EMAIL PROTECTED]>
> 
> 
-- 
Umesh Chandak <[EMAIL PROTECTED]>

Reply via email to