Ņō žĒJc@s{dZddklZlZddklZlZdefd„ƒYZdefd„ƒYZ dei fd „ƒYZ d S( s  This module implements a tree builder for html5lib that generates lxml html element trees. This module uses camelCase as it follows the html5lib style guide. i˙˙˙˙(t_basetetree(thtmlRt DocumentTypecBseZd„ZRS(cCs||_||_||_dS(N(tnametpublicIdtsystemId(tselfRRR((s=/usr/lib64/python2.6/site-packages/lxml/html/_html5builder.pyt__init__ s  (t__name__t __module__R(((s=/usr/lib64/python2.6/site-packages/lxml/html/_html5builder.pyR stDocumentcBseZd„Zd„ZRS(cCsd|_g|_dS(N(tNonet _elementTreet childNodes(R((s=/usr/lib64/python2.6/site-packages/lxml/html/_html5builder.pyRs cCs|iiƒi|iƒdS(N(R tgetroottaddnextt_element(Rtelement((s=/usr/lib64/python2.6/site-packages/lxml/html/_html5builder.pyt appendChilds(R R RR(((s=/usr/lib64/python2.6/site-packages/lxml/html/_html5builder.pyR s t TreeBuildercBsheZeZeZdZdZeZ d„Z d„Z d„Z d„Z d„Zdd„Zd„ZRS(cCsVtitdtƒ}titdtƒ}|i|_|i|_t i i |ƒdS(NtfullTree( tetree_builderstgetETreeModuleRtFalseRtElementt elementClasstCommentt commentClassRRR(Rt html_buildert etree_builder((s=/usr/lib64/python2.6/site-packages/lxml/html/_html5builder.pyR#s   cCs/tii|ƒt|_g|_d|_dS(N(RRtresetRt rootInsertedtinitialCommentsR tdoctype(R((s=/usr/lib64/python2.6/site-packages/lxml/html/_html5builder.pyR*s  cCs |iiS(N(tdocumentR (R((s=/usr/lib64/python2.6/site-packages/lxml/html/_html5builder.pyt getDocument0scCsig}|idi}|io|i|iƒn|i|iƒƒ|io|i|iƒn|S(Ni(t openElementsRttexttappendtextendt getchildrenttail(RtfragmentR((s=/usr/lib64/python2.6/site-packages/lxml/html/_html5builder.pyt getFragment3s  cCs"|i|||ƒ}||_dS(N(t doctypeClassR"(RRRRR"((s=/usr/lib64/python2.6/site-packages/lxml/html/_html5builder.pyt insertDoctype=scCs8|ip|ii|ƒntii|||ƒdS(N(R R!R'RRt insertComment(Rtdatatparent((s=/usr/lib64/python2.6/site-packages/lxml/html/_html5builder.pyR/As cCsJg}|io‚|iiou|id|iiƒ|iidj p|iidj o'|id|ii|iifƒn|idƒn|idƒtidi|ƒƒ}x'|i D]}|i t i |ƒƒqÁW|i ƒ|_|iƒ|i_|i|ƒ}||_|iii|ƒ|ii|ƒt|_dS(Ns s u(R"RR'RR RRt fromstringtjoinR!t addpreviousRRt documentClassR#t getroottreeR RRRR%tTrueR (RRtbuftroottcommentt root_element((s=/usr/lib64/python2.6/site-packages/lxml/html/_html5builder.pyt insertRootGs&&   N(R R R R6RR-R RRt fragmentClassRRR$R,R.R/R=(((s=/usr/lib64/python2.6/site-packages/lxml/html/_html5builder.pyRs     N( t__doc__thtml5lib.treebuildersRRRtlxmlRtobjectRR R(((s=/usr/lib64/python2.6/site-packages/lxml/html/_html5builder.pyts