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 bu...@apache.org on 2004/03/02 19:17:49 UTC
DO NOT REPLY [Bug 27375] New: -
internal subset lost after using cloneNode
DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG
RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT
<http://nagoya.apache.org/bugzilla/show_bug.cgi?id=27375>.
ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND
INSERTED IN THE BUG DATABASE.
http://nagoya.apache.org/bugzilla/show_bug.cgi?id=27375
internal subset lost after using cloneNode
Summary: internal subset lost after using cloneNode
Product: Xerces-C++
Version: 2.3.0
Platform: PC
OS/Version: Windows NT/2K
Status: NEW
Severity: Normal
Priority: Other
Component: DOM
AssignedTo: xerces-c-dev@xml.apache.org
ReportedBy: kristone@hotmail.com
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/>"
---------------------------------------------------------------------
To unsubscribe, e-mail: xerces-c-dev-unsubscribe@xml.apache.org
For additional commands, e-mail: xerces-c-dev-help@xml.apache.org