;ò
¼»ðBc           @   sM   d  Z  d d d !Z d k Td k Td k Z d k Z d e f d „  ƒ  YZ d S(   sA   
   Copyright (C) 2005 PimenTech SARL (http://www.pimentech.net)

   This library is free software; you can redistribute it and/or
   modify it under the terms of the GNU Library General Public License as
   published by the Free Software Foundation; either version 2 of the
   License, or (at your option) any later version.

   This library is distributed in the hope that it will be useful,
   but WITHOUT ANY WARRANTY; without even the implied warranty of
   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
   Library General Public License for more details.

   You should have received a copy of the GNU Library General Public
   License along with this library; see the file COPYING.LIB.  If not,
   write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
   Boston, MA 02111-1307, USA.  
s   $Revision: 1.10 $i   iþÿÿÿ(   s   *Ns	   XmlWriterc           B   sz   t  Z d d „ Z e d „ Z d „  Z g  d d „ Z g  d d „ Z d „  Z d	 „  Z	 e g  d
 „ Z
 d „  Z d „  Z RS(   Ns    c         C   s)  t  i |  | | ƒ t |  _ d |  _ t i	 d ƒ |  _
 h  |  _ x' t d ƒ D] } d |  i t | ƒ <qM Wx0 t d d ƒ D] } t | ƒ |  i t | ƒ <qz Wd |  i d <t d ƒ |  i t d ƒ <d	 |  i d	 <d
 |  i d
 <xE t i i ƒ  D]4 \ } } |  i i | ƒ o d | |  i | <qí qí Wd  S(   Ns   utf-8s   [&<>\"'\x00-\x20]+i    s    i   s   &apos;s   'i	   s   
s   s   &%s;(   s   Objects   __init__s   selfs   ids   titles   Nones   outputs   encodings   res   compiles   patterns
   entity_maps   ranges   is   chrs   htmlentitydefss
   entitydefss   itemss   entitys   chars   has_key(   s   selfs   ids   titles   is   entitys   char(    (    s   xmlwriter.pys   __init__   s&    			   c         C   s:   |  i i d |  i ƒ | o |  i i d | ƒ n d  S(   Ns$   <?xml version="1.0" encoding="%s"?>
s   <!DOCTYPE LOT SYSTEM "%s">
(   s   selfs   outputs   writes   encodings   dtd(   s   selfs   dtd(    (    s   xmlwriter.pys   write_start_document:   s    c         C   s   d  Sd  S(   N(    (   s   self(    (    s   xmlwriter.pys   write_end_document?   s    i    c         C   s    |  i i d | ƒ xZ | D]R \ } } | o+ |  i i d | |  i d | ƒ f ƒ q |  i i d | ƒ q W| o |  i i d ƒ n |  i i d ƒ d  S(   Ns   <%ss    %s="%s"s   %ss    %s=""s   />s   >(	   s   selfs   outputs   writes   names   optionss   keys   values   escape_htmls   close(   s   selfs   names   optionss   closes   values   key(    (    s   xmlwriter.pys   _write_start_elementB   s     +c         C   s'   |  i | | | ƒ |  i i d ƒ d  S(   Ns   
(   s   selfs   _write_start_elements   names   optionss   closes   outputs   write(   s   selfs   names   optionss   close(    (    s   xmlwriter.pys   write_start_elementN   s    c         C   s   |  i i d | ƒ d  S(   Ns   </%s>
(   s   selfs   outputs   writes   name(   s   selfs   name(    (    s   xmlwriter.pys   write_end_elementR   s    c         C   sE   | p
 | d j o- |  i i |  i d | i |  i ƒ ƒ ƒ n d  S(   Ni    s   %s(   s   datas   selfs   outputs   writes   escape_htmls   encodes   encoding(   s   selfs   data(    (    s   xmlwriter.pys   write_charactersU   s    c         C   sh   | p
 | d j o |  i | | ƒ n# | o |  i | | d ƒ n d  S|  i | ƒ |  i | ƒ d  S(   Ni    i   (   s   datas   selfs   _write_start_elements   names   optionss   write_start_elements   write_characterss   write_end_element(   s   selfs   names   datas   options(    (    s   xmlwriter.pys   write_elementY   s    c         C   s&   t  t |  i i | i ƒ  ƒ d ƒ Sd  S(   Ns    (   s   joins   maps   selfs
   entity_maps   gets   ms   group(   s   selfs   m(    (    s   xmlwriter.pys   escape_entitye   s    c         C   s   |  i i |  i | ƒ Sd  S(   N(   s   selfs   patterns   subs   escape_entitys   string(   s   selfs   string(    (    s   xmlwriter.pys   escape_htmlh   s    (   s   __name__s
   __module__s   __init__s   Nones   write_start_documents   write_end_documents   _write_start_elements   write_start_elements   write_end_elements   write_characterss   write_elements   escape_entitys   escape_html(    (    (    s   xmlwriter.pys	   XmlWriter   s   				(   s   __doc__s   __version__s   strings   objects   htmlentitydefss   res   Objects	   XmlWriter(   s   res	   XmlWriters   __version__s   htmlentitydefs(    (    s   xmlwriter.pys   ?   s   		
