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 "Boris Kolpackov (JIRA)" <xe...@xml.apache.org> on 2007/07/11 18:48:05 UTC

[jira] Created: (XERCESC-1722) DOMUserDataHandler events are not triggered when cloning documents

DOMUserDataHandler events are not triggered when cloning documents
------------------------------------------------------------------

                 Key: XERCESC-1722
                 URL: https://issues.apache.org/jira/browse/XERCESC-1722
             Project: Xerces-C++
          Issue Type: Bug
          Components: DOM
    Affects Versions: Nightly build (please specify the date)
         Environment: any
            Reporter: Boris Kolpackov
            Priority: Critical


The attached test case shows that the data handler "clone" event is not triggered when the complete document is being cloned. This test case is for the 3.0.0 branch and expects a file named "test.xml" to be present in the working directory. The contents of
test.xml are no important as long as it is a valid XML file.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


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


[jira] Commented: (XERCESC-1722) DOMUserDataHandler events are not triggered when cloning documents

Posted by "Alberto Massari (JIRA)" <xe...@xml.apache.org>.
    [ https://issues.apache.org/jira/browse/XERCESC-1722?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#action_12513554 ] 

Alberto Massari commented on XERCESC-1722:
------------------------------------------

I had committed it only in the 3.0 branch; now it's also in the 2.7

> DOMUserDataHandler events are not triggered when cloning documents
> ------------------------------------------------------------------
>
>                 Key: XERCESC-1722
>                 URL: https://issues.apache.org/jira/browse/XERCESC-1722
>             Project: Xerces-C++
>          Issue Type: Bug
>          Components: DOM
>    Affects Versions: Nightly build (please specify the date)
>         Environment: any
>            Reporter: Boris Kolpackov
>            Assignee: Alberto Massari
>            Priority: Critical
>         Attachments: clone.cxx
>
>
> The attached test case shows that the data handler "clone" event is not triggered when the complete document is being cloned. This test case is for the 3.0.0 branch and expects a file named "test.xml" to be present in the working directory. The contents of
> test.xml are no important as long as it is a valid XML file.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


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


[jira] Commented: (XERCESC-1722) DOMUserDataHandler events are not triggered when cloning documents

Posted by "Alberto Massari (JIRA)" <xe...@xml.apache.org>.
    [ https://issues.apache.org/jira/browse/XERCESC-1722?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#action_12513260 ] 

Alberto Massari commented on XERCESC-1722:
------------------------------------------

Oops, hit the send button too soon...
The 'dataHandler called' is for the 'release' event; the notification is not sent because the handler is attached to the root element, and it's the document that is being cloned. Attaching it to the document works.

Alberto

> DOMUserDataHandler events are not triggered when cloning documents
> ------------------------------------------------------------------
>
>                 Key: XERCESC-1722
>                 URL: https://issues.apache.org/jira/browse/XERCESC-1722
>             Project: Xerces-C++
>          Issue Type: Bug
>          Components: DOM
>    Affects Versions: Nightly build (please specify the date)
>         Environment: any
>            Reporter: Boris Kolpackov
>            Priority: Critical
>         Attachments: clone.cxx
>
>
> The attached test case shows that the data handler "clone" event is not triggered when the complete document is being cloned. This test case is for the 3.0.0 branch and expects a file named "test.xml" to be present in the working directory. The contents of
> test.xml are no important as long as it is a valid XML file.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


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


[jira] Commented: (XERCESC-1722) DOMUserDataHandler events are not triggered when cloning documents

Posted by "Boris Kolpackov (JIRA)" <xe...@xml.apache.org>.
    [ https://issues.apache.org/jira/browse/XERCESC-1722?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#action_12513277 ] 

Boris Kolpackov commented on XERCESC-1722:
------------------------------------------

Hi Alberto,

Don't you think that because when the document is cloned all its elements are being cloned, the cloning event should
be triggered on all elements? What happens when I make a deep (i.e., with sub-elements) clone of an element? The fact that the even is triggered only on the top-level entity that is being cloned even though the contained elements are being cloned as well appears very counter-intuitive to me (this "bug" was first mentioned to me on our mailing list so I am not alone thinking this is strange). Also if we consider what happens when we release the document (which triggers release of all its elements), I am sure the release events are triggered on all sub-elements.

Regarding signature of the handle function: the test is for the current SVN (aka 3.0.0) where the signature of that function has (rightfully) changed to strip the second const.

thanks,
-boris


> DOMUserDataHandler events are not triggered when cloning documents
> ------------------------------------------------------------------
>
>                 Key: XERCESC-1722
>                 URL: https://issues.apache.org/jira/browse/XERCESC-1722
>             Project: Xerces-C++
>          Issue Type: Bug
>          Components: DOM
>    Affects Versions: Nightly build (please specify the date)
>         Environment: any
>            Reporter: Boris Kolpackov
>            Priority: Critical
>         Attachments: clone.cxx
>
>
> The attached test case shows that the data handler "clone" event is not triggered when the complete document is being cloned. This test case is for the 3.0.0 branch and expects a file named "test.xml" to be present in the working directory. The contents of
> test.xml are no important as long as it is a valid XML file.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


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


[jira] Resolved: (XERCESC-1722) DOMUserDataHandler events are not triggered when cloning documents

Posted by "Alberto Massari (JIRA)" <xe...@xml.apache.org>.
     [ https://issues.apache.org/jira/browse/XERCESC-1722?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Alberto Massari resolved XERCESC-1722.
--------------------------------------

    Resolution: Fixed

> DOMUserDataHandler events are not triggered when cloning documents
> ------------------------------------------------------------------
>
>                 Key: XERCESC-1722
>                 URL: https://issues.apache.org/jira/browse/XERCESC-1722
>             Project: Xerces-C++
>          Issue Type: Bug
>          Components: DOM
>    Affects Versions: Nightly build (please specify the date)
>         Environment: any
>            Reporter: Boris Kolpackov
>            Assignee: Alberto Massari
>            Priority: Critical
>         Attachments: clone.cxx
>
>
> The attached test case shows that the data handler "clone" event is not triggered when the complete document is being cloned. This test case is for the 3.0.0 branch and expects a file named "test.xml" to be present in the working directory. The contents of
> test.xml are no important as long as it is a valid XML file.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


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


[jira] Commented: (XERCESC-1722) DOMUserDataHandler events are not triggered when cloning documents

Posted by "Boris Kolpackov (JIRA)" <xe...@xml.apache.org>.
    [ https://issues.apache.org/jira/browse/XERCESC-1722?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#action_12513542 ] 

Boris Kolpackov commented on XERCESC-1722:
------------------------------------------

I don't see any relevant changes in the 2.7 branch. Have you commited your fix yet?

> while the key is still a 'const XMLCh* const' 

Oh, well, I guess this is unfortunate :-)

Boris


> DOMUserDataHandler events are not triggered when cloning documents
> ------------------------------------------------------------------
>
>                 Key: XERCESC-1722
>                 URL: https://issues.apache.org/jira/browse/XERCESC-1722
>             Project: Xerces-C++
>          Issue Type: Bug
>          Components: DOM
>    Affects Versions: Nightly build (please specify the date)
>         Environment: any
>            Reporter: Boris Kolpackov
>            Assignee: Alberto Massari
>            Priority: Critical
>         Attachments: clone.cxx
>
>
> The attached test case shows that the data handler "clone" event is not triggered when the complete document is being cloned. This test case is for the 3.0.0 branch and expects a file named "test.xml" to be present in the working directory. The contents of
> test.xml are no important as long as it is a valid XML file.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


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


[jira] Updated: (XERCESC-1722) DOMUserDataHandler events are not triggered when cloning documents

Posted by "Boris Kolpackov (JIRA)" <xe...@xml.apache.org>.
     [ https://issues.apache.org/jira/browse/XERCESC-1722?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Boris Kolpackov updated XERCESC-1722:
-------------------------------------

    Attachment: clone.cxx

> DOMUserDataHandler events are not triggered when cloning documents
> ------------------------------------------------------------------
>
>                 Key: XERCESC-1722
>                 URL: https://issues.apache.org/jira/browse/XERCESC-1722
>             Project: Xerces-C++
>          Issue Type: Bug
>          Components: DOM
>    Affects Versions: Nightly build (please specify the date)
>         Environment: any
>            Reporter: Boris Kolpackov
>            Priority: Critical
>         Attachments: clone.cxx
>
>
> The attached test case shows that the data handler "clone" event is not triggered when the complete document is being cloned. This test case is for the 3.0.0 branch and expects a file named "test.xml" to be present in the working directory. The contents of
> test.xml are no important as long as it is a valid XML file.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


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


[jira] Resolved: (XERCESC-1722) DOMUserDataHandler events are not triggered when cloning documents

Posted by "Alberto Massari (JIRA)" <xe...@xml.apache.org>.
     [ https://issues.apache.org/jira/browse/XERCESC-1722?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Alberto Massari resolved XERCESC-1722.
--------------------------------------

    Resolution: Invalid

Hi Boris,
I tried your testcase, and this is what I got

--- Before clone document
--- After clone document

dataHandler called

But I had to fix the definition of the CustomDataHandler class to compile it, as the 'handle' method has a 

     const XMLCh * const /*key*/

argument, not a 

    const XMLCh * /*key*/

as you wrote.
Maybe the compiler you are using is less forgiving?

Alberto

> DOMUserDataHandler events are not triggered when cloning documents
> ------------------------------------------------------------------
>
>                 Key: XERCESC-1722
>                 URL: https://issues.apache.org/jira/browse/XERCESC-1722
>             Project: Xerces-C++
>          Issue Type: Bug
>          Components: DOM
>    Affects Versions: Nightly build (please specify the date)
>         Environment: any
>            Reporter: Boris Kolpackov
>            Priority: Critical
>         Attachments: clone.cxx
>
>
> The attached test case shows that the data handler "clone" event is not triggered when the complete document is being cloned. This test case is for the 3.0.0 branch and expects a file named "test.xml" to be present in the working directory. The contents of
> test.xml are no important as long as it is a valid XML file.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


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


[jira] Reopened: (XERCESC-1722) DOMUserDataHandler events are not triggered when cloning documents

Posted by "Alberto Massari (JIRA)" <xe...@xml.apache.org>.
     [ https://issues.apache.org/jira/browse/XERCESC-1722?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Alberto Massari reopened XERCESC-1722:
--------------------------------------

      Assignee: Alberto Massari

Yes, I think you are right; when cloning a DOMElement the notifications are sent for all the children, so I guess this is what the DOMDocument should do too.

As for the 'const' in the DOMUserDataHandler interface, the only change that has been done in 3.0 is the removal of the 'const' qualifier from the DOMNode* for the destination node, while the key is still a 'const XMLCh* const'

Alberto

> DOMUserDataHandler events are not triggered when cloning documents
> ------------------------------------------------------------------
>
>                 Key: XERCESC-1722
>                 URL: https://issues.apache.org/jira/browse/XERCESC-1722
>             Project: Xerces-C++
>          Issue Type: Bug
>          Components: DOM
>    Affects Versions: Nightly build (please specify the date)
>         Environment: any
>            Reporter: Boris Kolpackov
>            Assignee: Alberto Massari
>            Priority: Critical
>         Attachments: clone.cxx
>
>
> The attached test case shows that the data handler "clone" event is not triggered when the complete document is being cloned. This test case is for the 3.0.0 branch and expects a file named "test.xml" to be present in the working directory. The contents of
> test.xml are no important as long as it is a valid XML file.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


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