You are viewing a plain text version of this content. The canonical link for it is here.
Posted to batik-commits@xmlgraphics.apache.org by vh...@apache.org on 2014/10/03 11:02:23 UTC
svn commit: r1629149 -
/xmlgraphics/batik/trunk/sources/org/apache/batik/dom/AbstractDocument.java
Author: vhennebert
Date: Fri Oct 3 09:02:23 2014
New Revision: 1629149
URL: http://svn.apache.org/r1629149
Log:
Added support for importing a document type node.
Fixes regard.bridge.unitTesting.security.resourceAccessTest
Modified:
xmlgraphics/batik/trunk/sources/org/apache/batik/dom/AbstractDocument.java
Modified: xmlgraphics/batik/trunk/sources/org/apache/batik/dom/AbstractDocument.java
URL: http://svn.apache.org/viewvc/xmlgraphics/batik/trunk/sources/org/apache/batik/dom/AbstractDocument.java?rev=1629149&r1=1629148&r2=1629149&view=diff
==============================================================================
--- xmlgraphics/batik/trunk/sources/org/apache/batik/dom/AbstractDocument.java (original)
+++ xmlgraphics/batik/trunk/sources/org/apache/batik/dom/AbstractDocument.java Fri Oct 3 09:02:23 2014
@@ -397,6 +397,14 @@ public abstract class AbstractDocument
result = createDocumentFragment();
break;
+ case DOCUMENT_TYPE_NODE:
+ DocumentType docType = (DocumentType) importedNode;
+ GenericDocumentType copy = new GenericDocumentType(docType.getName(),
+ docType.getPublicId(), docType.getSystemId());
+ copy.ownerDocument = this;
+ result = copy;
+ break;
+
default:
throw createDOMException(DOMException.NOT_SUPPORTED_ERR,
"import.node",