-
x=c       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 X yU  d k Z  d   Z $ h  Z % d   Z ) d Z * e Z + e d d  Z WnF , e j
 o7 - d   Z 5 e Z 6 d Z 7 e Z 9 e Z n X= d	 e f d
     YZ F d f  d     YZ Dd e f d     YZ (d   Z :d   Z  >d   Z! Jd   Z" Xe i# d j o Ye" Z$ n
 [e! Z$ _e o `e i% Z& n$ bd Z& cd d Z' ee' d Z( fd Z) he i* d e&  Z+ ie i* d e&  Z, je i* d  Z- ke i* d  Z. le os md k/ l0 Z0 ne0 i1   Z2 oe0 i3   Z4 pe0 i5   Z6 qe0 i7   Z8 re i* d e0 i9 d  Z: s[0 n ue i* d e' d  e( d!  Z2 ve i* d e' d  e( d" e' d  e( d#  Z4 xe i* d e( d$  Z6 ye i* d e( d% e( d&  Z8 ze i* d' e' d  e( d(  Z: {e i* d)  Z; |e i* d*  Z< }e i* d+  Z= ~e i* d,  Z> e i* d-  Z? e i* d.  Z@ e i* d/  ZA e i* d0  ZB e i* d1  ZC e i* d2  ZD e i* d3  ZE e i* d4  ZF e i* d5  ZG e i* d6  ZH e i* d7 e iI  ZJ e i* d8  ZK e i* d9  ZL e i* d:  ZM e i* d;  ZN e i* d<  ZO e i* d=  ZP e i* d>  ZQ e i* d?  ZR h  d@ e2 iS <dA e, iS <dB e- iS <dC e. iS <dD eH iS <dE eG iS <dF e: iS <dG eE iS <dH eF iS <dI e6 iS <ZT h  dJ dK <dL dM <dN dO <dP dQ <dR dS <ZU e o8 x. eU iV   D] ZW e eU eW  eU eW <q!Wn e iX dT dU  ZY e oL h  ZZ x* dT D] Z[ e\ dV  eZ e\ e[  <q{WeZ dW  Z] n eY e i^ dX  Z] e iX dY dY  Z_ d S(Z   sG   
Some common declarations for the xmlproc system gathered in one file.
Nc    s     | | j o  d   Sn  ys  | }  t i |  d }  | t j o  | d  Sn  | }  t i |  d }   | | d  SWn3 ! t j
 o$ " |  i
 d |  # d   Sn Xd  S(   Nc    s    |  S(   N(   s   s(   s   s(    (    sO   /usr/local/twc/lib/python2.2/site-packages/_xmlplus/parsers/xmlproc/xmlutils.pys   <lambda> s    i   c    s    | |   d S(   Ni    (   s   ds   c(   s   cs   d(    (    sO   /usr/local/twc/lib/python2.2/site-packages/_xmlplus/parsers/xmlproc/xmlutils.pys   <lambda> s    i    c    s     | | |   d  d S(   Ni    (   s   es   ds   c(   s   cs   ds   e(    (    sO   /usr/local/twc/lib/python2.2/site-packages/_xmlplus/parsers/xmlproc/xmlutils.pys   <lambda>  s    i  c    s   # |  S(   N(   s   s(   s   s(    (    sO   /usr/local/twc/lib/python2.2/site-packages/_xmlplus/parsers/xmlproc/xmlutils.pys   <lambda># s    (   s   srcs   dests   encs   codecss   lookups   decoders   Nones   encoders   LookupErrors   parsers   report_error(   s   parsers   srcs   dests   decoders   encs   encoder(    (    sO   /usr/local/twc/lib/python2.2/site-packages/_xmlplus/parsers/xmlproc/xmlutils.pys   mkconverter s   		c    sD   % & t  |   t i j o ' t |   Sn ( t i |  |   Sd  S(   N(   s   types   xs   typess
   StringTypes   interns	   _interneds
   setdefault(   s   x(    (    sO   /usr/local/twc/lib/python2.2/site-packages/_xmlplus/parsers/xmlproc/xmlutils.pys   string_intern% s   i   s   s	   utf-16-bec    st   - . | t j o / d } n 0 t i i | |  o 1 t i i | |  Sn 3 |  i d |  4 d   Sd  S(   Ns   utf-8i  c    s   4 |  S(   N(   s   s(   s   s(    (    sO   /usr/local/twc/lib/python2.2/site-packages/_xmlplus/parsers/xmlproc/xmlutils.pys   <lambda>4 s    (	   s   dests   Nones   charconvs   convdbs   can_converts   srcs   get_converters   parsers   report_error(   s   parsers   srcs   dest(    (    sO   /usr/local/twc/lib/python2.2/site-packages/_xmlplus/parsers/xmlproc/xmlutils.pys   mkconverter- s   i    s   OutOfDataExceptionc      s   = d  Z  ? @ RS(   sd   An exception that signals that more data is expected, but the current
    buffer has been exhausted.(   s   __doc__(    (    (    sO   /usr/local/twc/lib/python2.2/site-packages/_xmlplus/parsers/xmlproc/xmlutils.pys   OutOfDataException= s   	s   EntityParserc      sK  F d  Z  H J d   Z Y d   Z _ d   Z c d   Z f d   Z j d   Z n d   Z t d d	  Z  e	 e	 d
  Z
  d d  Z  d d  Z  d   Z  d d  Z  d   Z  d   Z d   Z d d  Z Nd   Z Sd   Z Wd   Z [d   Z rd   Z wd   Z }d   Z d   Z d d  Z d   Z d    Z d!   Z d"   Z d d#  Z  d$   Z! d%   Z" d&   Z# d'   Z$ e	 d(  Z% d)   Z& d*   Z' d+   Z( d,   Z) !d-   Z* &d.   Z+ *d/   Z, 2d d0  Z- 9d1   Z. RS(2   sX   A generalized parser for XML entities, whether DTD, documents or even
    catalog files.c    s   J L t  i |   |  _ M t  i |  i  |  _ N t  i   |  _ O t  i   |  _	 P t
 |  _ R t
 |  _ S t
 |  _ T d |  _ U t i |  i  |  _ W |  i   d  S(   Ns   en(   s   xmlapps   ErrorHandlers   selfs   errs   EntityHandlers   ents   InputSourceFactorys   isfs   PubIdResolvers   pubress   Nones   data_charsets   input_encodings   charset_converters   err_langs   errorss   get_error_lists   reset(   s   self(    (    sO   /usr/local/twc/lib/python2.2/site-packages/_xmlplus/parsers/xmlproc/xmlutils.pys   __init__J s   c    s=   Y [ \ t  i t i |   |  _  ] t i |  |  _ d S(   s}   Sets the language in which errors are reported. (ISO 3166 codes.)
        Throws a KeyError if the language is not supported.N(   s   errorss   get_error_lists   strings   lowers   languages   selfs   err_lang(   s   selfs   language(    (    sO   /usr/local/twc/lib/python2.2/site-packages/_xmlplus/parsers/xmlproc/xmlutils.pys   set_error_languageY s   c    s   _ ` a | |  _  d S(   s(   Sets the object to send error events to.N(   s   errs   self(   s   selfs   err(    (    sO   /usr/local/twc/lib/python2.2/site-packages/_xmlplus/parsers/xmlproc/xmlutils.pys   set_error_handler_ s   c    s   c d | |  _  d  S(   N(   s   pubress   self(   s   selfs   pubres(    (    sO   /usr/local/twc/lib/python2.2/site-packages/_xmlplus/parsers/xmlproc/xmlutils.pys   set_pubid_resolverc s   c    s   f g h | |  _  d S(   s0   Sets the object that resolves entity references.N(   s   ents   self(   s   selfs   ent(    (    sO   /usr/local/twc/lib/python2.2/site-packages/_xmlplus/parsers/xmlproc/xmlutils.pys   set_entity_handlerf s   c    s   j k l | |  _  d S(   sA   Sets the object factory used to create input sources from sysids.N(   s   isfs   self(   s   selfs   isf(    (    sO   /usr/local/twc/lib/python2.2/site-packages/_xmlplus/parsers/xmlproc/xmlutils.pys   set_inputsource_factoryj s   c    s   n q r | |  _ d S(   s   Tells the parser which character encoding to use when reporting data
        to applications. The default is None, which means to return Unicode
        string if supported and UTF-8 otherwise.N(   s   charsets   selfs   data_charset(   s   selfs   charset(    (    sO   /usr/local/twc/lib/python2.2/site-packages/_xmlplus/parsers/xmlproc/xmlutils.pys   set_data_charsetn s   i @  c    s   t w y | |  _ z y { |  i i |  } Wn6 | t t f j
 o! } |  i d |  ~ d Sn X |  i	 | |   | i    |  i   d S(   s   Begin parsing an XML entity with the specified system
        identifier.  Only used for the document entity, not to handle
        subentities, which open_entity takes care of.i  N(   s   sysIDs   selfs   current_sysIDs   isfs   create_input_sources   infiles   IOErrors   OSErrors   report_errors	   read_froms   bufsizes   close(   s   selfs   sysIDs   bufsizes   infile(    (    sO   /usr/local/twc/lib/python2.2/site-packages/_xmlplus/parsers/xmlproc/xmlutils.pys   parse_resourcet s   c    sA      | o  | |  _ n  |  i |   |  i   d S(   s*   Parse an XML document from the doc string.N(   s   sysids   selfs   current_sysIDs   feeds   docs   close(   s   selfs   docs   sysids   pubid(    (    sO   /usr/local/twc/lib/python2.2/site-packages/_xmlplus/parsers/xmlproc/xmlutils.pys   parse_string s
   
s   Nonec    s      y  |  i i |  } Wn6  t t f j
 o!  |  i d |   d Sn X |  i |   | |  _
  d |  _  d |  _  d |  _  d |  _  d |  _  t |  _  t |  _  |  i }  d |  _  |  i | d   | |  _  |  i    |  i   d S(   s   Starts parsing a new entity, pushing the old onto the stack. This
        method must not be used to start parsing, use parse_resource for
        that. Note that sys_id must be absolute.i  Ni    i   s    i(   s   selfs   isfs   create_input_sources   sys_ids   infs   IOErrors   OSErrors   report_errors   _push_ent_stacks   names   current_sysIDs   poss   lines
   last_breaks   datas   encoded_datas   Nones   input_encodings   charset_converters   seen_xmldecls   tmps	   read_froms   flushs
   pop_entity(   s   selfs   sys_ids   names   tmps   inf(    (    sO   /usr/local/twc/lib/python2.2/site-packages/_xmlplus/parsers/xmlproc/xmlutils.pys   open_entity s*   c    s      |  i |   | |  _  d |  _  | |  _  d |  _  d |  _	  d |  _
  t |  |  _  d |  _  d |  _ d S(   sp   Parse some text and consider it a new entity, making it possible
        to return to the original entity later.s    i    i   N(   s   selfs   _push_ent_stacks   names   contentss   datas   encoded_datas   sysIDs   current_sysIDs   poss   lines
   last_breaks   lens   datasizes   last_upd_poss   final(   s   selfs   sysIDs   contentss   name(    (    sO   /usr/local/twc/lib/python2.2/site-packages/_xmlplus/parsers/xmlproc/xmlutils.pys   push_entity s   c    s>      |  i g  j o  |  i d  n  |  i   d S(   s=   Skips out of the current entity and back to the previous one.i  N(   s   selfs	   ent_stacks   report_errors   _pop_ent_stack(   s   self(    (    sO   /usr/local/twc/lib/python2.2/site-packages/_xmlplus/parsers/xmlproc/xmlutils.pys
   pop_entity s    c    s}      xm  d ob  | i |  }  | d j o  Pn  y  |  i |  Wn  t j
 o  Pn Xq Wd S(   s  Reads data from a file-like object until EOF. Does not close it.
        **WARNING**: This method does not call the parseStart/parseEnd methods,
        since it does not know if it may be called several times. Use
        parse_resource if you just want to read a file.i   s    N(   s   fileobjs   reads   bufsizes   bufs   selfs   feeds   OutOfDataException(   s   selfs   fileobjs   bufsizes   buf(    (    sO   /usr/local/twc/lib/python2.2/site-packages/_xmlplus/parsers/xmlproc/xmlutils.pys	   read_from s    
 c    s      g  |  _  g  |  _  d |  _  d |  _  d |  _  d |  _  d |  _  d |  _  d |  _	  d |  _
  d |  _  d |  _  d |  _  d |  _ d S(   s/   Resets the parser, losing all unprocessed data.s   Unknowni   s    i    iN(   s   selfs	   ent_stacks	   open_entss   current_sysIDs
   first_feeds   datas   encoded_datas   finals   datasizes   start_points   lines
   last_breaks   block_offsets   poss   last_upd_pos(   s   self(    (    sO   /usr/local/twc/lib/python2.2/site-packages/_xmlplus/parsers/xmlproc/xmlutils.pys   reset s   c    so    t  |  d j  o  d } n | d  d j o  d } n  | d  d j o  d } n  | d  d j o  d	 } n  | d
  d j o  d } n  | d
  d j o  d } nz  | d  d j o  d } nY  | d  d j o  d } n8  | d  d j o  d   |  _  d  Sn
 d } | |  _ t |  | |  i  |  _ d  S(   Ni   s   utf-8i   s   ﻿i   s      <s   ucs-4-bes   <   s   ucs-4-lei   s   s	   utf-16-bes   s	   utf-16-les    < ?s    ? <s   <?xmlc    s    |  S(   N(   s   s(   s   s(    (    sO   /usr/local/twc/lib/python2.2/site-packages/_xmlplus/parsers/xmlproc/xmlutils.pys   <lambda> s    (   s   lens   new_datas   encs   selfs   charset_converters   input_encodings   mkconverters   data_charset(   s   selfs   new_datas   enc(    (    sO   /usr/local/twc/lib/python2.2/site-packages/_xmlplus/parsers/xmlproc/xmlutils.pys   autodetect_encoding s,   	c    s   	t  |  d d g j o| xr d og | d |  i |  _ | d  } y |  i |  } Wn t j
 o q( n X| Sq( Wn* |  i d |  d   |  _ d Sd S(	   s   If there was an error decoding input data, there could be
        two reasons: the data could be genuinely incorrect, or the
        decoder could have run out of data. The latter case is very
        hard to determine in Python 2.0s,   UTF-8 decoding error: unexpected end of datas%   UTF-16 decoding error: truncated datai   ii  c    s   d S(   Ns    (    (   s   s(    (    sO   /usr/local/twc/lib/python2.2/site-packages/_xmlplus/parsers/xmlproc/xmlutils.pys   <lambda>s    s    N(   s   strs   excs   new_datas   selfs   encoded_datas   charset_converters   UnicodeErrors   report_error(   s   selfs   new_datas   exc(    (    sO   /usr/local/twc/lib/python2.2/site-packages/_xmlplus/parsers/xmlproc/xmlutils.pys   _handle_decoding_errors    
i    c    s
   !| o t o t |  t i j o #d } n %d } &|  i o& 'd |  _ (d } )|  i   n +| |  i	 } ,d |  _	 .| o |  i
 o /|  i |  n 6|  i   8| oy 9yB :|  i
 |  } ;| o | d t j o <| d } n Wn- =t j
 o } >|  i | |  } n Xn @|  i d j o^ A|  i |  i |  _ B|  i |  i |  _ C|  i |  i |  _ Dd |  _ Ed |  _ n Ht i |  i | Id d  |  _ Jt |  i  |  _ L|  i   d S(   s!  Accepts more data from the data source. This method must
        set self.datasize and correctly update self.pos and self.data.
        It also does character encoding translation. If decoded is true,
        the data are assumed to have been decoded into the data_charset
        already.i   i    s    is   
s   
N(   s   decodeds   using_unicodes   types   new_datas   typess   UnicodeTypes
   first_feeds   selfs
   parseStarts   encoded_datas   charset_converters   autodetect_encodings
   update_poss   BOMs   UnicodeErrors   es   _handle_decoding_errors   start_points   block_offsets   datasizes   datas   poss
   last_breaks   last_upd_poss   strings   replaces   lens   do_parse(   s   selfs   new_datas   decodeds   es
   first_feed(    (    sO   /usr/local/twc/lib/python2.2/site-packages/_xmlplus/parsers/xmlproc/xmlutils.pys   feeds<   (		c    s$   NOP|  i   Q|  i   d S(   sA   Closes the parser, processing all remaining data. Calls parseEnd.N(   s   selfs   flushs   parseEnd(   s   self(    (    sO   /usr/local/twc/lib/python2.2/site-packages/_xmlplus/parsers/xmlproc/xmlutils.pys   closeNs   c    s   STUd S(   s4   Called before the parse starts to notify subclasses.N(    (   s   self(    (    sO   /usr/local/twc/lib/python2.2/site-packages/_xmlplus/parsers/xmlproc/xmlutils.pys
   parseStartSs   c    s   WXYd S(   s8   Called when there are no more data to notify subclasses.N(    (   s   self(    (    sO   /usr/local/twc/lib/python2.2/site-packages/_xmlplus/parsers/xmlproc/xmlutils.pys   parseEndWs   c    s$  [\]|  i o ^yA _|  i |  i  } `|  i | |  _ at |  i  |  _ Wn+ bt j
 o } c|  i	 d |  n Xdd |  _ n e|  i
 d |  i j op fd |  _ g|  i
 } hy i|  i   Wn= jt j
 o. k| |  i
 j o l|  i	 d  n n Xn d S(   s.   Parses any remnants of data in the last block.i  s    i   i  N(   s   selfs   encoded_datas   charset_converters   new_datas   datas   lens   datasizes   UnicodeErrors   es   report_errors   poss   finals   do_parses   OutOfDataException(   s   selfs   new_datas   es   pos(    (    sO   /usr/local/twc/lib/python2.2/site-packages/_xmlplus/parsers/xmlproc/xmlutils.pys   flush[s"   c    s   rtu|  i |  _ d S(   s   Stores the current position and tells the parser not to forget any
        of the data beyond this point until get_region is called.N(   s   selfs   poss   start_point(   s   self(    (    sO   /usr/local/twc/lib/python2.2/site-packages/_xmlplus/parsers/xmlproc/xmlutils.pys   set_start_pointrs   c    s5   wyz|  i   {|  i |  i |  i f |  _ d S(   s_   Makes the parser remember where we are now, so we can go back
        later with restore_state.N(   s   selfs   set_start_points   last_upd_poss   lines
   last_breaks	   old_state(   s   self(    (    sO   /usr/local/twc/lib/python2.2/site-packages/_xmlplus/parsers/xmlproc/xmlutils.pys   store_statews   c    sC   }~|  i |  _ d |  _ |  i \ |  _ |  _ |  _ d S(   s<   Goes back to a state previously remembered with store_state.iN(   s   selfs   start_points   poss	   old_states   last_upd_poss   lines
   last_break(   s   self(    (    sO   /usr/local/twc/lib/python2.2/site-packages/_xmlplus/parsers/xmlproc/xmlutils.pys   restore_state}s   c    s6   |  i |  i |  i !} d |  _ | Sd S(   sU   Returns the area from start_point to current position and remove
        start_point.iN(   s   selfs   datas   start_points   pos(   s   selfs   data(    (    sO   /usr/local/twc/lib/python2.2/site-packages/_xmlplus/parsers/xmlproc/xmlutils.pys
   get_regions   i   c    s   |  i } | i |  i |  i  } | t j oL |  i o | o' t
 |  i  |  _ |  i | Sn t    n | i d  |  _ |  i | |  i !Sd S(   s   Moves self.pos to the first character that matches the regexp and
        returns everything from pos and up to (but not including) that
        character.i    N(   s   selfs   poss   oldposs   regexps   searchs   datas   mos   Nones   finals   requireds   lens   OutOfDataExceptions   start(   s   selfs   regexps   requireds   oldposs   mo(    (    sO   /usr/local/twc/lib/python2.2/site-packages/_xmlplus/parsers/xmlproc/xmlutils.pys   find_regs   c    s{   t  i |  i | |  i  } | d j o t    n |  i |  i | !} | t	 |  |  _ | Sd S(   s9   Moves self.pos to beyond target and returns skipped text.iN(
   s   strings   finds   selfs   datas   targets   poss   new_poss   OutOfDataExceptions   ress   len(   s   selfs   targets   new_poss   res(    (    sO   /usr/local/twc/lib/python2.2/site-packages/_xmlplus/parsers/xmlproc/xmlutils.pys   scan_tos   c    sO   t  i |  i | |  i  } | d j o t    n | Sd S(   s6   Finds the position where target starts and returns it.iN(   s   strings   finds   selfs   datas   targets   poss   new_poss   OutOfDataException(   s   selfs   targets   new_pos(    (    sO   /usr/local/twc/lib/python2.2/site-packages/_xmlplus/parsers/xmlproc/xmlutils.pys	   get_indexs
   c    sl   |  i |  i t |  j  o |  i o t    n |  i |  i |  i t |  !| j Sd S(   sA   See if text at current position matches test_str, without moving.N(   s   selfs   datasizes   poss   lens   test_strs   finals   OutOfDataExceptions   data(   s   selfs   test_str(    (    sO   /usr/local/twc/lib/python2.2/site-packages/_xmlplus/parsers/xmlproc/xmlutils.pys   test_strs   +c    s   |  i } |  i | t |  j  o |  i o t    n |  i | | t |  !| j o$ |  i t |  |  _ d Sn d Sd S(   s=   Checks if we are at this string now, and if so skips over it.i   i    N(   s   selfs   poss   datasizes   lens   test_strs   finals   OutOfDataExceptions   data(   s   selfs   test_strs   pos(    (    sO   /usr/local/twc/lib/python2.2/site-packages/_xmlplus/parsers/xmlproc/xmlutils.pys   now_ats   ($c    s   t  i |  i |  i  } | o) | o |  i d  n d Sn | i   |  i j o t	    n | i   |  _ d S(   s(   Skips over any whitespace at this point.i  N(
   s   reg_wss   matchs   selfs   datas   poss	   necessarys   report_errors   ends   datasizes   OutOfDataException(   s   selfs	   necessarys   match(    (    sO   /usr/local/twc/lib/python2.2/site-packages/_xmlplus/parsers/xmlproc/xmlutils.pys   skip_wss   
c    s^   |  i |  i d j o |  i o t    n | i |  i |  i  t j Sd S(   s   Checks if we match the regexp.i   N(	   s   selfs   poss   datasizes   finals   OutOfDataExceptions   regexps   matchs   datas   None(   s   selfs   regexp(    (    sO   /usr/local/twc/lib/python2.2/site-packages/_xmlplus/parsers/xmlproc/xmlutils.pys   test_regs   %c    s   |  i |  i d j o |  i o t    n | i |  i |  i  } | t	 j o" |  i
 t | i  d Sn | i d  } | |  i j o t    n | |  _ | i d  Sd S(   s@   Returns the result of matching the regexp and advances self.pos.i   s    i    N(   s   selfs   poss   datasizes   finals   OutOfDataExceptions   regexps   matchs   datas   ents   Nones   report_errors   reg2codes   patterns   ends   group(   s   selfs   regexps   ents   end(    (    sO   /usr/local/twc/lib/python2.2/site-packages/_xmlplus/parsers/xmlproc/xmlutils.pys	   get_matchs   %c    s   t  i |  i d |  i |  i  } |  i |  _ | d j o; |  i | |  _ t  i |  i d d |  i  |  _	 n d S(   s4   Updates (line,col)-pos by checking processed blocks.s   
i    N(
   s   strings   counts   selfs   datas   last_upd_poss   poss   breakss   lines   rfinds
   last_break(   s   selfs   breaks(    (    sO   /usr/local/twc/lib/python2.2/site-packages/_xmlplus/parsers/xmlproc/xmlutils.pys
   update_poss   $c    s"  d } xT | D]I \ } } |  i |  o* d } |  i t |  |  _ Pn q W| of d } x. | d  D] \ } } d | | f } q W|  i	 d | d  | d d f  n |  i
 |  } |  i |  o |  i	 d |  n | Sd	 S(
   s<   Returns a contained match. Useful for regexps inside quotes.i    i   s    is   %s'%s', i  ii  N(   s   founds   wrapss   wraps   regexps   selfs   test_strs   poss   lens   msgs   report_errors	   get_matchs   datas   now_at(   s   selfs   wrapss   msgs   regexps   wraps   founds   data(    (    sO   /usr/local/twc/lib/python2.2/site-packages/_xmlplus/parsers/xmlproc/xmlutils.pys   get_wrapped_matchs$   	
 		 )c    s    y5 |  i | } | t j o | | } n Wn* t j
 o |  i d | } n X| d j  o |  i i |  n; 	| d j  o 
|  i i	 |  n |  i i
 |  d  S(   Ni  i  i  (   s   selfs   errorss   numbers   msgs   argss   Nones   KeyErrors   errs   warnings   errors   fatal(   s   selfs   numbers   argss   msg(    (    sO   /usr/local/twc/lib/python2.2/site-packages/_xmlplus/parsers/xmlproc/xmlutils.pys   report_errors   c    s   |  i Sd S(   s1   Returns the sysid of the file we are reading now.N(   s   selfs   current_sysID(   s   self(    (    sO   /usr/local/twc/lib/python2.2/site-packages/_xmlplus/parsers/xmlproc/xmlutils.pys   get_current_sysids   c    s   | |  _ d S(   s?   Sets the current system identifier. Does not store the old one.N(   s   sysIDs   selfs   current_sysID(   s   selfs   sysID(    (    sO   /usr/local/twc/lib/python2.2/site-packages/_xmlplus/parsers/xmlproc/xmlutils.pys	   set_sysids   c    s   |  i |  i Sd S(   s8   Returns the current offset from the start of the stream.N(   s   selfs   block_offsets   pos(   s   self(    (    sO   /usr/local/twc/lib/python2.2/site-packages/_xmlplus/parsers/xmlproc/xmlutils.pys
   get_offsets   c    s!   |  i   |  i Sd S(   s    Returns the current line number.N(   s   selfs
   update_poss   line(   s   self(    (    sO   /usr/local/twc/lib/python2.2/site-packages/_xmlplus/parsers/xmlproc/xmlutils.pys   get_lines   c    s(   !"#|  i   $|  i |  i Sd S(   s$   Returns the current column position.N(   s   selfs
   update_poss   poss
   last_break(   s   self(    (    sO   /usr/local/twc/lib/python2.2/site-packages/_xmlplus/parsers/xmlproc/xmlutils.pys
   get_column!s   c    s   &'(|  i g  j Sd S(   s6   Returns true if the current entity is the root entity.N(   s   selfs	   ent_stack(   s   self(    (    sO   /usr/local/twc/lib/python2.2/site-packages/_xmlplus/parsers/xmlproc/xmlutils.pys   is_root_entity&s   c    s8   *,-|  i g  j o |  i d d |  i   j Sd S(   s{   Returns true if the current entity is an external entity. The root
        (or document) entity is not considered external.i    N(   s   selfs	   ent_stacks   get_current_sysid(   s   self(    (    sO   /usr/local/twc/lib/python2.2/site-packages/_xmlplus/parsers/xmlproc/xmlutils.pys   is_external*s   c    sb   23|  i i |  i   |  i |  i |  i |  i |  i |  i	 |  i
 |  i |  i |  i | f  d  S(   N(   s   selfs	   ent_stacks   appends   get_current_sysids   datas   poss   lines
   last_breaks   datasizes   last_upd_poss   block_offsets   finals   input_encodings   charset_converters   name(   s   selfs   name(    (    sO   /usr/local/twc/lib/python2.2/site-packages/_xmlplus/parsers/xmlproc/xmlutils.pys   _push_ent_stack2s   c    si   9:|  i d \ |  _ |  _ |  _ |  _ |  _ |  _ |  _ |  _	 |  _
 |  _ |  _ } >|  i d =d  S(   Ni(   s   selfs	   ent_stacks   current_sysIDs   datas   poss   lines
   last_breaks   datasizes   last_upd_poss   block_offsets   finals   input_encodings   charset_converters   dummy(   s   selfs   dummy(    (    sO   /usr/local/twc/lib/python2.2/site-packages/_xmlplus/parsers/xmlproc/xmlutils.pys   _pop_ent_stack9s   U(/   s   __doc__s   __init__s   set_error_languages   set_error_handlers   set_pubid_resolvers   set_entity_handlers   set_inputsource_factorys   set_data_charsets   parse_resources   Nones   parse_strings   open_entitys   push_entitys
   pop_entitys	   read_froms   resets   autodetect_encodings   _handle_decoding_errors   feeds   closes
   parseStarts   parseEnds   flushs   set_start_points   store_states   restore_states
   get_regions   find_regs   scan_tos	   get_indexs   test_strs   now_ats   skip_wss   test_regs	   get_matchs
   update_poss   get_wrapped_matchs   report_errors   get_current_sysids	   set_sysids
   get_offsets   get_lines
   get_columns   is_root_entitys   is_externals   _push_ent_stacks   _pop_ent_stack(    (    (    sO   /usr/local/twc/lib/python2.2/site-packages/_xmlplus/parsers/xmlproc/xmlutils.pys   EntityParserF s\   	
!3		s   XMLCommonParserc      se   DFd d d  Z  id   Z we d  Z d d  Z d   Z d   Z d	   Z RS(
   Ni    i   c    s  FJLt  } Mt  } O|  i d  o8 P|  i d  Q|  i d t f d t f g  } nVS|  i d  o$T|  i d  U|  i d t	 f d t
 f g  } Wt i t i |   } Y| o8 Z|  i d  [|  i d t f d t f g  } n ^|  i d  p |  i d  o _|  i d  n `|  i   a|  i d  p |  i d  o( b|  i d t f d t f g  } n n e| o e|  i d  n g| | f Sd S(	   s  Parses an external ID declaration and returns a tuple consisting
        of (pubid,sysid). If the required attribute is false neither SYSTEM
        nor PUBLIC identifiers are required. If sysidreq is false a SYSTEM
        identifier is not required after a PUBLIC one.s   SYSTEMi   s   "s   's   PUBLICi  i  N(   s   Nones   pub_ids   sys_ids   selfs   now_ats   skip_wss   get_wrapped_matchs   reg_sysid_quotes   reg_sysid_apos   reg_pubid_quotes   reg_pubid_apos   strings   joins   splits   sysidreqs   test_strs   report_errors   required(   s   selfs   requireds   sysidreqs   pub_ids   sys_id(    (    sO   /usr/local/twc/lib/python2.2/site-packages/_xmlplus/parsers/xmlproc/xmlutils.pys   parse_external_idFs*   		($
(##,
 c    s   ijky l|  i |  i } Wn" mt j
 o nt    n Xp|  i d  p |  i d  o4 q|  i d d d f  r|  i d  sd Sn u|  i |  Sd S(   s<   Returns the contents of a quoted string at current position.s   "s   'i  s   '"'s   >s    N(	   s   selfs   datas   poss   quos
   IndexErrors   OutOfDataExceptions   now_ats   report_errors   scan_to(   s   selfs   quo(    (    sO   /usr/local/twc/lib/python2.2/site-packages/_xmlplus/parsers/xmlproc/xmlutils.pys   __get_quoted_stringis   $c 	   s  wxz|  i   } }|  i   ~|  i   d j p( |  i   d j p |  i g  j o | o2 | o |  i d  n |  i d  n |  i o2 | o |  i d  n |  i d  n t	 } t	 } t	 } |  i   |  i d  o|  i   |  i d  o |  i d	 d  n |  i   |  i   } t i |  } | t	 j p | i   t |  j o |  i d
 |  n% | d j o |  i d  n |  i d  p |  i d  o |  i d  n |  i   n  | o |  i d  n |  i d  o |  i   |  i d  o |  i d	 d  n |  i   |  i   } t i |  t	 j o |  i d  n t i |  } |  i o |  i | j o |  i d |  n |  i   n |  i d  o | o |  i d  d } n |  i   |  i d  o |  i d	 d  n |  i   |  i   } t i |  t	 j o |  i d  n | d j |  _ |  i   n |  i   |  i o | } | o d } n t |  | |  i  |  _ y |  i |  i   |  _  Wn. t! j
 o } |  i# |  i  |  n X| |  _ n | t	 j o | i% | | |  n d S(   sB   Parses the contents of the XML declaration from after the '<?xml'.i   i   i  i  i  i  s   versions   =i  i=  s   1.0i  s   encodings
   standalonei  i  i>  i  i  s   yesiG  s   utf-8N(&   s   selfs   is_externals   textdecls
   update_poss
   get_columns   get_lines	   ent_stacks   report_errors   seen_xmldecls   Nones   encs   sddecls   vers   skip_wss   now_ats#   _XMLCommonParser__get_quoted_strings   reg_vers   matchs   ms   ends   lens   test_strs   reg_enc_names   strings   lowers   input_encodings   reg_std_alones
   standalones   enc1s   mkconverters   data_charsets   charset_converters   datas   UnicodeErrors   es   _handle_decoding_errors   handlers   set_entity_info(	   s   selfs   handlers   encs   vers   ms   sddecls   textdecls   enc1s   e(    (    sO   /usr/local/twc/lib/python2.2/site-packages/_xmlplus/parsers/xmlproc/xmlutils.pys   parse_xml_declws   A

			 )# 
 	c    sI  |  i   } | d j of | o |  i |  n |  i   |  i d  o |  i d d  n d |  _ n |  i d  o d } n# |  i
 d  |  i d  } t i |  t j oL | d j o |  i d  n% | d j o |  i d	  n n | i | |  d
 S(   sO   Parses a processing instruction from after the '<?' to beyond
        the '?>'.s   xmls   ?>i  i   s    s   xml:namespacei  s   xml-stylesheeti  N(   s   selfs	   _get_names   trgts   report_xml_decls   parse_xml_decls   handlers   now_ats   report_errors   seen_xmldecls   rems   skip_wss   scan_tos
   reg_res_pis   matchs   Nones	   handle_pi(   s   selfs   handlers   report_xml_decls   rems   trgt(    (    sO   /usr/local/twc/lib/python2.2/site-packages/_xmlplus/parsers/xmlproc/xmlutils.pys   parse_pis&   
c    sp   |  i d  } | i |  i |  i | ! | |  _ |  i d  o |  i d d  n d S(   s5   Parses the comment from after '<!--' to beyond '-->'.s   --s   -->i  N(	   s   selfs	   get_indexs   new_poss   handlers   handle_comments   datas   poss   now_ats   report_error(   s   selfs   handlers   new_pos(    (    sO   /usr/local/twc/lib/python2.2/site-packages/_xmlplus/parsers/xmlproc/xmlutils.pys   parse_comments   c    s"   |  i d  o t |  i t   } n t |  i t   } | d j p1 | d j p$ | d j p | d j o
 | d j o | d j oQ 
t o
 | d j  o# |  i	 i
 t |  d d	  n |  i d
 |  n |  i d |  d Sn t |  Sd S(   s7   Parses a character reference and returns the character.s   xi	   i
   i   i    i   i   i    i   i  i  s    N(   s   selfs   now_ats   unhexs	   get_matchs   reg_hex_digitss   digss   ints
   reg_digitss   using_unicodes   apps   handle_datas   xml_chrs   report_error(   s   selfs   digs(    (    sO   /usr/local/twc/lib/python2.2/site-packages/_xmlplus/parsers/xmlproc/xmlutils.pys   _read_char_refs   E#c    s   |  i |  i d j o |  i o t    n t i |  i |  i  } | o] | i   |  _ | i   |  i j o |  i o t    n t	 | i
    Sn !|  i d  "d Sd S(   sk   Parses the name at the current position and returns it. An error
        is reported if no name is present.i   i<  s    N(   s   selfs   poss   datasizes   finals   OutOfDataExceptions   reg_names   matchs   datas   ends   string_interns   groups   report_error(   s   selfs   match(    (    sO   /usr/local/twc/lib/python2.2/site-packages/_xmlplus/parsers/xmlproc/xmlutils.pys	   _get_names   %
$(   s   parse_external_ids#   _XMLCommonParser__get_quoted_strings   Nones   parse_xml_decls   parse_pis   parse_comments   _read_char_refs	   _get_name(    (    (    sO   /usr/local/twc/lib/python2.2/site-packages/_xmlplus/parsers/xmlproc/xmlutils.pys   XMLCommonParserDs   #cc    s   ()+d } ,x |  D,] } -| d } .t |  } 0| d j  o
 | d j o 1| | d } ne 2| d j o
 | d j o 3| | d } n3 4| d j o
 | d	 j o 5| | d
 } n q W8| Sd S(   s*   Converts a string hex-value to an integer.i    i   i:   i0   ia   if   iW   iA   iF   i7   N(   s   sums	   hex_values   chars   ord(   s	   hex_values   chars   sum(    (    sO   /usr/local/twc/lib/python2.2/site-packages/_xmlplus/parsers/xmlproc/xmlutils.pys   unhex(s   	
 	c    sH   :;|  i |  } <| t j o t | i d   t |  j Sd  S(   Ni    (   s   regexps   matchs   strs   mos   Nones   lens   group(   s   regexps   strs   mo(    (    sO   /usr/local/twc/lib/python2.2/site-packages/_xmlplus/parsers/xmlproc/xmlutils.pys   matches:s   c    s   >?@t  i  |  d d j o A| Sn Bt  i  |   d d j oR Ct  i  |  d d j o* Dt i i t i i |   d |  Sn F| Sn Ht  i |  |  Sd S(   s<   Resolves a URL relative to a base URL. The base can be None.i    s    N(   s   urlparses   urls   bases   oss   paths   joins   splits   urljoin(   s   bases   url(    (    sO   /usr/local/twc/lib/python2.2/site-packages/_xmlplus/parsers/xmlproc/xmlutils.pys   join_sysids_general>s   *c    s   JKLt  i  |  d d j o M| Sn Nt t  i  |   d  d j  oX Ot t  i  |  d  d j  o* Pt i i t i i |   d |  Sn R| Sn Tt  i |  |  Sd S(   s<   Resolves a URL relative to a base URL. The base can be None.i    s    i   N(	   s   urlparses   urls   lens   bases   oss   paths   joins   splits   urljoin(   s   bases   url(    (    sO   /usr/local/twc/lib/python2.2/site-packages/_xmlplus/parsers/xmlproc/xmlutils.pys   join_sysids_win32Js   ##*s   win32s6   ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz_:s>   s   0123456789.-s   
	 s   [
	 ]+s   [-a-zA-Z0-9_.:]+s   [A-Za-z][-A-Za-z0-9._]*s   yes|no(   s
   characterss   %s   ;s   [s   ][s   ]*s   ]*([
	 ]+[s   ]*)*s   ]+s   ]+([
	 ]+[s   ]+)*s   %[s   ]*;s   [^"]*s   [^']*s#   [- 
	a-zA-Z0-9'()+,./:=?;!*#@$_%]*s"   [- 
	a-zA-Z0-9()+,./:=?;!*#@$_%]*s   <[A-Za-z_:]s   [^<"]*s   [^<']*s   [<&]s   [^"]+s   [^']+s6   CDATA|IDREFS|IDREF|ID|ENTITY|ENTITIES|NMTOKENS|NMTOKENs   #REQUIRED|#IMPLIEDs   [0-9]+s   [0-9a-fA-F]+s   xmls   "|'|<\?|<!--|\]|<!\[s   <|&|"s   <|&|'s   <(![^-\[]|\?)s   >|%s
   <!\[|\]\]>s   %|&#s1   ([a-zA-Z][a-zA-Z]|[iIxX]-([a-zA-Z])+)(-[a-zA-Z])*i<  i=  i>  i?  iA  iB  iC  iD  iE  iF  s   &#60;s   lts   &#62;s   gts   &#38;s   amps   &#39;s   aposs   &#34;s   quots   	
s      s    c    sD   t  |   t i j o |  i t  Sn |  i |  Sd  S(   N(   s   types   datas   typess
   StringTypes	   translates	   _ws_transs   _ws_dict(   s   datas   _ws_dict(    (    sO   /usr/local/twc/lib/python2.2/site-packages/_xmlplus/parsers/xmlproc/xmlutils.pys   ws_transs   c    s   | |  |  Sd  S(   N(   s	   translates   datas	   _ws_trans(   s   datas	   _ws_transs	   translate(    (    sO   /usr/local/twc/lib/python2.2/site-packages/_xmlplus/parsers/xmlproc/xmlutils.pys   ws_transs   s    (`   s   __doc__s   strings   res   urlparses   oss   syss   typess   xmlapps   charconvs   errorss
   StringTypes   UnicodeTypes   StringTypess   AttributeErrors   codecss   mkconverters	   _interneds   string_interns   using_unicodes   unichrs   xml_chrs   unicodes   BOMs   ImportErrors   interns   chrs   Nones	   Exceptions   OutOfDataExceptions   EntityParsers   XMLCommonParsers   unhexs   matchess   join_sysids_generals   join_sysids_win32s   platforms   join_sysidss   UNICODEs	   _re_flagss	   namestarts	   namecharss
   whitespaces   compiles   reg_wss   reg_vers   reg_enc_names   reg_std_alones	   xml.utilss
   characterss   re_Names   reg_names   re_Namess	   reg_namess
   re_Nmtokens   reg_nmtokens   re_Nmtokenss   reg_nmtokenss   Names
   reg_pe_refs   reg_sysid_quotes   reg_sysid_apos   reg_pubid_quotes   reg_pubid_apos   reg_start_tags   reg_quoted_attrs   reg_apo_attrs
   reg_c_datas   reg_ent_val_quotes   reg_ent_val_apos   reg_attr_types   reg_attr_defs
   reg_digitss   reg_hex_digitss   Is
   reg_res_pis   reg_int_dtds   reg_attval_stop_quotes   reg_attval_stop_sings   reg_decl_with_pes   reg_subst_pe_searchs   reg_cond_sects   reg_litval_stops   reg_lang_codes   patterns   reg2codes   predef_entss   keyss   ks	   maketranss	   _ws_transs   _ws_dicts   cs   ords   ws_transs	   translates   id_trans(F   s   OutOfDataExceptions   unhexs
   reg_digitss   mkconverters   reg_ent_val_apos	   _interneds   reg_attval_stop_quotes   ws_transs   reg_int_dtds   reg2codes   reg_names   xmlapps	   namecharss
   reg_res_pis   BOMs   reg_start_tags   reg_std_alones   join_sysids_win32s   charconvs	   namestarts   errorss
   whitespaces   reg_sysid_apos   reg_attval_stop_sings   cs   string_interns   join_sysids_generals   reg_nmtokens   res   xml_chrs   _ws_dicts   reg_subst_pe_searchs   reg_cond_sects   using_unicodes   reg_lang_codes   reg_pubid_apos   reg_wss   reg_vers   EntityParsers   reg_apo_attrs   strings   reg_quoted_attrs
   reg_c_datas   matchess
   reg_pe_refs	   _re_flagss   syss
   characterss   codecss   reg_attr_defs   predef_entss   reg_ent_val_quotes   typess   reg_enc_names   id_transs   reg_nmtokenss   reg_attr_types   reg_hex_digitss	   _ws_transs   StringTypess   ks   reg_litval_stops   urlparses   XMLCommonParsers	   reg_namess   join_sysidss   oss   reg_sysid_quotes   reg_decl_with_pes   reg_pubid_quote(    (    sO   /usr/local/twc/lib/python2.2/site-packages/_xmlplus/parsers/xmlproc/xmlutils.pys   ? s   9							 	
		

"2""
6
 	
	
 	 