[ http://issues.apache.org/jira/browse/XERCESC-968?page=all ]
     
Alberto Massari resolved XERCESC-968:
-------------------------------------

     Assign To:     (was: Xerces-C Developers Mailing List)
    Resolution: Fixed

I have moved the implementation of setDocument to the cpp file; as it includes 
DOMDocumentImpl.hpp, that should fix your problem.
Please verify and let us know.

Alberto

PS: I am wondering what setDocument (and setCurrentNode) are meant to do; 
fDocument is created from scratch in the startDocument callback and immediately 
used, so invoking it before parse() has no effect, while invoking it while 
parsing in in progress will cause exceptions because we will create nodes from 
a document and inserting into another one (fCurrentParent and fCurrentNode 
would still point to nodes from the document created in startDocument).
So, I would propose to mark setDocument and setCurrentNode as deprecated and 
remove it in the next major version of Xerces. Feedback?

> Warnings from AbstractDOMParser.hpp when compiling on HP
> --------------------------------------------------------
>
>          Key: XERCESC-968
>          URL: http://issues.apache.org/jira/browse/XERCESC-968
>      Project: Xerces-C++
>         Type: Bug
>   Components: Non-Validating Parser
>     Versions: 2.2.0
>  Environment: Operating System: Other
> Platform: HP
>     Reporter: John Hibbert

>
> I get the following warnings when compiling on HP:
> Warning 749: "AbstractDOMParser.hpp", line 1533 # The cast 
> from 'xercesc_2_2::DOMDocument *' to 'xercesc_2_2::DOMDocumentImpl *' is 
> performed as a 'reinterpret_cast'. This operation is non-portable and 
> potentially unsafe.
> Warning 740: "AbstractDOMParser.hpp", line 1533 # Unsafe cast between 
> pointers/references to incomplete classes: casting 'xercesc_2_2::DOMDocument 
> *' to 'xercesc_2_2::DOMDocumentImpl *'.
> This corresponds to the following code:
> inline void AbstractDOMParser::setDocument(DOMDocument* toSet)
> {
>     fDocument = (DOMDocumentImpl *) toSet;  // this is line 1533
> }
> The problem is that although DOMDocumentImpl inherits from DOMDocument,
> this header does not know that (DOMDocumentImpl is only specified with
> a forward declaration) and so a reinterpret_cast has to be used.
> The reinterpret_cast can be avoided if the DOMDocumentImpl.hpp header
> is included.

-- 
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
-
For more information on JIRA, see:
   http://www.atlassian.com/software/jira


---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to