Details
-
Bug
-
Status: Closed
-
Resolution: Fixed
-
2.5.0
-
None
-
Operating System: Other
Platform: Other
-
27898
Description
Filesystem structure:
/a.xml
/dtd/a.dtd
/ent/a.ent
- A dokument (a.xml for example) with an external DTD give (dtd/a.dtd for example).
- The DTD declares an external entity (../ent/a.ent for example)
- The dokument refers to the entity
=>The parser tries to resolve (../ent/a.ent) relative to the path of the
document and not to the dtd => That's wrong!
The problem - in my opinion - is within the function createReader in
internal/ReaderMgr.cpp:
XMLReader* ReaderMgr::createReader( const XMLCh* const baseURI
, const XMLCh* const sysId
, const XMLCh* const pubId
, const bool xmlDecl
, const XMLReader::RefFrom refFrom
, const XMLReader::Types type
, const XMLReader::Sources source
, InputSource*& srcToFill
, const bool calcSrcOfs)
{
...
if ((!urlTmp.setURL((!baseURI || !*baseURI) ? lastInfo.systemId :
baseURI, expSysId.getRawBuffer(), urlTmp)) ||
(urlTmp.isRelative()))
...
}
This path works for me within Xerces-C 2.5