Tryag File Manager
Home
-
Turbo Force
Current Path :
/
usr
/
lib
/
python2.4
/
site-packages
/
_xmlplus
/
sax
/
Upload File :
New :
File
Dir
//usr/lib/python2.4/site-packages/_xmlplus/sax/saxutils.pyo
mò xùžNc�����������@���s{��d��Z��d�k�Z�d�k�Z�d�k�Z�d�k�Z�d�k�Z�d�k�Z�d�k�Z�d�k�Z�d�k �Z �y�e�i �e�i�g�Z�Wn�e �j �o�e�i �g�Z�n�Xd�„��Z�h��d�„�Z�h��d�„�Z�h��d�„�Z�d�e�i�e�i�e�i�e�i�f�d�„��ƒ��YZ�d�f��d �„��ƒ��YZ�d �f��d�„��ƒ��YZ�d�f��d �„��ƒ��YZ�d�k�l�Z�d�k�Z�d�„��Z�e�e�d�ƒ�o�h��d�„�Z�n �h��d�„�Z�d�„��Z�d�e�i�f�d�„��ƒ��YZ �d�e �e �i!�f�d�„��ƒ��YZ"�d�e �f�d�„��ƒ��YZ#�d�e �i$�f�d�„��ƒ��YZ%�e%�Z&�d�e�i'�f�d�„��ƒ��YZ(�d�d�„�Z)�d �f��d!�„��ƒ��YZ*�d"�f��d#�„��ƒ��YZ+�d�k �Z �d$�e �i,�f�d%�„��ƒ��YZ-�d&�e �i,�f�d'�„��ƒ��YZ.�d(�f��d)�„��ƒ��YZ/�d�S(*���s¬��� A library of useful helper classes to the saxlib classes, for the convenience of application and driver writers. $Id: saxutils.py,v 1.35 2004/03/20 07:46:04 fdrake Exp $ Nc���������C���s3���x,�|�i�ƒ��D]�\�}�}�|��i�|�|�ƒ�}��q �W|��S(���s2���Replace substrings of a string using a dictionary.N(���t���dt���itemst���keyt���valuet���st���replace(���R���R����R���R���(����(����t9���/usr/lib/python2.4/site-packages/_xmlplus/sax/saxutils.pyt���__dict_replace���s ����� �c���������C���sT���|��i�d�d�ƒ�}��|��i�d�d�ƒ�}��|��i�d�d�ƒ�}��|�o�t�|��|�ƒ�}��n�|��S(���sü���Escape &, <, and > in a string of data. You can escape other strings of data by passing a dictionary as the optional entities parameter. The keys and values must all be strings; each key will be replaced with its corresponding value. t���&s���&t���<s���<t���>s���>N(���t���dataR���t���entitiesR���(���R���R���(����(����R���t���escape���s�����c���������C���sN���|��i�d�d�ƒ�}��|��i�d�d�ƒ�}��|�o�t�|��|�ƒ�}��n�|��i�d�d�ƒ�S(���s ��Unescape &, <, and > in a string of data. You can unescape other strings of data by passing a dictionary as the optional entities parameter. The keys and values must all be strings; each key will be replaced with its corresponding value. s���<R ���s���>R ���s���&R���N(���R���R���R���R���(���R���R���(����(����R���t���unescape&���s�����c���������C���s_���t��|��|�ƒ�}��d�|��j�o5�d�|��j�o�d�|��i�d�d�ƒ�}��q[�d�|��}��n�d�|��}��|��S(���s“��Escape and quote an attribute value. Escape &, <, and > in a string of data, then quote it for use as an attribute value. The " character will be escaped as well, if necessary. You can escape other strings of data by passing a dictionary as the optional entities parameter. The keys and values must all be strings; each key will be replaced with its corresponding value. t���"t���'s���"%s"s���"s���'%s'N(���R ���R���R���R���(���R���R���(����(����R���t ���quoteattr4���s���� � t���DefaultHandlerc�����������B���s���t��Z�d��Z�RS(���sÏ���Default base class for SAX2 event handlers. Implements empty methods for all callback methods, which can be overridden by application implementors. Replaces the deprecated SAX1 HandlerBase class.(���t���__name__t ���__module__t���__doc__(����(����(����R���R���K���s���t���Locationc�����������B���sD���t��Z�d��Z�d�„��Z�d�„��Z�d�„��Z�d�„��Z�d�„��Z�d�„��Z�RS(���s¥���Represents a location in an XML entity. Initialized by being passed a locator, from which it reads off the current location, which is then stored internally.c���������C���s@���|�i�ƒ��|��_�|�i�ƒ��|��_�|�i�ƒ��|��_�|�i�ƒ��|��_ �d��S(���N( ���t���locatort���getColumnNumbert���selft���_Location__colt ���getLineNumbert���_Location__linet���getPublicIdt���_Location__pubidt���getSystemIdt���_Location__sysid(���R���R���(����(����R���t���__init__Y���s����c���������C���s���|��i�S(���N(���R���R���(���R���(����(����R���R���_���s����c���������C���s���|��i�S(���N(���R���R���(���R���(����(����R���R���b���s����c���������C���s���|��i�S(���N(���R���R���(���R���(����(����R���R���e���s����c���������C���s���|��i�S(���N(���R���R ���(���R���(����(����R���R���h���s����c���������C���sk���|��i�d��j�o �d�}�n �|��i�}�|��i�d��j�o �d�}�n �|��i�}�d�|��i�p�|��i�p�d�|�|�f�S(���Nt���?s���%s:%s:%ss ���<unknown>(���R���R���t���Nonet���lineR���t���colR ���R���(���R���R$���R%���(����(����R���t���__str__k���s���� ( ���R���R���R���R!���R���R���R���R���R&���(����(����(����R���R���T���s���� t���ErrorPrinterc�����������B���sD���t��Z�d��Z�d�e�i�d�„�Z�d�„��Z�d�„��Z�d�„��Z�d�„��Z �RS(���s?���A simple class that just prints error messages to standard out.i����c���������C���s���|�|��_�|�|��_�d��S(���N(���t���levelR���t���_levelt���outfilet���_outfile(���R���R(���R*���(����(����R���R!���}���s���� c���������C���sA���|��i�d�j�o-�|��i�i�d�|��i�|�ƒ�|�i�ƒ��f�ƒ�n�d��S(���Ni����s���WARNING in %s: %s (���R���R)���R+���t���writet���_ErrorPrinter__getpost ���exceptiont ���getMessage(���R���R.���(����(����R���t���warning���s����c���������C���sA���|��i�d�j�o-�|��i�i�d�|��i�|�ƒ�|�i�ƒ��f�ƒ�n�d��S(���Ni���s���ERROR in %s: %s (���R���R)���R+���R,���R-���R.���R/���(���R���R.���(����(����R���t���error‡���s����c���������C���sA���|��i�d�j�o-�|��i�i�d�|��i�|�ƒ�|�i�ƒ��f�ƒ�n�d��S(���Ni���s���FATAL ERROR in %s: %s (���R���R)���R+���R,���R-���R.���R/���(���R���R.���(����(����R���t ���fatalError���s����c���������C���sB���t��|�t�i�ƒ�o'�d�|�i�ƒ��|�i�ƒ��|�i�ƒ��f�Sn�d�Sd��S(���Ns���%s:%s:%ss ���<unknown>(���t ���isinstanceR.���t���_exceptionst���SAXParseExceptionR���R���R���(���R���R.���(����(����R���t���__getpos“���s����'( ���R���R���R���t���syst���stderrR!���R0���R1���R2���R-���(����(����(����R���R'���z���s���� t���ErrorRaiserc�����������B���s5���t��Z�d��Z�d�d�„�Z�d�„��Z�d�„��Z�d�„��Z�RS(���s<���A simple class that just raises the exceptions it is passed.i����c���������C���s ���|�|��_�d��S(���N(���R(���R���R)���(���R���R(���(����(����R���R!��� ���s����c���������C���s���|��i�d�j�o �|�‚�n�d��S(���Ni���(���R���R)���R.���(���R���R.���(����(����R���R1���£���s����c���������C���s���|��i�d�j�o �|�‚�n�d��S(���Ni���(���R���R)���R.���(���R���R.���(����(����R���R2���§���s����c���������C���s���|��i�d�j�o �|�‚�n�d��S(���Ni����(���R���R)���R.���(���R���R.���(����(����R���R0���«���s����(���R���R���R���R!���R1���R2���R0���(����(����(����R���R9������s ���� (���s���AttributesImplc���������C���s���t��i�|�ƒ�d�}�|�|��ƒ�S(���Ni���(���t���codecst���lookupt���encodingt���writerclasst���stream(���R>���R<���R=���(����(����R���t���_outputwrapperµ���s����t���register_errorc���������C���s,���d�|��_�|��i�t�|�|�ƒ�ƒ�d�|��_�d��S(���Nt���xmlcharrefreplacet���strict(���R>���t���errorsR,���R ���t���textR���(���R>���RD���R���(����(����R���t ���writetextº���s���� c���������C���s‰���t��|�|�ƒ�}�y�|��i�|�ƒ�Wnb�t�j �oV�xQ�|�D]D�}�y�|��i�|�ƒ�Wq8�t�j �o�|��i�d�t�|�ƒ�ƒ�q8�Xq8�Wn�Xd��S(���Nu���&#%d;(���R ���RD���R���R>���R,���t���UnicodeErrort���ct���ord(���R>���RD���R���RG���(����(����R���RE���¿���s�����c���������C���sž���|�i�d�ƒ�}�|�oN�|�i�d�ƒ�}�|�|�j�o�h��d�d�<}�d�}�qp�h��d�d�<}�d�}�n �h��}�d�}�|��i�|�ƒ�t�|��|�|�ƒ�|��i�|�ƒ�d��S(���NR���R���s���"s���'( ���RD���t���countt���countdoublet���countsingleR���t���quoteR>���R,���RE���(���R>���RD���R���RK���RL���RJ���(����(����R���t ���writeattrÊ���s���� t���XMLGeneratorc�����������B���sw���t��Z�d�Z�d��d�d�„�Z�d�„��Z�d�„��Z�d�„��Z�d�„��Z�d�„��Z �d �„��Z �d �„��Z�d�„��Z�d�„��Z �d �„��Z�RS(���Ns���xml.sax.saxutils.prefix%ss ���iso-8859-1c���������C���s€���|�d��j�o�d��k�}�|�i�}�n�t�i�i�|��ƒ�t�|�|�ƒ�|��_ �h��g�|��_�|��i�d�|��_�g��|��_ �|�|��_�d�|��_�d��S(���Niÿÿÿÿi����(���t���outR#���R7���t���stdoutt���handlert���ContentHandlerR!���R���R?���R<���t���_outt���_ns_contextst���_current_contextt���_undeclared_ns_mapst ���_encodingt���_generated_prefix_ctr(���R���RO���R<���R7���(����(����R���R!���ß���s���� c���������C���s���|��i�i�d�|��i�ƒ�d��S(���Ns$���<?xml version="1.0" encoding="%s"?> (���R���RS���R,���RW���(���R���(����(����R���t ���startDocumentî���s����c���������C���s@���|��i�i�|��i�i�ƒ��ƒ�|�|��i�|�<|��i�i�|�|�f�ƒ�d��S(���N(���R���RT���t���appendRU���t���copyt���prefixt���uriRV���(���R���R\���R]���(����(����R���t���startPrefixMappingò���s���� c���������C���s���|��i�d�|��_�|��i�d�=d��S(���Niÿÿÿÿ(���R���RT���RU���(���R���R\���(����(����R���t���endPrefixMapping÷���s����c���������C���si���|��i�i�d�|�ƒ�x>�|�i�ƒ��D]0�\�}�}�|��i�i�d�|�ƒ�t�|��i�|�ƒ�q!�W|��i�i�d�ƒ�d��S(���NR ���s��� %s=R ���(���R���RS���R,���t���namet���attrsR���R���RM���(���R���R`���Ra���R���(����(����R���t���startElementû���s���� �c���������C���s���|��i�i�d�|�ƒ�d��S(���Ns���</%s>(���R���RS���R,���R`���(���R���R`���(����(����R���t ���endElement��s����c���������C���só��|�d�d��j�o�|�d�}�nD�|��i�|�d�d��j�o�|�d�}�n�|��i�|�d�d�|�d�}�|��i�i�d�|�ƒ�x]�|��i�D]R�\�}�}�|�d��j�o�|��i�i�d�|�p�d�ƒ�q€�|��i�i�d�|�|�f�ƒ�q€�Wg��|��_�xý�|�i �ƒ��D]ï�\�}�}�|�d�d��j�o�|�d�}�n¡�|��i�|�d�d��j�ok�|��i�|��i �}�|��i �d�|��_ �|�d�|�d�}�|��i�i�d�|�t�|�d�ƒ�f�ƒ�|�|��i�|�d�<n�|��i�|�d�d�|�d�}�|��i�i�d �|�ƒ�t�|��i�|�ƒ�qì�W|��i�i�d �ƒ�d��S(���Ni����i���t���:R ���s��� xmlns="%s"t����s��� xmlns:%s="%s"s��� xmlns:%s=%ss��� %s=R ���(���R`���R#���R���RU���RS���R,���RV���t���kt���vRa���R���R���t���GENERATED_PREFIXRX���R\���R���RM���(���R���R`���t���qnameRa���Rf���R���R\���Rg���(����(����R���t���startElementNS��s4���� � �$c���������C���sz���|�d�d��j�o�|�d�}�nD�|��i�|�d�d��j�o�|�d�}�n�|��i�|�d�d�|�d�}�|��i�i�d�|�ƒ�d��S(���Ni����i���Rd���s���</%s>(���R`���R#���Ri���R���RU���RS���R,���(���R���R`���Ri���(����(����R���t���endElementNS(��s����c���������C���s���t��|��i�|�ƒ�d��S(���N(���RE���R���RS���t���content(���R���Rl���(����(����R���t ���characters4��s����c���������C���s���|��i�i�|�ƒ�d��S(���N(���R���RS���R,���Rl���(���R���Rl���(����(����R���t���ignorableWhitespace7��s����c���������C���s���|��i�i�d�|�|�f�ƒ�d��S(���Ns ���<?%s %s?>(���R���RS���R,���t���targetR���(���R���Ro���R���(����(����R���t���processingInstruction:��s����(���R���R���Rh���R#���R!���RY���R^���R_���Rb���Rc���Rj���Rk���Rm���Rn���Rp���(����(����(����R���RN���Ü���s��� # t���LexicalXMLGeneratorc�����������B���sS���t��Z�d��Z�e�d�d�„�Z�d�„��Z�d�„��Z�d�„��Z�d�„��Z�d�„��Z �d�„��Z �RS( ���s>���A XMLGenerator that also supports the LexicalHandler interfaces ���iso-8859-1c���������C���s ���t��i�|��|�|�ƒ�d�|��_�d��S(���Ni����(���RN���R!���R���RO���R<���t ���_in_cdata(���R���RO���R<���(����(����R���R!���A��s����c���������C���sD���|��i�o �|��i�i�|�i�d�d�ƒ�ƒ�n�|��i�i�t�|�ƒ�ƒ�d��S(���Ns���]]>s���]]>]]><![CDATA[(���R���Rr���RS���R,���Rl���R���R ���(���R���Rl���(����(����R���Rm���E��s���� c���������C���sƒ���|��i�i�d�|�ƒ�|�o8�|��i�i�d�t�|�p�d�ƒ�t�|�p�d�ƒ�f�ƒ�n-�|�o%�|��i�i�d�t�|�p�d�ƒ�ƒ�n�d��S(���Ns���<!DOCTYPE %ss ��� PUBLIC %s %sRe���s ��� SYSTEM %s(���R���RS���R,���R`���t ���public_idR���t ���system_id(���R���R`���Rs���Rt���(����(����R���t���startDTDN��s ����8c���������C���s���|��i�i�d�ƒ�d��S(���NR ���(���R���RS���R,���(���R���(����(����R���t���endDTDW��s����c���������C���s4���|��i�i�d�ƒ�|��i�i�|�ƒ�|��i�i�d�ƒ�d��S(���Ns���<!--s���-->(���R���RS���R,���Rl���(���R���Rl���(����(����R���t���commentZ��s����c���������C���s���d�|��_�|��i�i�d�ƒ�d��S(���Ni���s ���<![CDATA[(���R���Rr���RS���R,���(���R���(����(����R���t ���startCDATA_��s���� c���������C���s���d�|��_�|��i�i�d�ƒ�d��S(���Ni����s���]]>(���R���Rr���RS���R,���(���R���(����(����R���t���endCDATAc��s���� (���R���R���R���R#���R!���Rm���Ru���Rv���Rw���Rx���Ry���(����(����(����R���Rq���>��s���� t���ContentGeneratorc�����������B���s���t��Z�d�„��Z�RS(���Nc���������C���s���t��i�|��|�|�|�|�!ƒ�S(���N(���RN���Rm���R���t���strt���startt���end(���R���R{���R|���R}���(����(����R���Rm���k��s����(���R���R���Rm���(����(����(����R���Rz���i��s���t ���XMLFilterBasec�����������B���sï���t��Z�d��Z�d�„��Z�d�„��Z�d�„��Z�d�„��Z�d�„��Z�d�„��Z�d�„��Z �d�„��Z �d �„��Z�d �„��Z�d�„��Z �d�„��Z�d �„��Z�d�„��Z�d�„��Z�d�„��Z�d�„��Z�d�„��Z�d�„��Z�d�„��Z�d�„��Z�d�„��Z�d�„��Z�d�„��Z�d�„��Z�RS(���sY��This class is designed to sit between an XMLReader and the client application's event handlers. By default, it does nothing but pass requests up to the reader and events on to the handlers unmodified, but subclasses can override specific methods to modify the event stream or the configuration requests as they pass through.c���������C���s���|��i�i�|�ƒ�d��S(���N(���R���t���_err_handlerR1���R.���(���R���R.���(����(����R���R1���{��s����c���������C���s���|��i�i�|�ƒ�d��S(���N(���R���R���R2���R.���(���R���R.���(����(����R���R2���~��s����c���������C���s���|��i�i�|�ƒ�d��S(���N(���R���R���R0���R.���(���R���R.���(����(����R���R0�����s����c���������C���s���|��i�i�|�ƒ�d��S(���N(���R���t ���_cont_handlert���setDocumentLocatorR���(���R���R���(����(����R���R���†��s����c���������C���s���|��i�i�ƒ��d��S(���N(���R���R€���RY���(���R���(����(����R���RY���‰��s����c���������C���s���|��i�i�ƒ��d��S(���N(���R���R€���t���endDocument(���R���(����(����R���R‚���Œ��s����c���������C���s���|��i�i�|�|�ƒ�d��S(���N(���R���R€���R^���R\���R]���(���R���R\���R]���(����(����R���R^�����s����c���������C���s���|��i�i�|�ƒ�d��S(���N(���R���R€���R_���R\���(���R���R\���(����(����R���R_���’��s����c���������C���s���|��i�i�|�|�ƒ�d��S(���N(���R���R€���Rb���R`���Ra���(���R���R`���Ra���(����(����R���Rb���•��s����c���������C���s���|��i�i�|�ƒ�d��S(���N(���R���R€���Rc���R`���(���R���R`���(����(����R���Rc���˜��s����c���������C���s���|��i�i�|�|�|�ƒ�d��S(���N(���R���R€���Rj���R`���Ri���Ra���(���R���R`���Ri���Ra���(����(����R���Rj���›��s����c���������C���s���|��i�i�|�|�ƒ�d��S(���N(���R���R€���Rk���R`���Ri���(���R���R`���Ri���(����(����R���Rk���ž��s����c���������C���s���|��i�i�|�ƒ�d��S(���N(���R���R€���Rm���Rl���(���R���Rl���(����(����R���Rm���¡��s����c���������C���s���|��i�i�|�ƒ�d��S(���N(���R���R€���Rn���t���chars(���R���Rƒ���(����(����R���Rn���¤��s����c���������C���s���|��i�i�|�|�ƒ�d��S(���N(���R���R€���Rp���Ro���R���(���R���Ro���R���(����(����R���Rp���§��s����c���������C���s���|��i�i�|�ƒ�d��S(���N(���R���R€���t ���skippedEntityR`���(���R���R`���(����(����R���R„���ª��s����c���������C���s���|��i�i�|�|�|�ƒ�d��S(���N(���R���t���_dtd_handlert���notationDeclR`���t���publicIdt���systemId(���R���R`���R‡���Rˆ���(����(����R���R†���¯��s����c���������C���s���|��i�i�|�|�|�|�ƒ�d��S(���N(���R���R…���t���unparsedEntityDeclR`���R‡���Rˆ���t���ndata(���R���R`���R‡���Rˆ���RŠ���(����(����R���R‰���²��s����c���������C���s���|��i�i�|�|�ƒ�d��S(���N(���R���t���_ent_handlert ���resolveEntityR‡���Rˆ���(���R���R‡���Rˆ���(����(����R���RŒ���·��s����c���������C���sT���|��i�i�|��ƒ�|��i�i�|��ƒ�|��i�i�|��ƒ�|��i�i�|��ƒ�|��i�i�|�ƒ�d��S(���N(���R���t���_parentt���setContentHandlert���setErrorHandlert���setEntityResolvert ���setDTDHandlert���parset���source(���R���R“���(����(����R���R’���¼��s ����c���������C���s���|��i�i�|�ƒ�d��S(���N(���R���R���t ���setLocalet���locale(���R���R•���(����(����R���R”���Ã��s����c���������C���s���|��i�i�|�ƒ�S(���N(���R���R���t ���getFeatureR`���(���R���R`���(����(����R���R–���Æ��s����c���������C���s���|��i�i�|�|�ƒ�d��S(���N(���R���R���t ���setFeatureR`���t���state(���R���R`���R˜���(����(����R���R—���É��s����c���������C���s���|��i�i�|�ƒ�S(���N(���R���R���t���getPropertyR`���(���R���R`���(����(����R���R™���Ì��s����c���������C���s���|��i�i�|�|�ƒ�d��S(���N(���R���R���t���setPropertyR`���R���(���R���R`���R���(����(����R���Rš���Ï��s����(���R���R���R���R1���R2���R0���R���RY���R‚���R^���R_���Rb���Rc���Rj���Rk���Rm���Rn���Rp���R„���R†���R‰���RŒ���R’���R”���R–���R—���R™���Rš���(����(����(����R���R~���q��s4���� t���BaseIncrementalParserc�����������B���s ���t��Z�d��Z�d�„��Z�d�„��Z�RS(���sÄ���This class implements the parse method of the XMLReader interface using the feed, close and reset methods of the IncrementalParser interface as a convenience to SAX 2.0 driver writers.c���������C���s—���t��|�ƒ�}�|��i�|�ƒ�|��i�i�ƒ��|�i�ƒ��}�|�i�d�ƒ�}�x.�|�d�j�o �|��i �|�ƒ�|�i�d�ƒ�}�qD�W|��i�ƒ��|��i�ƒ��|��i�i �ƒ��d��S(���Ni�@��Re���(���t���prepare_input_sourceR“���R���t ���prepareParserR€���RY���t ���getByteStreamt���inft���readt���buffert���feedt���closet���resetR‚���(���R���R“���R¡���RŸ���(����(����R���R’���Ý��s���� � c���������C���s���t��d�ƒ�‚�d�S(���st���This method is called by the parse implementation to allow the SAX 2.0 driver to prepare itself for parsing.s!���prepareParser must be overridden!N(���t���NotImplementedError(���R���R“���(����(����R���R���ï��s�����(���R���R���R���R’���R���(����(����(����R���R›���×��s���� Re���c���������C���sE��t��|��ƒ�t�j�o�t�i�|��ƒ�}��nX�t�|��d�ƒ�oG�|��}�t�i�ƒ��}��|��i�|�ƒ�t�|�d�ƒ�o�|��i�|�i �ƒ�q}�n�|��i �ƒ��d�j�o±�|��i�ƒ��}�t�i�i�t�i�i�|�ƒ�ƒ�}�t�i�i�|�|�ƒ�}�t�i�i�|�ƒ�o �|��i�|�ƒ�t�|�d�ƒ�}�n/�|��i�t�i�|�|�ƒ�ƒ�t�i�|��i�ƒ��ƒ�}�|��i�|�ƒ�n�|��S(���s‚���This function takes an InputSource and an optional base URL and returns a fully resolved InputSource object ready for reading.R ���R`���t���rbN(���t���typeR“���t���_StringTypest ���xmlreadert���InputSourcet���hasattrt���ft ���setByteStreamt���setSystemIdR`���Rž���R#���R���t���sysidt���ost���patht���dirnamet���normpatht���baset���baseheadt���joint ���sysidfilenamet���isfilet���opent���urlparset���urljoint���urllib2t���urlopen(���R“���R´���R¯���R¬���R·���Rµ���(����(����R���Rœ���ö��s(����� t���AttributeMapc�����������B���s†���t��Z�d��Z�d�„��Z�d�„��Z�d�„��Z�d�„��Z�d�„��Z�d�„��Z�d�„��Z �d�„��Z �d �„��Z�d �„��Z�e �d�„�Z�d�„��Z�d �„��Z�RS(���sz���An implementation of AttributeList that takes an (attr,val) hash and uses it to implement the AttributeList interface.c���������C���s ���|�|��_��d��S(���N(���t���mapR���(���R���R¿���(����(����R���R!�����s����c���������C���s���t��|��i�i�ƒ��ƒ�S(���N(���t���lenR���R¿���t���keys(���R���(����(����R���t ���getLength!��s����c���������C���s5���y�|��i�i�ƒ��|�SWn�t�j �o �}�d��Sn�Xd��S(���N(���R���R¿���RÁ���t���it ���IndexErrort���eR#���(���R���RÃ���RÅ���(����(����R���t���getName$��s����c���������C���s���d�S(���Nt���CDATA(����(���R���RÃ���(����(����R���t���getType*��s����c���������C���s]���y=�t��|�ƒ�t�i�j�o�|��i�|��i�|�ƒ�Sn�|��i�|�SWn�t�j �o �}�d��Sn�Xd��S(���N( ���R§���RÃ���t���typest���IntTypeR���R¿���RÆ���t���KeyErrorRÅ���R#���(���R���RÃ���RÅ���(����(����R���t���getValue-��s����c���������C���s ���t��|��i�ƒ�S(���N(���RÀ���R���R¿���(���R���(����(����R���t���__len__6��s����c���������C���s:���t��|�ƒ�t�i�j�o�|��i�i�ƒ��|�Sn�|��i�|�Sd��S(���N(���R§���R���RÉ���RÊ���R���R¿���RÁ���(���R���R���(����(����R���t���__getitem__9��s����c���������C���s ���|��i�i�ƒ��S(���N(���R���R¿���R���(���R���(����(����R���R���?��s����c���������C���s ���|��i�i�ƒ��S(���N(���R���R¿���RÁ���(���R���(����(����R���RÁ���B��s����c���������C���s���|��i�i�|�ƒ�S(���N(���R���R¿���t���has_keyR���(���R���R���(����(����R���RÏ���E��s����c���������C���s���|��i�i�|�|�ƒ�S(���N(���R���R¿���t���getR���t���alternative(���R���R���RÑ���(����(����R���RÐ���H��s����c���������C���s���t��|��i�i�ƒ��ƒ�S(���N(���R¾���R���R¿���R[���(���R���(����(����R���R[���K��s����c���������C���s ���|��i�i�ƒ��S(���N(���R���R¿���t���values(���R���(����(����R���RÒ���N��s����(���R���R���R���R!���RÂ���RÆ���RÈ���RÌ���RÍ���RÎ���R���RÁ���RÏ���R#���RÐ���R[���RÒ���(����(����(����R���R¾�����s���� t���EventBroadcasterc�����������B���s<���t��Z�d��Z�d�f��d�„��ƒ��YZ�d�„��Z�d�„��Z�d�„��Z�RS(���s«���Takes a list of objects and forwards any method calls received to all objects in the list. The attribute list holds the list and can freely be modified by clients.t���Eventc�����������B���s ���t��Z�d��Z�d�„��Z�d�„��Z�RS(���s,���Helper objects that represent event methods.c���������C���s���|�|��_��|�|��_�d��S(���N(���t���listR���R`���(���R���RÕ���R`���(����(����R���R!���[��s���� c���������G���s1���x*�|��i�D]�}�t�t�|�|��i�ƒ�|�ƒ�q �Wd��S(���N(���R���RÕ���t���objt���applyt���getattrR`���t���rest(���R���RÙ���RÖ���(����(����R���t���__call___��s���� �(���R���R���R���R!���RÚ���(����(����(����R���RÔ���X��s���� c���������C���s ���|�|��_��d��S(���N(���RÕ���R���(���R���RÕ���(����(����R���R!���c��s����c���������C���s���|��i�|��i�|�ƒ�S(���N(���R���RÔ���RÕ���R`���(���R���R`���(����(����R���t���__getattr__f��s����c���������C���s���d�t��|��ƒ�S(���Ns!���<EventBroadcaster instance at %d>(���t���idR���(���R���(����(����R���t���__repr__i��s����(���R���R���R���RÔ���R!���RÛ���RÝ���(����(����(����R���RÓ���S��s ���� t���ESISDocHandlerc�����������B���sA���t��Z�d��Z�e�i�d�„�Z�d�„��Z�d�„��Z�d�„��Z�d�„��Z �RS(���s7���A SAX document handler that produces naive ESIS output.c���������C���s ���|�|��_��d��S(���N(���t���writerR���(���R���Rß���(����(����R���R!���q��s����c���������C���s$���|��i�i�d�|�d�|�d�ƒ�d�S(���sQ���Receive an event signalling that a processing instruction has been found.R"���t��� s��� N(���R���Rß���R,���Ro���t ���remainder(���R���Ro���Rá���(����(����R���Rp���t��s�����c���������C���sW���|��i�i�d�|�d�ƒ�x8�|�i�ƒ��D]*�}�|��i�i�d�|�d�|�|�d�ƒ�q%�Wd�S(���s4���Receive an event signalling the start of an element.t���(s��� t���ARà���N(���R���Rß���R,���R`���t���amapRÁ���t���a_name(���R���R`���Rä���Rå���(����(����R���Rb���y��s ����� �c���������C���s���|��i�i�d�|�d�ƒ�d�S(���s2���Receive an event signalling the end of an element.t���)s��� N(���R���Rß���R,���R`���(���R���R`���(����(����R���Rc�����s�����c���������C���s'���|��i�i�d�|�|�|�|�!d�ƒ�d�S(���s?���Receive an event signalling that character data has been found.t���-s��� N(���R���Rß���R,���R���t���start_ixt���length(���R���R���Rè���Ré���(����(����R���Rm���ƒ��s�����( ���R���R���R���R7���RP���R!���Rp���Rb���Rc���Rm���(����(����(����R���RÞ���n��s���� t ���Canonizerc�����������B���sS���t��Z�d��Z�e�i�d�„�Z�d�„��Z�d�„��Z�d�„��Z�d�„��Z �d�„��Z �d�„��Z�RS(���s:���A SAX document handler that produces canonized XML output.c���������C���s���d�|��_�|�|��_�d��S(���Ni����(���R���t ���elem_levelRß���(���R���Rß���(����(����R���R!���Œ��s���� c���������C���s5���|�d�j�p$�|��i�i�d�|�d�|�d�ƒ�n�d��S(���Nt���xmls���<?Rà���s���?>(���Ro���R���Rß���R,���Rá���(���R���Ro���Rá���(����(����R���Rp�����s���� c���������C���s˜���|��i�i�d�|�ƒ�|�i�ƒ��}�|�i�ƒ��xG�|�D]?�}�|��i�i�d�|�d�ƒ�|��i �|�|�ƒ�|��i�i�d�ƒ�q1�W|��i�i�d�ƒ�|��i �d�|��_ �d��S(���NR ���Rà���s���="s���"R ���i���(���R���Rß���R,���R`���Rä���RÁ���t���a_namest���sortRå���t ���write_dataRë���(���R���R`���Rä���Rí���Rå���(����(����R���Rb���”��s���� �c���������C���s,���|��i�i�d�|�d�ƒ�|��i�d�|��_�d��S(���Ns���</R ���i���(���R���Rß���R,���R`���Rë���(���R���R`���(����(����R���Rc���¡��s����c���������C���s���|��i�|�|�|�ƒ�d��S(���N(���R���Rm���R���Rè���Ré���(���R���R���Rè���Ré���(����(����R���Rn���¥��s����c���������C���s0���|��i�d�j�o�|��i�|�|�|�|�!ƒ�n�d��S(���Ni����(���R���Rë���Rï���R���Rè���Ré���(���R���R���Rè���Ré���(����(����R���Rm���¨��s����c���������C���s¤���|�i�d�d�ƒ�}�|�i�d�d�ƒ�}�|�i�d�d�ƒ�}�|�i�d�d�ƒ�}�|�i�t�d �ƒ�d �ƒ�}�|�i�t�d�ƒ�d�ƒ�}�|�i�t�d �ƒ�d�ƒ�}�|��i�i�|�ƒ�d�S(���s���Writes datachars to writer.R���s���&R ���s���<s���"s���"R ���s���>i ���s���	i ���s��� i ���s��� N(���R���R���t���chrR���Rß���R,���(���R���R���(����(����R���Rï���¬��s�����(���R���R���R���R7���RP���R!���Rp���Rb���Rc���Rn���Rm���Rï���(����(����(����R���Rê���‰��s���� t���mllibc�����������B���s™���t��Z�d��Z�d�„��Z�d�„��Z�d�„��Z�d�„��Z�d�„��Z�d�„��Z�d�„��Z �d�„��Z �d �„��Z�d �„��Z�d�„��Z �d�„��Z�d �e�i�e�i�f�d�„��ƒ��YZ�RS(���s_���A re-implementation of the htmllib, sgmllib and xmllib interfaces as a SAX DocumentHandler.c���������C���s���|��i�ƒ��d��S(���N(���R���R¤���(���R���(����(����R���R!���É��s����c���������C���sD���d��k��}�|�i�i�ƒ��|��_�t�i�|��i�|��ƒ�|��_�|��i�i�ƒ��d��S(���N( ���t���saxextst���XMLParserFactoryt���make_parserR���t���parserRñ���t���HandlerRQ���R¤���(���R���Rò���(����(����R���R¤���Ì��s���� c���������C���s���|��i�i�|�ƒ�d��S(���N(���R���Rõ���R¢���R���(���R���R���(����(����R���R¢���Ò��s����c���������C���s���|��i�i�ƒ��d��S(���N(���R���Rõ���R£���(���R���(����(����R���R£���Õ��s����c���������C���s ���|��i�i�ƒ��S(���N(���R���RQ���t ���get_stack(���R���(����(����R���R÷���Ø��s����c���������C���s���|�|�ƒ�d��S(���N(���t���methodt���atts(���R���R`���Rø���Rù���(����(����R���t���handle_starttagÝ��s����c���������C���s���|�ƒ��d��S(���N(���Rø���(���R���R`���Rø���(����(����R���t ���handle_endtagà��s����c���������C���s���d��S(���N(����(���R���R���(����(����R���t���handle_dataã��s����c���������C���s���d��S(���N(����(���R���Ro���R���(����(����R���t���handle_procæ��s����c���������C���s���d��S(���N(����(���R���R`���Rù���(����(����R���t���unknown_starttagé��s����c���������C���s���d��S(���N(����(���R���R`���(����(����R���t���unknown_endtagì��s����c���������C���s���d��S(���N(����(���R���t���message(����(����R���t���syntax_errorï��s����Rö���c�����������B���sh���t��Z�d��Z�d�„��Z�d�„��Z�d�„��Z�d�„��Z�d�„��Z�d�„��Z�d�„��Z �d�„��Z �d �„��Z�d �„��Z�RS(���sR���An internal class to handle SAX events and translate them to mllib events.c���������C���s@���|�|��_��|��i��i�|��ƒ�|��i��i�|��ƒ�|�|��_�|��i�ƒ��d��S(���N(���t���driverR���t���setDocumentHandlerR���RQ���R¤���(���R���R��RQ���(����(����R���R!���ø��s ���� c���������C���s���|��i�S(���N(���R���t���stack(���R���(����(����R���R÷���ÿ��s����c���������C���s ���g��|��_�d��S(���N(���R���R��(���R���(����(����R���R¤�����s����c���������C���s���|��i�i�|�|�|�|�!ƒ�d��S(���N(���R���RQ���Rü���t���chR|���Ré���(���R���R��R|���Ré���(����(����R���Rm�����s����c���������C���s\���t��|��i�d�|�ƒ�o'�|��i�i�|�t�|��i�d�|�ƒ�ƒ�n�|��i�i�|�ƒ�|��i�d�=d��S(���Nt���end_iÿÿÿÿ(���R«���R���RQ���R`���Rû���RØ���Rÿ���R��(���R���R`���(����(����R���Rc��� ��s ����c���������C���s���|��i�i�|�|�|�|�!ƒ�d��S(���N(���R���RQ���Rü���R��R|���Ré���(���R���R��R|���Ré���(����(����R���Rn�����s����c���������C���s���|��i�i�|�|�ƒ�d��S(���N(���R���RQ���Rý���Ro���R���(���R���Ro���R���(����(����R���Rp�����s����c���������C���sh���|��i�i�|�ƒ�t�|��i�d�|�ƒ�o*�|��i�i�|�t�|��i�d�|�ƒ�|�ƒ�n�|��i�i �|�|�ƒ�d��S(���Nt���start_( ���R���R��RZ���R`���R«���RQ���Rú���RØ���Rù���Rþ���(���R���R`���Rù���(����(����R���Rb�����s���� c���������C���s���|��i�i�t�|�ƒ�ƒ�d��S(���N(���R���RQ���R��R{���R.���(���R���R.���(����(����R���R1���&��s����c���������C���s���t��t�|�ƒ�ƒ�‚�d��S(���N(���t���RuntimeErrorR{���R.���(���R���R.���(����(����R���R2���)��s����( ���R���R���R���R!���R÷���R¤���Rm���Rc���Rn���Rp���Rb���R1���R2���(����(����(����R���Rö���ô��s���� (���R���R���R���R!���R¤���R¢���R£���R÷���Rú���Rû���Rü���Rý���Rþ���Rÿ���R��t���saxlibt���DocumentHandlert���ErrorHandlerRö���(����(����(����R���Rñ���¹��s���� (0���R���R°���Rº���R¼���RÉ���RQ���R©���R7���R4���R ��t ���StringTypet���UnicodeTypeR¨���t���AttributeErrorR���R ���R���R���t���EntityResolvert ���DTDHandlerRR���R��R���R���R'���R9���t���AttributesImplR:���R?���R«���RE���RM���RN���t���LexicalHandlerRq���Rz���t ���XMLFilterR~���t ���XMLFilterImplt���IncrementalParserR›���Rœ���R¾���RÓ���t���HandlerBaseRÞ���Rê���Rñ���(#���Rz���R¨���R��R���R ���R?���RM���Rñ���RQ���R���RN���R��Rê���RÞ���Rœ���Rq���RÓ���RE���R���R¼���R¾���R7���R ��R:���RÉ���R~���R���R4���R°���R©���Rº���R›���R'���R9���R���(����(����R���R"������sH���$ + &# b+b$9 0