Home | History | Annotate | Download | only in test

Lines Matching refs:doctype

22 def create_doc_without_doctype(doctype=None):
23 return getDOMImplementation().createDocument(None, "doc", doctype)
26 doctype = getDOMImplementation().createDocumentType("doc", None, None)
27 doctype.entities._seq = []
28 doctype.notations._seq = []
31 doctype.notations._seq.append(notation)
38 doctype.entities._seq.append(entity)
39 return doctype
42 doctype = create_nonempty_doctype()
43 doc = create_doc_without_doctype(doctype)
44 doctype.entities.item(0).ownerDocument = doc
45 doctype.notations.item(0).ownerDocument = doc
625 "<!DOCTYPE doc [\n"
637 "<!DOCTYPE doc [\n"
652 if doc.doctype is not None:
653 # check the doctype iff the original DOM maintained it
654 self.confirm(doc2.doctype.nodeType == Node.DOCUMENT_TYPE_NODE,
655 "testCloneDocumentDeep: doctype not a DOCUMENT_TYPE_NODE")
656 self.confirm(doc2.doctype.ownerDocument.isSameNode(doc2))
657 self.confirm(not doc.doctype.isSameNode(doc2.doctype))
660 doctype = create_nonempty_doctype()
661 clone = doctype.cloneNode(1)
663 and clone.nodeName == doctype.nodeName
664 and clone.name == doctype.name
665 and clone.publicId == doctype.publicId
666 and clone.systemId == doctype.systemId
667 and len(clone.entities) == len(doctype.entities)
669 and len(clone.notations) == len(doctype.notations)
672 for i in range(len(doctype.entities)):
673 se = doctype.entities.item(i)
684 for i in range(len(doctype.notations)):
685 sn = doctype.notations.item(i)
695 clone = doc.doctype.cloneNode(1)
699 doctype = create_nonempty_doctype()
700 clone = doctype.cloneNode(0)
702 and clone.nodeName == doctype.nodeName
703 and clone.name == doctype.name
704 and clone.publicId == doctype.publicId
705 and clone.systemId == doctype.systemId
714 clone = doc.doctype.cloneNode(0)
732 src.doctype, 0)
738 src.doctype, 1)
1315 "<!DOCTYPE doc [\n"
1451 "<!DOCTYPE doc PUBLIC 'http://xml.python.org/public'"