Current File : //proc/3/task/3/root/proc/3/task/3/root/lib64/python2.7/site-packages/lxml/html/_html5builder.pyc
�
�ePc@s{dZddlmZmZddlmZmZdefd��YZdefd��YZ dej
fd ��YZ
d
S(s�
Legacy module - don't use in new code!
html5lib now has its own proper implementation.
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(thtmlRtDocumentTypecBseZd�ZRS(cCs||_||_||_dS(N(tnametpublicIdtsystemId(tselfRRR((s=/usr/lib64/python2.7/site-packages/lxml/html/_html5builder.pyt__init__s (t__name__t
__module__R(((s=/usr/lib64/python2.7/site-packages/lxml/html/_html5builder.pyRstDocumentcBseZd�Zd�ZRS(cCsd|_g|_dS(N(tNonet_elementTreet
childNodes(R((s=/usr/lib64/python2.7/site-packages/lxml/html/_html5builder.pyRs cCs|jj�j|j�dS(N(R
tgetroottaddnextt_element(Rtelement((s=/usr/lib64/python2.7/site-packages/lxml/html/_html5builder.pytappendChilds(R R
RR(((s=/usr/lib64/python2.7/site-packages/lxml/html/_html5builder.pyRs tTreeBuildercBsheZeZeZdZdZeZ d�Z
d�Zd�Zd�Z
d�Zdd�Zd�ZRS(cOs\tjtdt�}tjtdt�}|j|_|j|_t j
j|||�dS(NtfullTree(tetree_builderstgetETreeModuleRtFalseRtElementtelementClasstCommenttcommentClassRRR(Rtargstkwargsthtml_buildert
etree_builder((s=/usr/lib64/python2.7/site-packages/lxml/html/_html5builder.pyR's
cCs/tjj|�t|_g|_d|_dS(N(RRtresetRtrootInsertedtinitialCommentsRtdoctype(R((s=/usr/lib64/python2.7/site-packages/lxml/html/_html5builder.pyR!.s cCs
|jjS(N(tdocumentR
(R((s=/usr/lib64/python2.7/site-packages/lxml/html/_html5builder.pytgetDocument4scCseg}|jdj}|jr2|j|j�n|j|j��|jra|j|j�n|S(Ni(topenElementsRttexttappendtextendtgetchildrenttail(RtfragmentR((s=/usr/lib64/python2.7/site-packages/lxml/html/_html5builder.pytgetFragment7s cCs"|j|||�}||_dS(N(tdoctypeClassR$(RRRRR$((s=/usr/lib64/python2.7/site-packages/lxml/html/_html5builder.pyt
insertDoctypeAscCs6|js|jj|�ntjj|||�dS(N(R"R#R)RRt
insertComment(Rtdatatparent((s=/usr/lib64/python2.7/site-packages/lxml/html/_html5builder.pyR1Es cCsDg}|jr�|jjr�|jd|jj�|jjdk sV|jjdk r||jd|jj|jjf�n|jd�n|jd�tjdj|��}x'|j D]}|j
tj|��q�W|j
�|_|j�|j_|j|�}||_|jjj|�|jj|�t|_dS(Ns<!DOCTYPE %ss PUBLIC "%s" "%s"t>s
<html></html>t(R$RR)RRRRt
fromstringtjoinR#taddpreviousRRt
documentClassR%tgetroottreeR
RRRR'tTrueR"(RRtbuftroottcommenttroot_element((s=/usr/lib64/python2.7/site-packages/lxml/html/_html5builder.pyt
insertRootKs$$
N(R R
RR9RR/RRRt
fragmentClassRR!R&R.R0R1R@(((s=/usr/lib64/python2.7/site-packages/lxml/html/_html5builder.pyR s
N(t__doc__thtml5lib.treebuildersRRRtlxmlRtobjectRRR(((s=/usr/lib64/python2.7/site-packages/lxml/html/_html5builder.pyt<module> s