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 18:32:55 UTC

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

The following comment has been added to this issue:

     Author: Neil Graham
    Created: Wed, 7 Jul 2004 9:31 AM
       Body:
I ownder whether a change of this kind might not break other applications that rely on the current callback sequence.  

It seems to me that the XMLEntityHandler::resolveEntity() callback that Dave added last year might help here.  If it doesn't contain all the information that's required, perhaps the right thing to do is to enable XMLResourceIdentifiers to carry whatever additional information is needed.  


---------------------------------------------------------------------
View this comment:
  http://issues.apache.org/jira/browse/XERCESC-1129?page=comments#action_36541

---------------------------------------------------------------------
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 9:31 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