com.sun.org.apache.xerces.internal.dom.DocumentTypeImpl Java Examples
The following examples show how to use
com.sun.org.apache.xerces.internal.dom.DocumentTypeImpl.
You can vote up the ones you like or vote down the ones you don't like,
and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example #1
Source File: AbstractDOMParser.java From TencentKona-8 with GNU General Public License v2.0 | 6 votes |
/** * The end of the DTD. * * @param augs Additional information that may include infoset * augmentations. * * @throws XNIException Thrown by handler to signal an error. */ public void endDTD (Augmentations augs) throws XNIException { if (DEBUG_EVENTS) { System.out.println ("==>endDTD()"); } fInDTD = false; if (!fBaseURIStack.isEmpty ()) { fBaseURIStack.pop (); } String internalSubset = fInternalSubset != null && fInternalSubset.length () > 0 ? fInternalSubset.toString () : null; if (fDeferNodeExpansion) { if (internalSubset != null) { fDeferredDocumentImpl.setInternalSubset (fDocumentTypeIndex, internalSubset); } } else if (fDocumentImpl != null) { if (internalSubset != null) { ((DocumentTypeImpl)fDocumentType).setInternalSubset (internalSubset); } } }
Example #2
Source File: AbstractDOMParser.java From openjdk-8 with GNU General Public License v2.0 | 6 votes |
/** * The end of the DTD. * * @param augs Additional information that may include infoset * augmentations. * * @throws XNIException Thrown by handler to signal an error. */ public void endDTD (Augmentations augs) throws XNIException { if (DEBUG_EVENTS) { System.out.println ("==>endDTD()"); } fInDTD = false; if (!fBaseURIStack.isEmpty ()) { fBaseURIStack.pop (); } String internalSubset = fInternalSubset != null && fInternalSubset.length () > 0 ? fInternalSubset.toString () : null; if (fDeferNodeExpansion) { if (internalSubset != null) { fDeferredDocumentImpl.setInternalSubset (fDocumentTypeIndex, internalSubset); } } else if (fDocumentImpl != null) { if (internalSubset != null) { ((DocumentTypeImpl)fDocumentType).setInternalSubset (internalSubset); } } }
Example #3
Source File: AbstractDOMParser.java From jdk8u60 with GNU General Public License v2.0 | 6 votes |
/** * The end of the DTD. * * @param augs Additional information that may include infoset * augmentations. * * @throws XNIException Thrown by handler to signal an error. */ public void endDTD (Augmentations augs) throws XNIException { if (DEBUG_EVENTS) { System.out.println ("==>endDTD()"); } fInDTD = false; if (!fBaseURIStack.isEmpty ()) { fBaseURIStack.pop (); } String internalSubset = fInternalSubset != null && fInternalSubset.length () > 0 ? fInternalSubset.toString () : null; if (fDeferNodeExpansion) { if (internalSubset != null) { fDeferredDocumentImpl.setInternalSubset (fDocumentTypeIndex, internalSubset); } } else if (fDocumentImpl != null) { if (internalSubset != null) { ((DocumentTypeImpl)fDocumentType).setInternalSubset (internalSubset); } } }
Example #4
Source File: AbstractDOMParser.java From JDKSourceCode1.8 with MIT License | 6 votes |
/** * The end of the DTD. * * @param augs Additional information that may include infoset * augmentations. * * @throws XNIException Thrown by handler to signal an error. */ public void endDTD (Augmentations augs) throws XNIException { if (DEBUG_EVENTS) { System.out.println ("==>endDTD()"); } fInDTD = false; if (!fBaseURIStack.isEmpty ()) { fBaseURIStack.pop (); } String internalSubset = fInternalSubset != null && fInternalSubset.length () > 0 ? fInternalSubset.toString () : null; if (fDeferNodeExpansion) { if (internalSubset != null) { fDeferredDocumentImpl.setInternalSubset (fDocumentTypeIndex, internalSubset); } } else if (fDocumentImpl != null) { if (internalSubset != null) { ((DocumentTypeImpl)fDocumentType).setInternalSubset (internalSubset); } } }
Example #5
Source File: AbstractDOMParser.java From openjdk-8-source with GNU General Public License v2.0 | 6 votes |
/** * The end of the DTD. * * @param augs Additional information that may include infoset * augmentations. * * @throws XNIException Thrown by handler to signal an error. */ public void endDTD (Augmentations augs) throws XNIException { if (DEBUG_EVENTS) { System.out.println ("==>endDTD()"); } fInDTD = false; if (!fBaseURIStack.isEmpty ()) { fBaseURIStack.pop (); } String internalSubset = fInternalSubset != null && fInternalSubset.length () > 0 ? fInternalSubset.toString () : null; if (fDeferNodeExpansion) { if (internalSubset != null) { fDeferredDocumentImpl.setInternalSubset (fDocumentTypeIndex, internalSubset); } } else if (fDocumentImpl != null) { if (internalSubset != null) { ((DocumentTypeImpl)fDocumentType).setInternalSubset (internalSubset); } } }
Example #6
Source File: AbstractDOMParser.java From openjdk-jdk8u with GNU General Public License v2.0 | 6 votes |
/** * The end of the DTD. * * @param augs Additional information that may include infoset * augmentations. * * @throws XNIException Thrown by handler to signal an error. */ public void endDTD (Augmentations augs) throws XNIException { if (DEBUG_EVENTS) { System.out.println ("==>endDTD()"); } fInDTD = false; if (!fBaseURIStack.isEmpty ()) { fBaseURIStack.pop (); } String internalSubset = fInternalSubset != null && fInternalSubset.length () > 0 ? fInternalSubset.toString () : null; if (fDeferNodeExpansion) { if (internalSubset != null) { fDeferredDocumentImpl.setInternalSubset (fDocumentTypeIndex, internalSubset); } } else if (fDocumentImpl != null) { if (internalSubset != null) { ((DocumentTypeImpl)fDocumentType).setInternalSubset (internalSubset); } } }
Example #7
Source File: AbstractDOMParser.java From openjdk-jdk8u-backup with GNU General Public License v2.0 | 6 votes |
/** * The end of the DTD. * * @param augs Additional information that may include infoset * augmentations. * * @throws XNIException Thrown by handler to signal an error. */ public void endDTD (Augmentations augs) throws XNIException { if (DEBUG_EVENTS) { System.out.println ("==>endDTD()"); } fInDTD = false; if (!fBaseURIStack.isEmpty ()) { fBaseURIStack.pop (); } String internalSubset = fInternalSubset != null && fInternalSubset.length () > 0 ? fInternalSubset.toString () : null; if (fDeferNodeExpansion) { if (internalSubset != null) { fDeferredDocumentImpl.setInternalSubset (fDocumentTypeIndex, internalSubset); } } else if (fDocumentImpl != null) { if (internalSubset != null) { ((DocumentTypeImpl)fDocumentType).setInternalSubset (internalSubset); } } }
Example #8
Source File: AbstractDOMParser.java From jdk1.8-source-analysis with Apache License 2.0 | 6 votes |
/** * The end of the DTD. * * @param augs Additional information that may include infoset * augmentations. * * @throws XNIException Thrown by handler to signal an error. */ public void endDTD (Augmentations augs) throws XNIException { if (DEBUG_EVENTS) { System.out.println ("==>endDTD()"); } fInDTD = false; if (!fBaseURIStack.isEmpty ()) { fBaseURIStack.pop (); } String internalSubset = fInternalSubset != null && fInternalSubset.length () > 0 ? fInternalSubset.toString () : null; if (fDeferNodeExpansion) { if (internalSubset != null) { fDeferredDocumentImpl.setInternalSubset (fDocumentTypeIndex, internalSubset); } } else if (fDocumentImpl != null) { if (internalSubset != null) { ((DocumentTypeImpl)fDocumentType).setInternalSubset (internalSubset); } } }
Example #9
Source File: AbstractDOMParser.java From Bytecoder with Apache License 2.0 | 6 votes |
/** * The end of the DTD. * * @param augs Additional information that may include infoset * augmentations. * * @throws XNIException Thrown by handler to signal an error. */ public void endDTD (Augmentations augs) throws XNIException { if (DEBUG_EVENTS) { System.out.println ("==>endDTD()"); } fInDTD = false; if (!fBaseURIStack.isEmpty ()) { fBaseURIStack.pop (); } String internalSubset = fInternalSubset != null && fInternalSubset.length () > 0 ? fInternalSubset.toString () : null; if (fDeferNodeExpansion) { if (internalSubset != null) { fDeferredDocumentImpl.setInternalSubset (fDocumentTypeIndex, internalSubset); } } else if (fDocumentImpl != null) { if (internalSubset != null) { ((DocumentTypeImpl)fDocumentType).setInternalSubset (internalSubset); } } }
Example #10
Source File: AbstractDOMParser.java From hottub with GNU General Public License v2.0 | 6 votes |
/** * The end of the DTD. * * @param augs Additional information that may include infoset * augmentations. * * @throws XNIException Thrown by handler to signal an error. */ public void endDTD (Augmentations augs) throws XNIException { if (DEBUG_EVENTS) { System.out.println ("==>endDTD()"); } fInDTD = false; if (!fBaseURIStack.isEmpty ()) { fBaseURIStack.pop (); } String internalSubset = fInternalSubset != null && fInternalSubset.length () > 0 ? fInternalSubset.toString () : null; if (fDeferNodeExpansion) { if (internalSubset != null) { fDeferredDocumentImpl.setInternalSubset (fDocumentTypeIndex, internalSubset); } } else if (fDocumentImpl != null) { if (internalSubset != null) { ((DocumentTypeImpl)fDocumentType).setInternalSubset (internalSubset); } } }
Example #11
Source File: AbstractDOMParser.java From openjdk-jdk9 with GNU General Public License v2.0 | 6 votes |
/** * The end of the DTD. * * @param augs Additional information that may include infoset * augmentations. * * @throws XNIException Thrown by handler to signal an error. */ public void endDTD (Augmentations augs) throws XNIException { if (DEBUG_EVENTS) { System.out.println ("==>endDTD()"); } fInDTD = false; if (!fBaseURIStack.isEmpty ()) { fBaseURIStack.pop (); } String internalSubset = fInternalSubset != null && fInternalSubset.length () > 0 ? fInternalSubset.toString () : null; if (fDeferNodeExpansion) { if (internalSubset != null) { fDeferredDocumentImpl.setInternalSubset (fDocumentTypeIndex, internalSubset); } } else if (fDocumentImpl != null) { if (internalSubset != null) { ((DocumentTypeImpl)fDocumentType).setInternalSubset (internalSubset); } } }
Example #12
Source File: DOMResultBuilder.java From openjdk-jdk8u-backup with GNU General Public License v2.0 | 5 votes |
public void doctypeDecl(DocumentType node) throws XNIException { /** Create new DocumentType node for the target. */ if (fDocumentImpl != null) { DocumentType docType = fDocumentImpl.createDocumentType(node.getName(), node.getPublicId(), node.getSystemId()); final String internalSubset = node.getInternalSubset(); /** Copy internal subset. */ if (internalSubset != null) { ((DocumentTypeImpl) docType).setInternalSubset(internalSubset); } /** Copy entities. */ NamedNodeMap oldMap = node.getEntities(); NamedNodeMap newMap = docType.getEntities(); int length = oldMap.getLength(); for (int i = 0; i < length; ++i) { Entity oldEntity = (Entity) oldMap.item(i); EntityImpl newEntity = (EntityImpl) fDocumentImpl.createEntity(oldEntity.getNodeName()); newEntity.setPublicId(oldEntity.getPublicId()); newEntity.setSystemId(oldEntity.getSystemId()); newEntity.setNotationName(oldEntity.getNotationName()); newMap.setNamedItem(newEntity); } /** Copy notations. */ oldMap = node.getNotations(); newMap = docType.getNotations(); length = oldMap.getLength(); for (int i = 0; i < length; ++i) { Notation oldNotation = (Notation) oldMap.item(i); NotationImpl newNotation = (NotationImpl) fDocumentImpl.createNotation(oldNotation.getNodeName()); newNotation.setPublicId(oldNotation.getPublicId()); newNotation.setSystemId(oldNotation.getSystemId()); newMap.setNamedItem(newNotation); } append(docType); } }
Example #13
Source File: DOMResultBuilder.java From openjdk-8 with GNU General Public License v2.0 | 5 votes |
public void doctypeDecl(DocumentType node) throws XNIException { /** Create new DocumentType node for the target. */ if (fDocumentImpl != null) { DocumentType docType = fDocumentImpl.createDocumentType(node.getName(), node.getPublicId(), node.getSystemId()); final String internalSubset = node.getInternalSubset(); /** Copy internal subset. */ if (internalSubset != null) { ((DocumentTypeImpl) docType).setInternalSubset(internalSubset); } /** Copy entities. */ NamedNodeMap oldMap = node.getEntities(); NamedNodeMap newMap = docType.getEntities(); int length = oldMap.getLength(); for (int i = 0; i < length; ++i) { Entity oldEntity = (Entity) oldMap.item(i); EntityImpl newEntity = (EntityImpl) fDocumentImpl.createEntity(oldEntity.getNodeName()); newEntity.setPublicId(oldEntity.getPublicId()); newEntity.setSystemId(oldEntity.getSystemId()); newEntity.setNotationName(oldEntity.getNotationName()); newMap.setNamedItem(newEntity); } /** Copy notations. */ oldMap = node.getNotations(); newMap = docType.getNotations(); length = oldMap.getLength(); for (int i = 0; i < length; ++i) { Notation oldNotation = (Notation) oldMap.item(i); NotationImpl newNotation = (NotationImpl) fDocumentImpl.createNotation(oldNotation.getNodeName()); newNotation.setPublicId(oldNotation.getPublicId()); newNotation.setSystemId(oldNotation.getSystemId()); newMap.setNamedItem(newNotation); } append(docType); } }
Example #14
Source File: DOMResultBuilder.java From openjdk-8-source with GNU General Public License v2.0 | 5 votes |
public void doctypeDecl(DocumentType node) throws XNIException { /** Create new DocumentType node for the target. */ if (fDocumentImpl != null) { DocumentType docType = fDocumentImpl.createDocumentType(node.getName(), node.getPublicId(), node.getSystemId()); final String internalSubset = node.getInternalSubset(); /** Copy internal subset. */ if (internalSubset != null) { ((DocumentTypeImpl) docType).setInternalSubset(internalSubset); } /** Copy entities. */ NamedNodeMap oldMap = node.getEntities(); NamedNodeMap newMap = docType.getEntities(); int length = oldMap.getLength(); for (int i = 0; i < length; ++i) { Entity oldEntity = (Entity) oldMap.item(i); EntityImpl newEntity = (EntityImpl) fDocumentImpl.createEntity(oldEntity.getNodeName()); newEntity.setPublicId(oldEntity.getPublicId()); newEntity.setSystemId(oldEntity.getSystemId()); newEntity.setNotationName(oldEntity.getNotationName()); newMap.setNamedItem(newEntity); } /** Copy notations. */ oldMap = node.getNotations(); newMap = docType.getNotations(); length = oldMap.getLength(); for (int i = 0; i < length; ++i) { Notation oldNotation = (Notation) oldMap.item(i); NotationImpl newNotation = (NotationImpl) fDocumentImpl.createNotation(oldNotation.getNodeName()); newNotation.setPublicId(oldNotation.getPublicId()); newNotation.setSystemId(oldNotation.getSystemId()); newMap.setNamedItem(newNotation); } append(docType); } }
Example #15
Source File: DOMResultBuilder.java From hottub with GNU General Public License v2.0 | 5 votes |
public void doctypeDecl(DocumentType node) throws XNIException { /** Create new DocumentType node for the target. */ if (fDocumentImpl != null) { DocumentType docType = fDocumentImpl.createDocumentType(node.getName(), node.getPublicId(), node.getSystemId()); final String internalSubset = node.getInternalSubset(); /** Copy internal subset. */ if (internalSubset != null) { ((DocumentTypeImpl) docType).setInternalSubset(internalSubset); } /** Copy entities. */ NamedNodeMap oldMap = node.getEntities(); NamedNodeMap newMap = docType.getEntities(); int length = oldMap.getLength(); for (int i = 0; i < length; ++i) { Entity oldEntity = (Entity) oldMap.item(i); EntityImpl newEntity = (EntityImpl) fDocumentImpl.createEntity(oldEntity.getNodeName()); newEntity.setPublicId(oldEntity.getPublicId()); newEntity.setSystemId(oldEntity.getSystemId()); newEntity.setNotationName(oldEntity.getNotationName()); newMap.setNamedItem(newEntity); } /** Copy notations. */ oldMap = node.getNotations(); newMap = docType.getNotations(); length = oldMap.getLength(); for (int i = 0; i < length; ++i) { Notation oldNotation = (Notation) oldMap.item(i); NotationImpl newNotation = (NotationImpl) fDocumentImpl.createNotation(oldNotation.getNodeName()); newNotation.setPublicId(oldNotation.getPublicId()); newNotation.setSystemId(oldNotation.getSystemId()); newMap.setNamedItem(newNotation); } append(docType); } }
Example #16
Source File: DOMResultBuilder.java From openjdk-jdk9 with GNU General Public License v2.0 | 5 votes |
public void doctypeDecl(DocumentType node) throws XNIException { /** Create new DocumentType node for the target. */ if (fDocumentImpl != null) { DocumentType docType = fDocumentImpl.createDocumentType(node.getName(), node.getPublicId(), node.getSystemId()); final String internalSubset = node.getInternalSubset(); /** Copy internal subset. */ if (internalSubset != null) { ((DocumentTypeImpl) docType).setInternalSubset(internalSubset); } /** Copy entities. */ NamedNodeMap oldMap = node.getEntities(); NamedNodeMap newMap = docType.getEntities(); int length = oldMap.getLength(); for (int i = 0; i < length; ++i) { Entity oldEntity = (Entity) oldMap.item(i); EntityImpl newEntity = (EntityImpl) fDocumentImpl.createEntity(oldEntity.getNodeName()); newEntity.setPublicId(oldEntity.getPublicId()); newEntity.setSystemId(oldEntity.getSystemId()); newEntity.setNotationName(oldEntity.getNotationName()); newMap.setNamedItem(newEntity); } /** Copy notations. */ oldMap = node.getNotations(); newMap = docType.getNotations(); length = oldMap.getLength(); for (int i = 0; i < length; ++i) { Notation oldNotation = (Notation) oldMap.item(i); NotationImpl newNotation = (NotationImpl) fDocumentImpl.createNotation(oldNotation.getNodeName()); newNotation.setPublicId(oldNotation.getPublicId()); newNotation.setSystemId(oldNotation.getSystemId()); newMap.setNamedItem(newNotation); } append(docType); } }
Example #17
Source File: DOMResultBuilder.java From Bytecoder with Apache License 2.0 | 5 votes |
public void doctypeDecl(DocumentType node) throws XNIException { /** Create new DocumentType node for the target. */ if (fDocumentImpl != null) { DocumentType docType = fDocumentImpl.createDocumentType(node.getName(), node.getPublicId(), node.getSystemId()); final String internalSubset = node.getInternalSubset(); /** Copy internal subset. */ if (internalSubset != null) { ((DocumentTypeImpl) docType).setInternalSubset(internalSubset); } /** Copy entities. */ NamedNodeMap oldMap = node.getEntities(); NamedNodeMap newMap = docType.getEntities(); int length = oldMap.getLength(); for (int i = 0; i < length; ++i) { Entity oldEntity = (Entity) oldMap.item(i); EntityImpl newEntity = (EntityImpl) fDocumentImpl.createEntity(oldEntity.getNodeName()); newEntity.setPublicId(oldEntity.getPublicId()); newEntity.setSystemId(oldEntity.getSystemId()); newEntity.setNotationName(oldEntity.getNotationName()); newMap.setNamedItem(newEntity); } /** Copy notations. */ oldMap = node.getNotations(); newMap = docType.getNotations(); length = oldMap.getLength(); for (int i = 0; i < length; ++i) { Notation oldNotation = (Notation) oldMap.item(i); NotationImpl newNotation = (NotationImpl) fDocumentImpl.createNotation(oldNotation.getNodeName()); newNotation.setPublicId(oldNotation.getPublicId()); newNotation.setSystemId(oldNotation.getSystemId()); newMap.setNamedItem(newNotation); } append(docType); } }
Example #18
Source File: DOMResultBuilder.java From openjdk-jdk8u with GNU General Public License v2.0 | 5 votes |
public void doctypeDecl(DocumentType node) throws XNIException { /** Create new DocumentType node for the target. */ if (fDocumentImpl != null) { DocumentType docType = fDocumentImpl.createDocumentType(node.getName(), node.getPublicId(), node.getSystemId()); final String internalSubset = node.getInternalSubset(); /** Copy internal subset. */ if (internalSubset != null) { ((DocumentTypeImpl) docType).setInternalSubset(internalSubset); } /** Copy entities. */ NamedNodeMap oldMap = node.getEntities(); NamedNodeMap newMap = docType.getEntities(); int length = oldMap.getLength(); for (int i = 0; i < length; ++i) { Entity oldEntity = (Entity) oldMap.item(i); EntityImpl newEntity = (EntityImpl) fDocumentImpl.createEntity(oldEntity.getNodeName()); newEntity.setPublicId(oldEntity.getPublicId()); newEntity.setSystemId(oldEntity.getSystemId()); newEntity.setNotationName(oldEntity.getNotationName()); newMap.setNamedItem(newEntity); } /** Copy notations. */ oldMap = node.getNotations(); newMap = docType.getNotations(); length = oldMap.getLength(); for (int i = 0; i < length; ++i) { Notation oldNotation = (Notation) oldMap.item(i); NotationImpl newNotation = (NotationImpl) fDocumentImpl.createNotation(oldNotation.getNodeName()); newNotation.setPublicId(oldNotation.getPublicId()); newNotation.setSystemId(oldNotation.getSystemId()); newMap.setNamedItem(newNotation); } append(docType); } }
Example #19
Source File: DOMResultBuilder.java From JDKSourceCode1.8 with MIT License | 5 votes |
public void doctypeDecl(DocumentType node) throws XNIException { /** Create new DocumentType node for the target. */ if (fDocumentImpl != null) { DocumentType docType = fDocumentImpl.createDocumentType(node.getName(), node.getPublicId(), node.getSystemId()); final String internalSubset = node.getInternalSubset(); /** Copy internal subset. */ if (internalSubset != null) { ((DocumentTypeImpl) docType).setInternalSubset(internalSubset); } /** Copy entities. */ NamedNodeMap oldMap = node.getEntities(); NamedNodeMap newMap = docType.getEntities(); int length = oldMap.getLength(); for (int i = 0; i < length; ++i) { Entity oldEntity = (Entity) oldMap.item(i); EntityImpl newEntity = (EntityImpl) fDocumentImpl.createEntity(oldEntity.getNodeName()); newEntity.setPublicId(oldEntity.getPublicId()); newEntity.setSystemId(oldEntity.getSystemId()); newEntity.setNotationName(oldEntity.getNotationName()); newMap.setNamedItem(newEntity); } /** Copy notations. */ oldMap = node.getNotations(); newMap = docType.getNotations(); length = oldMap.getLength(); for (int i = 0; i < length; ++i) { Notation oldNotation = (Notation) oldMap.item(i); NotationImpl newNotation = (NotationImpl) fDocumentImpl.createNotation(oldNotation.getNodeName()); newNotation.setPublicId(oldNotation.getPublicId()); newNotation.setSystemId(oldNotation.getSystemId()); newMap.setNamedItem(newNotation); } append(docType); } }
Example #20
Source File: DOMResultBuilder.java From jdk8u60 with GNU General Public License v2.0 | 5 votes |
public void doctypeDecl(DocumentType node) throws XNIException { /** Create new DocumentType node for the target. */ if (fDocumentImpl != null) { DocumentType docType = fDocumentImpl.createDocumentType(node.getName(), node.getPublicId(), node.getSystemId()); final String internalSubset = node.getInternalSubset(); /** Copy internal subset. */ if (internalSubset != null) { ((DocumentTypeImpl) docType).setInternalSubset(internalSubset); } /** Copy entities. */ NamedNodeMap oldMap = node.getEntities(); NamedNodeMap newMap = docType.getEntities(); int length = oldMap.getLength(); for (int i = 0; i < length; ++i) { Entity oldEntity = (Entity) oldMap.item(i); EntityImpl newEntity = (EntityImpl) fDocumentImpl.createEntity(oldEntity.getNodeName()); newEntity.setPublicId(oldEntity.getPublicId()); newEntity.setSystemId(oldEntity.getSystemId()); newEntity.setNotationName(oldEntity.getNotationName()); newMap.setNamedItem(newEntity); } /** Copy notations. */ oldMap = node.getNotations(); newMap = docType.getNotations(); length = oldMap.getLength(); for (int i = 0; i < length; ++i) { Notation oldNotation = (Notation) oldMap.item(i); NotationImpl newNotation = (NotationImpl) fDocumentImpl.createNotation(oldNotation.getNodeName()); newNotation.setPublicId(oldNotation.getPublicId()); newNotation.setSystemId(oldNotation.getSystemId()); newMap.setNamedItem(newNotation); } append(docType); } }
Example #21
Source File: DOMResultBuilder.java From TencentKona-8 with GNU General Public License v2.0 | 5 votes |
public void doctypeDecl(DocumentType node) throws XNIException { /** Create new DocumentType node for the target. */ if (fDocumentImpl != null) { DocumentType docType = fDocumentImpl.createDocumentType(node.getName(), node.getPublicId(), node.getSystemId()); final String internalSubset = node.getInternalSubset(); /** Copy internal subset. */ if (internalSubset != null) { ((DocumentTypeImpl) docType).setInternalSubset(internalSubset); } /** Copy entities. */ NamedNodeMap oldMap = node.getEntities(); NamedNodeMap newMap = docType.getEntities(); int length = oldMap.getLength(); for (int i = 0; i < length; ++i) { Entity oldEntity = (Entity) oldMap.item(i); EntityImpl newEntity = (EntityImpl) fDocumentImpl.createEntity(oldEntity.getNodeName()); newEntity.setPublicId(oldEntity.getPublicId()); newEntity.setSystemId(oldEntity.getSystemId()); newEntity.setNotationName(oldEntity.getNotationName()); newMap.setNamedItem(newEntity); } /** Copy notations. */ oldMap = node.getNotations(); newMap = docType.getNotations(); length = oldMap.getLength(); for (int i = 0; i < length; ++i) { Notation oldNotation = (Notation) oldMap.item(i); NotationImpl newNotation = (NotationImpl) fDocumentImpl.createNotation(oldNotation.getNodeName()); newNotation.setPublicId(oldNotation.getPublicId()); newNotation.setSystemId(oldNotation.getSystemId()); newMap.setNamedItem(newNotation); } append(docType); } }
Example #22
Source File: DOMResultBuilder.java From jdk1.8-source-analysis with Apache License 2.0 | 5 votes |
public void doctypeDecl(DocumentType node) throws XNIException { /** Create new DocumentType node for the target. */ if (fDocumentImpl != null) { DocumentType docType = fDocumentImpl.createDocumentType(node.getName(), node.getPublicId(), node.getSystemId()); final String internalSubset = node.getInternalSubset(); /** Copy internal subset. */ if (internalSubset != null) { ((DocumentTypeImpl) docType).setInternalSubset(internalSubset); } /** Copy entities. */ NamedNodeMap oldMap = node.getEntities(); NamedNodeMap newMap = docType.getEntities(); int length = oldMap.getLength(); for (int i = 0; i < length; ++i) { Entity oldEntity = (Entity) oldMap.item(i); EntityImpl newEntity = (EntityImpl) fDocumentImpl.createEntity(oldEntity.getNodeName()); newEntity.setPublicId(oldEntity.getPublicId()); newEntity.setSystemId(oldEntity.getSystemId()); newEntity.setNotationName(oldEntity.getNotationName()); newMap.setNamedItem(newEntity); } /** Copy notations. */ oldMap = node.getNotations(); newMap = docType.getNotations(); length = oldMap.getLength(); for (int i = 0; i < length; ++i) { Notation oldNotation = (Notation) oldMap.item(i); NotationImpl newNotation = (NotationImpl) fDocumentImpl.createNotation(oldNotation.getNodeName()); newNotation.setPublicId(oldNotation.getPublicId()); newNotation.setSystemId(oldNotation.getSystemId()); newMap.setNamedItem(newNotation); } append(docType); } }