\STc@sdZddlZddlZddlmZddlmZmZddlmZddl m Z ddl m Z ddl m Z dd l m Z dd l mZdd l mZdd l mZdd l mZdefdYZdS(s WWW: http://4suite.com/4DOM e-mail: support@4suite.com Copyright (c) 2000 Fourthought Inc, USA. All Rights Reserved. See http://4suite.com/COPYRIGHT for license and copyright information iN(timplementation(tFtNodetget_name_pattern(t SplitQName(tNode(t XML_NAMESPACE(tXMLNS_NAMESPACE(tEMPTY_NAMESPACE(tHierarchyRequestErr(tInvalidCharacterErr(tNotSupportedErr(t NamespaceErrtDocumentcBseZejZdZejejejej gZ dZ dZ dZ dZdZdZdZdZd Zd Zd Zd Zd ZdZdZdZdZdZdZdZdZdZ dZ!dZ"dZ#dZ$dZ%dZ&dZ'dZ(dZ)d Z*d!Z+d"Z,d#Z-d$Z.d%Z/d&Z0e1j2j3Z2e2j4ie d'6e d(6ed)6ed*6e1j5j3Z5e6e5d+e1j7e2j8Z7RS(,s #documentcCsitj|dd|jdtj|stnddlm}||||S(Ni(tProcessingInstruction(RRR R-(RttargetR"R-((sD/opt/freeware/lib64/python2.7/site-packages/_xmlplus/dom/Document.pytcreateProcessingInstructionbs cCsddlm}|||S(Ni(tText(R0(RR"R0((sD/opt/freeware/lib64/python2.7/site-packages/_xmlplus/dom/Document.pytcreateTextNodeoscCsdS(N(R(Rt elementId((sD/opt/freeware/lib64/python2.7/site-packages/_xmlplus/dom/Document.pytgetElementByIdsscCsltjg}|j}|rh|dks9|j|krI|j|n|jt|j|n|S(Nt*(Rt_4dom_createNodeListtdocumentElementttagNametappendtextendtlisttgetElementsByTagName(RR7tnodeListtroot((sD/opt/freeware/lib64/python2.7/site-packages/_xmlplus/dom/Document.pyR;ws c Cstj|stnddlm}t|\}}|dkrd|tkrdtn|dkr|tkrtn|||td|S|dkrtdn<| r|s| r|rtn||||||SdS(Ni(Rtxmltxmlnsts*Use None instead of '' for empty namespace(RRR RRRR R(Rt namespaceURIt qualifiedNameRtprefixt localName((sD/opt/freeware/lib64/python2.7/site-packages/_xmlplus/dom/Document.pytcreateAttributeNSs       cCsX|j}|tjtjgkr-tn|tjkrEd}n|j|d|S(NitnewOwner(tnodeTypeRt DOCUMENT_NODERR tENTITY_REFERENCE_NODEt cloneNode(Rt importedNodetdeept importType((sD/opt/freeware/lib64/python2.7/site-packages/_xmlplus/dom/Document.pyt importNodes    cCsddlm}tj|s.tnt|\}}|dkrd|tkrdtn|r}| r}tn|dkrtdn||||||S(Ni(R(R>R@s*Use None instead of '' for empty namespace(R(RRR RRR (RRARBR(RCRD((sD/opt/freeware/lib64/python2.7/site-packages/_xmlplus/dom/Document.pytcreateElementNSs     cCs|dkrtdntjg}|j}|r|dksT||jkr|dkso||jkr|j|n|jt|j ||n|S(NR@s*Use None instead of '' for empty namespaceR4( R RR5R6RARDR8R9R:tgetElementsByTagNameNS(RRARDR<R=((sD/opt/freeware/lib64/python2.7/site-packages/_xmlplus/dom/Document.pyRPs  cCs#ddlm}|||||S(Ni(t NodeIterator(RQ(RR=t whatToShowtfiltertentityReferenceExpansionRQ((sD/opt/freeware/lib64/python2.7/site-packages/_xmlplus/dom/Document.pytcreateNodeIteratorscCs#ddlm}|||||S(Ni(t TreeWalker(RV(RR=RRRSRTRV((sD/opt/freeware/lib64/python2.7/site-packages/_xmlplus/dom/Document.pytcreateTreeWalkerscCs5ddl}||jkr(|j|StdS(Ni(tEventtsupportedEventst MutationEventR (Rt eventTypeRX((sD/opt/freeware/lib64/python2.7/site-packages/_xmlplus/dom/Document.pyt createEvents  cCs:|jjdds!tnddl}|j|S(NtRANGEs2.0i(Rt hasFeatureR tRange(RR_((sD/opt/freeware/lib64/python2.7/site-packages/_xmlplus/dom/Document.pyt createRanges  cCs|j|tj||S(N(t_4dom_addSingleRt appendChild(RtnewChild((sD/opt/freeware/lib64/python2.7/site-packages/_xmlplus/dom/Document.pyRbs cCs |j|tj|||S(N(RaRt insertBefore(RRctoldChild((sD/opt/freeware/lib64/python2.7/site-packages/_xmlplus/dom/Document.pyRds cCs|jtjkrM|jd}|||gkrAd|jdtXMLtHTML(tisXmltid(R((sD/opt/freeware/lib64/python2.7/site-packages/_xmlplus/dom/Document.pyt__repr__scCs#ddlm}|||||S(Ni(tEntity(Rw(RtpublicIdtsystemIdt notationNameRw((sD/opt/freeware/lib64/python2.7/site-packages/_xmlplus/dom/Document.pyt_4dom_createEntity scCs#ddlm}|||||S(Ni(tNotation(R|(RRxRyRR|((sD/opt/freeware/lib64/python2.7/site-packages/_xmlplus/dom/Document.pyt_4dom_createNotationscCsH|jd rD|dk rD||jd<|j|tj||SdS(NR (RRt_4dom_setOwnerDocumentRRb(RR((sD/opt/freeware/lib64/python2.7/site-packages/_xmlplus/dom/Document.pyRs  cCs|jtjkr|j||jdkrA|jj|n|jdrZtn||jd<|jdr|jdj |j qndS(s6Make sure only one Element node is added to a DocumentRR N( RGRRt_4dom_validateNodet parentNodeRRkRRRhRi(RRl((sD/opt/freeware/lib64/python2.7/site-packages/_xmlplus/dom/Document.pyRas     cCsdS(N(N(R(R((sD/opt/freeware/lib64/python2.7/site-packages/_xmlplus/dom/Document.pyt__getinitargs__)scCs|j|j|jfS(N(RnRR6(R((sD/opt/freeware/lib64/python2.7/site-packages/_xmlplus/dom/Document.pyt __getstate__,scCs=|\}}}tj||||jd<||jdJs(9t__name__t __module__RRHRGRitPROCESSING_INSTRUCTION_NODEt COMMENT_NODERRt_allowedChildrenRRRRRR R#R%R'R*R,R/R1R3R;RERNRORPRURWR\R`RbRdRgRkRJRvR{R}RRaRRRRtRRt_readComputedAttrstcopytupdatet_writeComputedAttrsRSt_readOnlyAttrstkeys(((sD/opt/freeware/lib64/python2.7/site-packages/_xmlplus/dom/Document.pyR sh                                    (t__doc__tretstringtDOMImplementationRRRtextRtxml.domRRRRRR R R R (((sD/opt/freeware/lib64/python2.7/site-packages/_xmlplus/dom/Document.pyt s