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 xe...@xml.apache.org on 2004/09/21 21:12:38 UTC

[jira] Closed: (XERCESC-1129) resolveEntity doesn't give enough information

Message:

   The following issue has been closed.

---------------------------------------------------------------------
View the issue:
  http://issues.apache.org/jira/browse/XERCESC-1129

Here is an overview of the issue:
---------------------------------------------------------------------
        Key: XERCESC-1129
    Summary: resolveEntity doesn't give enough information
       Type: Improvement

     Status: Closed
   Priority: Blocker
 Resolution: FIXED

    Project: Xerces-C++
 Components: 
             SAX/SAX2
   Versions:
             2.4.0

   Assignee: 
   Reporter: Jacques Legare

    Created: Fri, 30 Jan 2004 4:36 PM
    Updated: Tue, 21 Sep 2004 12:12 PM
Environment: Operating System: Other
Platform: Other

Description:
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);
<


---------------------------------------------------------------------
JIRA INFORMATION:
This message is automatically generated by JIRA.

If you think it was sent incorrectly contact one of the administrators:
   http://issues.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: xerces-c-dev-unsubscribe@xml.apache.org
For additional commands, e-mail: xerces-c-dev-help@xml.apache.org