[ http://nagoya.apache.org/jira/browse/XERCESC-1302?page=history ]
     
cargilld resolved XERCESC-1302:
-------------------------------

    Resolution: Duplicate

Hi,
The problem reported in XERCESC-1151 (and XERCESC-1204) wasn't fixed until 
after 2.5 was released.  So since you are running with 2.5 I believe that is 
the problem you are running into, so I am resolving this bug as a duplicate.

David

> XercesDOMParser doesn't always use XMLEntityResolver
> ----------------------------------------------------
>
>          Key: XERCESC-1302
>          URL: http://nagoya.apache.org/jira/browse/XERCESC-1302
>      Project: Xerces-C++
>         Type: Bug
>   Components: Non-Validating Parser, Validating Parser (DTD)
>     Versions: 2.5.0, 2.6.0
>  Environment: Linux - but defect found at source code level...
>     Reporter: edA-qa mort-ora-y
>     Priority: Minor

>
> XercesDOMParser doesn't in 1 of 2 cases call an installed XMLEntityResolver.  
> In both cases it calls a normal EntityResolver (so the short-term workaround 
> is to use a normal resolver, but then you don't get all the XML info).
> The code from XercesDOMParser is below.  Basically for the first function it 
> does not call fXMLEntityResolver if it has one, it only checks for 
> fEntityResolve.  In the second case it checks for both (though it appears 
> doing a parser->parse(file) with this object always results in the first one 
> being called, thus the XMLEntityParser is never used).
> Related: XERCESC-1151 refers to a derivative class doing something wrong in 
> these regards.  XERCESC-1204 (duplicate of XERCES-1151) has a copy of the 
> exact code below, but also speaks about a derived class only.
> InputSource*
> XercesDOMParser::resolveEntity(const XMLCh* const publicId,
>                                const XMLCh* const systemId,
>                                const XMLCh* const)
> {
>     //
>     //  Just map it to the SAX entity resolver. If there is not one installed,
>     //  return a null pointer to cause the default resolution.
>     //
>     if (fEntityResolver)
>         return fEntityResolver->resolveEntity(publicId, systemId);
>     return 0;
> }
> InputSource*
> XercesDOMParser::resolveEntity(XMLResourceIdentifier* resourceIdentifier)
> {
>     //
>     //  Just map it to the SAX entity resolver. If there is not one installed,
>     //  return a null pointer to cause the default resolution.
>     //
>     if (fEntityResolver)
>         return 
> fEntityResolver->resolveEntity(resourceIdentifier->getPublicId(),
>                                                 
> resourceIdentifier->getSystemId());
>     if (fXMLEntityResolver)
>         return fXMLEntityResolver->resolveEntity(resourceIdentifier);
>     return 0;
> }

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
   http://nagoya.apache.org/jira/secure/Administrators.jspa
-
If you want more information on JIRA, or have a bug to report see:
   http://www.atlassian.com/software/jira


---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to