You are viewing a plain text version of this content. The canonical link for it is here.
Posted to c-dev@xerces.apache.org by bu...@apache.org on 2004/01/30 17:36:23 UTC

DO NOT REPLY [Bug 26553] New: - resolveEntity doesn't give enough information

DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG 
RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT
<http://nagoya.apache.org/bugzilla/show_bug.cgi?id=26553>.
ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND 
INSERTED IN THE BUG DATABASE.

http://nagoya.apache.org/bugzilla/show_bug.cgi?id=26553

resolveEntity doesn't give enough information

           Summary: resolveEntity doesn't give enough information
           Product: Xerces-C++
           Version: 2.4.0
          Platform: Other
        OS/Version: Other
            Status: NEW
          Severity: Normal
          Priority: Other
         Component: SAX/SAX2
        AssignedTo: xerces-c-dev@xml.apache.org
        ReportedBy: jlegare@omnimark.com


The EntityResolver::resolveEntity method doesn't get any information about the
entity except for its public and system ID. Some applications require more
information, like the entity name and type. The frustrating thing is that this
information is actually made available by the
XMLDocumentHandler::startEntityReference method, which is called after the
resolveEntity. Too late to be useful.

Instead of adding arguments to the method, we decided to solve the problem by
reversing the order of EntityResolver::resolveEntity and
XMLDocumentHandler::startEntityReference. Here's the patch against the 2.4 release:

==== xerces-c-src2_4_0/src/xercesc/internal/IGXMLScanner2.cpp#2 (text) ====
 
2920a2921,2928
>         //  Do a start entity reference event.
>         //
>         //  <TBD> For now, we supress them in att values. Later, when
>         //  the stuff is in place to correctly allow DOM to handle them
>         //  we'll turn this back on.
>         if (fDocHandler && !inAttVal)
>             fDocHandler->startEntityReference(*decl);
>
2966,2973d2973
<         //  Do a start entity reference event.
<         //
<         //  <TBD> For now, we supress them in att values. Later, when
<         //  the stuff is in place to correctly allow DOM to handle them
<         //  we'll turn this back on.
<         if (fDocHandler && !inAttVal)
<             fDocHandler->startEntityReference(*decl);
<
2988a2989,2996
>         //  Do a start entity reference event.
>         //
>         //  <TBD> For now, we supress them in att values. Later, when
>         //  the stuff is in place to correctly allow DOM to handle them
>         //  we'll turn this back on.
>         if (fDocHandler && !inAttVal)
>             fDocHandler->startEntityReference(*decl);
>
3022,3029d3029
<         //  Do a start entity reference event.
<         //
<         //  <TBD> For now, we supress them in att values. Later, when
<         //  the stuff is in place to correctly allow DOM to handle them
<         //  we'll turn this back on.
<         if (fDocHandler && !inAttVal)
<             fDocHandler->startEntityReference(*decl);
<

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