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/07/07 15:04:58 UTC

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

The following issue has been updated:

    Updater: Alberto Massari (mailto:amassari@progress.com)
       Date: Wed, 7 Jul 2004 6:04 AM
    Changes:
             assignee changed from Xerces-C Developers Mailing List
             type changed from Bug to Improvement
             description changed from 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 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);
<
             environment changed from Operating System: Other
Platform: Other to Operating System: Other
Platform: Other
             priority changed to Blocker
    ---------------------------------------------------------------------
For a full history of the issue, see:

  http://issues.apache.org/jira/browse/XERCESC-1129?page=history

---------------------------------------------------------------------
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: Unassigned
   Priority: Blocker

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

   Assignee: 
   Reporter: Jacques Legare

    Created: Fri, 30 Jan 2004 4:36 PM
    Updated: Wed, 7 Jul 2004 6:04 AM
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