-í
³êç:c       sp     d  Z    d k Z d k Z d k Z  d k Z  d k l Z  d k l Z  d f  d „  ƒ  YZ	 d S(   s  
Components for reading HTML files from a SAX-like producer.
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
N(   s   Node(   s   implementations   HtmlDomGeneratorc      sƒ     d d „ Z   e d „ Z 0 d „  Z 4 d „  Z ; d „  Z C d „  Z I d „  Z S d	 „  Z [ d
 „  Z	 ^ d „  Z
 RS(   Ni    c    s     | |  _ d  S(   N(   s	   keepAllWss   selfs
   _keepAllWs(   s   selfs	   keepAllWs(    (    sM   /usr/local/twc/lib/python2.2/site-packages/_xmlplus/dom/ext/reader/HtmlSax.pys   __init__ s   c    sÐ      | t j o`   t i d ƒ |  _ ! |  i i } " |  i i | ƒ # t	 i
 i i | ƒ $ |  i |  _ n" & | |  _ ( |  i i ƒ  |  _ + g  |  _ , |  i i |  i ƒ - d |  _ . d Sd S(   sŽ   
        If None is passed in as the doc, set up an empty document to act
        as owner and also add all elements to this document
        s    N(   s   ownerDocs   Nones   implementations   createHTMLDocuments   selfs	   _ownerDocs   documentElements   des   removeChilds   xmls   doms   exts   ReleaseNodes	   _rootNodes   createDocumentFragments
   _nodeStacks   appends	   _currText(   s   selfs   ownerDocs   de(    (    sM   /usr/local/twc/lib/python2.2/site-packages/_xmlplus/dom/ext/reader/HtmlSax.pys	   initState s   c    s   0 1 |  i ƒ  2 |  i Sd  S(   N(   s   selfs   _completeTextNodes	   _rootNode(   s   self(    (    sM   /usr/local/twc/lib/python2.2/site-packages/_xmlplus/dom/ext/reader/HtmlSax.pys   getRootNode0 s   c    sS   4 5 |  i o? 6 |  i i |  i ƒ } 7 |  i d i | ƒ 8 d |  _ n d  S(   Niÿÿÿÿs    (   s   selfs	   _currTexts	   _ownerDocs   createTextNodes   new_texts
   _nodeStacks   appendChild(   s   selfs   new_text(    (    sM   /usr/local/twc/lib/python2.2/site-packages/_xmlplus/dom/ext/reader/HtmlSax.pys   _completeTextNode4 s   c    sp   ; < |  i ƒ  = |  i i | ƒ } ? x. | i ƒ  D? ] } @ | i	 | | | ƒ q5 WA |  i
 i | ƒ d  S(   N(   s   selfs   _completeTextNodes	   _ownerDocs   createElements   names   new_elements   attribss   keyss   curr_attrib_keys   setAttributes
   _nodeStacks   append(   s   selfs   names   attribss   curr_attrib_keys   new_element(    (    sM   /usr/local/twc/lib/python2.2/site-packages/_xmlplus/dom/ext/reader/HtmlSax.pys   startElement; s    	c    sH   C D |  i ƒ  E |  i d } F |  i d =G |  i d i | ƒ d  S(   Niÿÿÿÿ(   s   selfs   _completeTextNodes
   _nodeStacks   new_elements   appendChild(   s   selfs   names   new_element(    (    sM   /usr/local/twc/lib/python2.2/site-packages/_xmlplus/dom/ext/reader/HtmlSax.pys
   endElementC s   c    sS   I O P |  i o |  i d i t i j o" Q |  i | | | | !|  _ n d S(   s  
        If 'keepAllWs' permits, add ignorable white-space as a text node.
        Remember that a Document node cannot contain text nodes directly.
        If the white-space occurs outside the root element, there is no place
        for it in the DOM and it must be discarded.
        iÿÿÿÿN(
   s   selfs
   _keepAllWss
   _nodeStacks   nodeTypes   Nodes   DOCUMENT_NODEs	   _currTexts   chs   starts   length(   s   selfs   chs   starts   length(    (    sM   /usr/local/twc/lib/python2.2/site-packages/_xmlplus/dom/ext/reader/HtmlSax.pys   ignorableWhitespaceI s   'c    s%   S T |  i | | | | !|  _ d  S(   N(   s   selfs	   _currTexts   chs   starts   length(   s   selfs   chs   starts   length(    (    sM   /usr/local/twc/lib/python2.2/site-packages/_xmlplus/dom/ext/reader/HtmlSax.pys
   charactersS s   c    s   [ \ | ‚ d  S(   N(   s	   exception(   s   selfs	   exception(    (    sM   /usr/local/twc/lib/python2.2/site-packages/_xmlplus/dom/ext/reader/HtmlSax.pys   error[ s   c    s   ^ _ | ‚ d  S(   N(   s	   exception(   s   selfs	   exception(    (    sM   /usr/local/twc/lib/python2.2/site-packages/_xmlplus/dom/ext/reader/HtmlSax.pys
   fatalError^ s   (   s   __init__s   Nones	   initStates   getRootNodes   _completeTextNodes   startElements
   endElements   ignorableWhitespaces
   characterss   errors
   fatalError(    (    (    sM   /usr/local/twc/lib/python2.2/site-packages/_xmlplus/dom/ext/reader/HtmlSax.pys   HtmlDomGenerator s   
(
   s   __doc__s   syss   strings	   cStringIOs   xml.dom.exts   xmls   xml.doms   Nodes   implementations   HtmlDomGenerator(   s   syss	   cStringIOs   strings   xmls   implementations   HtmlDomGenerators   Node(    (    sM   /usr/local/twc/lib/python2.2/site-packages/_xmlplus/dom/ext/reader/HtmlSax.pys   ? s
   