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 17:20:55 UTC

[jira] Resolved: (XERCESC-1170) internal subset lost after using cloneNode

Message:

   The following issue has been resolved as FIXED.

   Resolver: Alberto Massari
       Date: Wed, 7 Jul 2004 8:19 AM

A fix is in CVS. Please verify.

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

Here is an overview of the issue:
---------------------------------------------------------------------
        Key: XERCESC-1170
    Summary: internal subset lost after using cloneNode
       Type: Bug

     Status: Resolved
 Resolution: FIXED

    Project: Xerces-C++
 Components: 
             DOM
   Versions:
             2.3.0

   Assignee: 
   Reporter: Kris Stone

    Created: Tue, 2 Mar 2004 6:17 PM
    Updated: Wed, 7 Jul 2004 8:19 AM
Environment: Operating System: Windows NT/2K
Platform: PC

Description:
If you have document with an internal DTD (doctype) that contains an internal 
subset (e.g. notations, entities etc), then clone the whole document, using 
cloneNode and use DOMWriter to write the cloned document, there is no internal 
subset there.

Both enities and notation are still in the DTD though and can be reached via 
the DOMDocumentType::getEntities() and DOMDocumentType::getNotations() methods

It seems like the internal subset looses it's specified value !

original xml:
"<?xml version='1.0' encoding='iso-8859-1'?>
<!DOCTYPE pictures [<!NOTATION tiff SYSTEM 'image/tiff'> <!ENTITY PICTURE 
SYSTEM 'image.tif' NDATA tiff> <!ELEMENT pictures (#PCDATA)>]>
<pictures/>"

// code start

...
xercesc::DOMDocument * document = 
   parser->getDocument()->cloneNode( true );
...
writer->writeNode( &target, *document);
...

// code end

result xml:
"<?xml version='1.0' encoding='ISO-8859-1'?>
<!DOCTYPE pictures>
<pictures/>"


---------------------------------------------------------------------
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