Changeset 3180:c414962d9e75 in livinglogic.python.xist

Show
Ignore:
Timestamp:
01/25/08 19:01:40 (12 years ago)
Author:
Walter Doerwald <walter@…>
Branch:
default
Message:

Convert all docstrings to ReST.

Location:
src/ll/xist
Files:
48 modified

Legend:

Unmodified
Added
Removed
  • src/ll/xist/__init__.py

    r3131 r3180  
    2626 
    2727""" 
    28 <p>&xist; is an extensible &html; and &xml; generator written in Python. 
    29 &xist; is also a &dom; parser (built on top of &sax;2) with a very simple and 
    30 pythonesque tree &api;. Every &xml; element type corresponds to a Python class and these 
    31 Python classes provide a conversion method to transform the &xml; tree (e.g. into 
    32 &html;). &xist; can be considered <z>object oriented &xslt;</z>.</p> 
     28XIST is an extensible HTML and XML generator. XIST is also a XML parser with a 
     29very simple and pythonesque tree API. Every XML element type corresponds to a 
     30Python class and these Python classes provide a conversion method to transform 
     31the XML tree (e.g. into HTML). XIST can be considered 'object oriented XSLT'. 
    3332 
    34 <p>Some of the significant features of &xist; include:</p> 
    35 <ul> 
    36 <li>Easily extensible with new &xml; elements,</li> 
    37 <li>Can be used for offline or online page generation,</li> 
    38 <li>Allows embedding Python code in &xml; files,</li> 
    39 <li>Supports separation of layout and logic,</li> 
    40 <li>Can be used together with <a href="http://www.modpython.org/">mod_python</a>, 
    41 <a href="http://pywx.idyll.org/">PyWX</a> or <a href="http://webware.sf.net/">Webware</a> 
    42 to generate dynamic pages,</li> 
    43 <li>Fully supports Unicode and &xml; namespaces,</li> 
    44 <li>Provides features to use &xist; together with &jsp;/Struts (when replacing 
    45 Struts tag libraries with &xist; this speeds up pages by a factor of 5&ndash;10.)</li> 
    46 </ul> 
     33XIST was written as a replacement for the HTML preprocessor HSC__, and borrows 
     34some features and ideas from it. 
    4735 
    48 <p>&xist; was written as a replacement for the 
    49 <a href="http://www.linguistik.uni-erlangen.de/~msbethke/software.html">&html; preprocessor &hsc;</a>, 
    50 and borrows some features and ideas from it.</p> 
     36__ http://www.linguistik.uni-erlangen.de/~msbethke/software.html 
    5137 
    52 <p>It also borrows the basic ideas (&xml;/&html; elements as Python 
    53 objects) from 
    54 <a href="http://starship.python.net/crew/friedrich/HTMLgen/html/main.html">HTMLgen</a> 
    55 and <a href="http://dustman.net/andy/python/HyperText/">HyperText</a>.</p> 
     38It also borrows the basic ideas (XML/HTML elements as Python objects) from 
     39HTMLgen_ and HyperText_. 
     40 
     41.. _HTMLgen: http://starship.python.net/crew/friedrich/HTMLgen/html/main.html 
     42.. _HyperText: http://dustman.net/andy/python/HyperText 
    5643""" 
    5744 
    5845 
    59 __docformat__ = "xist" 
     46__docformat__ = "reStructuredText" 
    6047 
    6148 
  • src/ll/xist/converters.py

    r3128 r3180  
    99 
    1010""" 
    11 This modules contains the base class for the converter objects used in the call to the 
    12 <pyref module="ll.xist.xsc" class="Node" method="convert"><meth>convert</meth></pyref> method. 
     11This modules contains the base class for the converter objects used in the call 
     12to the :meth:`convert` method of :class:`Node` objects. 
    1313""" 
    1414 
     
    1818 
    1919 
    20 __docformat__ = "xist" 
     20__docformat__ = "reStructuredText" 
    2121 
    2222 
     
    3838class Converter(object): 
    3939    """ 
    40     <p>An instance of this class is passed around in calls to the 
    41     <pyref module="ll.xist.xsc" class="Node" method="convert"><meth>convert</meth></pyref> method. 
    42     This instance can be used when some element needs to keep state across a nested convert call. 
    43     A typical example are nested chapter/subchapter elements with automatic numbering. 
    44     For an example see the element <pyref module="ll.xist.ns.doc" class="section"><class>ll.xist.ns.doc.section</class></pyref>.</p> 
     40    An instance of this class is passed around in calls to the :meth:`convert` 
     41    method. This object can be used when some element needs to keep state across 
     42    a nested :meth:`convert` call. A typical example are nested 
     43    chapter/subchapter elements with automatic numbering. For an example see the 
     44    element :class:`ll.xist.ns.doc.section`. 
    4545    """ 
    4646    def __init__(self, node=None, root=None, mode=None, stage=None, target=None, lang=None, makeaction=None, makeproject=None): 
    4747        """ 
    48         <p>Create a <class>Converter</class>.</p> 
    49         <p>Arguments are used to initialize the <class>Converter</class> properties of the 
    50         same name.</p> 
     48        Create a :class:`Converter`. Arguments are used to initialize the 
     49        :class:`Converter` properties of the same name. 
    5150        """ 
    5251        self.states = [ ConverterState(node=node, root=root, mode=mode, stage=stage, target=target, lang=lang, makeaction=makeaction, makeproject=makeproject)] 
     
    5554    class node(misc.propclass): 
    5655        """ 
    57         <p>The root node for which conversion has been called. This is automatically set by the 
    58         <pyref module="ll.xist.xsc" class="Node" method="conv"><meth>conv</meth></pyref> method.</p> 
     56        The root node for which conversion has been called. This is automatically 
     57        set by the :meth:`conv` method of :class:`Node` objects. 
    5958        """ 
    6059        def __get__(self): 
     
    6968    class root(misc.propclass): 
    7069        """ 
    71         <p>The root &url; for the conversion. Resolving &url;s during the conversion process should be done 
    72         relative to <lit>root</lit>.</p> 
     70        The root URL for the conversion. Resolving URLs during the conversion 
     71        process should be done relative to :prop:`root`. 
    7372        """ 
    7473        def __get__(self): 
     
    8382    class mode(misc.propclass): 
    8483        """ 
    85         <p>The conversion mode. This corresponds directly to the mode in &xslt;. 
    86         The default is <lit>None</lit>.</p> 
     84        The conversion mode. This corresponds directly to the mode in XSLT 
     85        The default is :const:`None`. 
    8786        """ 
    8887        def __get__(self): 
     
    9796    class stage(misc.propclass): 
    9897        """ 
    99         <p>If your conversion is done in multiple steps or stages you can use this property 
    100         to specify in which stage the conversion process currently is. The default is 
    101         <lit>"deliver"</lit>.</p> 
     98        If your conversion is done in multiple steps or stages you can use this 
     99        property to specify in which stage the conversion process currently is. 
     100        The default is :const:`"deliver"`. 
    102101        """ 
    103102        def __get__(self): 
     
    115114    class target(misc.propclass): 
    116115        """ 
    117         <p>Specifies the conversion target. This must be a 
    118         namespace module or simiar object.</p> 
     116        Specifies the conversion target. This must be a namespace module or 
     117        similar object. 
    119118        """ 
    120119        def __get__(self): 
     
    133132    class lang(misc.propclass): 
    134133        """ 
    135         <p>The target language. The default is <lit>None</lit>.</p> 
     134        <p>The target language. The default is ``None``.</p> 
    136135        """ 
    137136        def __get__(self): 
     
    146145    class makeaction(misc.propclass): 
    147146        """ 
    148         <p>If an &xist; conversion is done by an <pyref module="ll.make" class="XISTConvertAction"><class>XISTConvertAction</class></pyref> 
    149         this property will hold the action object during that conversion. If you're not using the 
    150         <pyref module="ll.make"><mod>make</mod></pyref> module you can simply ignore this property. The default is <lit>None</lit>.</p> 
     147        If an XIST conversion is done by an :class:`ll.make.XISTConvertAction` 
     148        this property will hold the action object during that conversion. If 
     149        you're not using the :mod:`ll.make` module you can simply ignore this 
     150        property. The default is :const:`None`. 
    151151        """ 
    152152        def __get__(self): 
     
    161161    class makeproject(misc.propclass): 
    162162        """ 
    163         <p>If an &xist; conversion is done by an <pyref module="ll.make" class="XISTConvertAction"><class>XISTConvertAction</class></pyref> 
    164         this property will hold the <pyref module="ll.make" class="Project"><class>Project</class></pyref> object during that conversion. 
    165         If you're not using the <pyref module="ll.make"><mod>make</mod></pyref> module you can simply ignore this property. 
     163        If an XIST conversion is done by an :class:`ll.make.XISTConvertAction` 
     164        this property will hold the :class:`Project` object during that conversion. 
     165        If you're not using the :mod:`ll.make` module you can simply ignore this 
     166        property. 
    166167        """ 
    167168        def __get__(self): 
     
    203204    def __getitem__(self, obj): 
    204205        """ 
    205         <p>Return a context object for <arg>obj</arg>, which should be an 
    206         <pyref module="ll.xist.xsc" class="Node"><class>Node</class></pyref> subclass. 
    207         Each of these classes that defines its own 
    208         <pyref module="ll.xist.xsc" class="Element.Context"><class>Context</class></pyref> 
    209         class gets a unique instance of this class. This instance will be created 
    210         on the first access and the element can store information there that needs 
    211         to be available across calls to 
    212         <pyref module="ll.xist.xsc" class="Node" method="convert"><meth>convert</meth></pyref>.</p> 
     206        Return a context object for :var:`obj`, which should be an 
     207        :class:`ll.xist.xsc.Node`</pyref> instance or subclass. Each of these 
     208        classes that defines its own :class:`Context` class gets a unique 
     209        instance of this class. This instance will be created on the first access 
     210        and the element can store information there that needs to be available 
     211        across calls to :meth:`convert`. 
    213212        """ 
    214213        contextclass = obj.Context 
    215         # don't use setdefault(), as constructing the Context object might involve some overhead 
     214        # don't use :meth:`setdefault`, as constructing the context object might involve some overhead 
    216215        try: 
    217216            return self.contexts[contextclass] 
  • src/ll/xist/css.py

    r3128 r3180  
    1010 
    1111""" 
    12 <p>This module ontains functions related to the handling of &css;.</p> 
     12This module contains functions related to the handling of CSS. 
    1313""" 
    1414 
     
    3131 
    3232 
    33 __docformat__ = "xist" 
     33__docformat__ = "reStructuredText" 
    3434 
    3535 
     
    4343def replaceurls(stylesheet, replacer): 
    4444    """ 
    45     Replace all &url;s appearing in the <class>CSSStyleSheet<class> 
    46     <arg>stylesheet</arg>. For each &url; the function <arg>replacer</arg> will 
    47     be called and the &url; will be replaced with the result. 
     45    Replace all URLs appearing in the :class:`CSSStyleSheet` :var:`stylesheet`. 
     46    For each URL the function :var:`replacer` will be called and the URL will 
     47    be replaced with the result. 
    4848    """ 
    4949    def newreplacer(u): 
     
    9292def iterrules(node, base=None, media=None): 
    9393    """ 
    94     <p>Return an iterator for all &css; rules defined in the &html; tree <arg>node</arg>. 
    95     This will parse the &css; defined in any <class>html.style</class> or 
    96     <class>html.link</class> element (and recursively in those stylesheets imported 
    97     via the <lit>@import</lit> rule). The rules will be returned as 
    98     <class>CSSStyleRule</class> objects from the <mod>cssutils</mod> package 
    99     (so this requires <mod>cssutils</mod>).</p> 
    100  
    101     <p>The <arg>base</arg> argument will be used as the base &url; for parsing 
    102     the stylesheet references in the tree (so <lit>None</lit> means the &url;s 
    103     will be used exactly as they appear in the tree). All &url;s in the style 
    104     properties will be resolved.</p> 
    105  
    106     <p>If <arg>media</arg> is given, only rules that apply to this media type 
    107     will be produced.</p> 
     94    Return an iterator for all CSS rules defined in the HTML tree :var:`node`. 
     95    This will parse the CSS defined in any :class:`html.style` or 
     96    :class:`html.link` element (and recursively in those stylesheets imported 
     97    via the ``@import`` rule). The rules will be returned as 
     98    :class:`CSSStyleRule` objects from the :mod:`cssutils` package (so this 
     99    requires :mod:`cssutils`). 
     100 
     101    The :var:`base` argument will be used as the base URL for parsing the 
     102    stylesheet references in the tree (so :const:`None` means the URLs will be 
     103    used exactly as they appear in the tree). All URLs in the style properties 
     104    will be resolved. 
     105 
     106    If :var:`media` is given, only rules that apply to this media type will 
     107    be produced. 
    108108    """ 
    109109    if base is not None: 
     
    134134def applystylesheets(node, base=None, media=None): 
    135135    """ 
    136     <p><func>applystylesheets</func> modifies the &xist; tree <arg>node</arg> 
    137     by removing all &css; (from <class>html.link</class> and <class>html.style</class> 
    138     elements and their <lit>@import</lit>ed stylesheets) and puts the resulting 
    139     styles properties into the <lit>style</lit> attribute of the every affected 
    140     element instead.</p> 
     136    :func:`applystylesheets` modifies the XIST tree :var:`node` by removing all 
     137    CSS (from :class:`html.link` and :class:`html.style` elements and their 
     138    ``@import``ed stylesheets) and puts the resulting styles properties into 
     139    the ``style`` attribute of the every affected element instead. 
    141140     
    142     <p>The <arg>base</arg> argument will be used as the base &url; for parsing 
    143     the stylesheet references in the tree (so <lit>None</lit> means the &url;s 
    144     will be used exactly as they appear in the tree). All &url;s in the style 
    145     properties will be resolved.</p> 
    146  
    147     <p>If <arg>media</arg> is given, only rules that apply to this media type 
    148     will be applied.</p> 
     141    The :var:`base` argument will be used as the base URL for parsing the 
     142    stylesheet references in the tree (so :const:`None` means the URLs will be 
     143    used exactly as they appear in the tree). All URLs in the style properties 
     144    will be resolved. 
     145 
     146    If :var:`media` is given, only rules that apply to this media type will 
     147    be applied. 
    149148    """ 
    150149    def iterstyles(node, rules): 
     
    188187 
    189188def _is_nth_node(iterator, node, index): 
    190     # Return whether node is the index'th node in iterator (starting at 1) 
     189    # Return whether :var:`node` is the :var:`index`'th node in :var:`iterator` (starting at 1) 
    191190    # index is an int or int string or "even" or "odd" 
    192191    if index == "even": 
     
    216215 
    217216def _is_nth_last_node(iterator, node, index): 
    218     # Return whether node is the index'th last node in iterator 
     217    # Return whether :var:`node` is the :var:`index`'th last node in :var:`iterator` 
    219218    # index is an int or int string or "even" or "odd" 
    220219    if index == "even": 
     
    257256class CSSWeightedSelector(xfind.Selector): 
    258257    """ 
    259     Base class for all &css; pseudo-class selectors. 
     258    Base class for all CSS pseudo-class selectors. 
    260259    """ 
    261260    def cssweight(self): 
     
    265264class CSSHasAttributeSelector(CSSWeightedSelector): 
    266265    """ 
    267     A <class>CSSHasAttributeSelector</class> selector selects all element nodes 
    268     that have an attribute with the specified &xml; name. 
     266    A :class:`CSSHasAttributeSelector` selector selects all element nodes 
     267    that have an attribute with the specified XML name. 
    269268    """ 
    270269    def __init__(self, attributename): 
     
    535534class CSSAdjacentSiblingCombinator(xfind.BinaryCombinator): 
    536535    """ 
    537     <p>A <class>CSSAdjacentSiblingCombinator</class> work similar to an 
    538     <class>AdjacentSiblingCombinator</class> except that only preceding elements 
    539     are considered.</p> 
     536    A :class:`CSSAdjacentSiblingCombinator` work similar to an 
     537    :class:`AdjacentSiblingCombinator` except that only preceding elements 
     538    are considered. 
    540539    """ 
    541540 
     
    559558class CSSGeneralSiblingCombinator(xfind.BinaryCombinator): 
    560559    """ 
    561     <p>A <class>CSSGeneralSiblingCombinator</class> work similar to an 
    562     <class>GeneralSiblingCombinator</class> except that only preceding elements 
    563     are considered.</p> 
     560    A :class:`CSSGeneralSiblingCombinator` work similar to an 
     561    :class:`GeneralSiblingCombinator` except that only preceding elements 
     562    are considered. 
    564563    """ 
    565564 
     
    623622    """ 
    624623    Create a walk filter that will yield all nodes that match the specified 
    625     &css; expression. <arg>selectors</arg> can be a string or a 
    626     <class>cssutils.css.selector.Selector</class> object. <arg>prefixes</arg> 
     624    CSS expression. :var:`selectors` can be a string or a 
     625    :class:`cssutils.css.selector.Selector` object. :var:`prefixes` 
    627626    may be a mapping mapping namespace prefixes to namespace names. 
    628627    """ 
  • src/ll/xist/helpers.c

    r3144 r3180  
    7171 
    7272static char escapetext__doc__[] = 
    73 "escapetext(unicode) -> unicode\n\ 
    74 \n\ 
    75 Return a copy of the string S, where every occurrence of\n\ 
    76 '<', '>', '&' and restricted characters has been replaced\n\ 
     73"Return a copy of the argument string, where every occurrence of\n\ 
     74``<``, ``>``, ``&`` and restricted characters has been replaced\n\ 
    7775with its XML character entity or character reference."; 
    7876 
     
    8583 
    8684static char escapeattr__doc__[] = 
    87 "escapeattr(unicode) -> unicode\n\ 
    88 \n\ 
    89 Return a copy of the string S, where every occurrence of\n\ 
    90 '<', '>', '&', '\"' and restricted characters has been replaced\n\ 
     85"Return a copy of the argument string, where every occurrence of\n\ 
     86``<``, ``>``, ``&``, ``\"``` and restricted characters has been replaced\n\ 
    9187with their XML character entity or character reference."; 
    9288 
     
    9995 
    10096static char cssescapereplace__doc__[] = 
    101 "cssescapereplace(unicode, encoding) -> unicode\n\ 
    102 \n\ 
    103 Return a copy of the string S, where every unencodable character\n\ 
    104 in the specified encoding has been replaced with a \\xx hexadecimal\n\ 
     97"Return a copy of the argument string, where every unencodable character\n\ 
     98in the specified encoding has been replaced with a ``\\xx`` hexadecimal\n\ 
    10599escape sequence."; 
    106100 
  • src/ll/xist/ns/__init__.py

    r3128 r3180  
    1010 
    1111""" 
    12 <p>This package contains all the modules that provide namespaces to 
    13 to &xist;. For example the definition of &html; can be found in the 
    14 module <pyref module="ll.xist.ns.html"><mod>xist.ns.html</mod></pyref>.</p> 
     12This package contains all the modules that provide namespaces to to XIST. 
     13For example the definition of HTML can be found in the module 
     14:mod:`ll.xist.ns.html`. 
    1515 
    16 <p>Some of these namespaces can be considered target namespaces (e.g. 
    17 <pyref module="ll.xist.ns.html"><mod>html</mod></pyref>, 
    18 <pyref module="ll.xist.ns.ihtml"><mod>ihtml</mod></pyref>, 
    19 <pyref module="ll.xist.ns.wml"><mod>wml</mod></pyref> and 
    20 <pyref module="ll.xist.ns.docbook"><mod>docbook</mod></pyref>). The element and 
    21 entity classes in these namespaces don't implement a convert method, i.e. they inherit the 
    22 <pyref module="ll.xist.xsc" class="Element" method="convert"><meth>convert</meth></pyref> method 
    23 from <pyref module="ll.xist.xsc" class="Element"><class>Element</class></pyref>.</p> 
     16Some of these namespaces can be considered target namespaces (e.g. 
     17:mod:`ll.xist.ns.html`, :mod:`ll.xist.ns.ihtml`,:mod:`ll.xist.ns.wml` and 
     18:mod:`ll.xist.ns.docbook`). The element and entity classes in these namespaces 
     19don't implement a convert method, i.e. they inherit the :meth:`convert` method 
     20from :class:`ll.xist.xsc.Element.convert`. 
    2421 
    25 <p>Other namespace modules provide additional functionality through 
    26 new element classes. Calling <pyref module="ll.xist.xsc" class="Node" method="convert"><meth>convert</meth></pyref> 
    27 on these elements might convert them to one of these target namespaces 
    28 (depending on the <lit>target</lit> attribute of the 
    29 <pyref module="ll.xist.converters" class="Converter"><class>Converter</class></pyref> object 
    30 passed around.) Some of these namespace modules completely ignore the target 
    31 and convert to one fixed target namespace (<pyref module="ll.xist.ns.html"><mod>html</mod></pyref> 
    32 in most cases).</p> 
     22Other namespace modules provide additional functionality through new element 
     23classes. Calling :meth:`ll.xist.xsc.Node.convert` on these elements might 
     24convert them to one of these target namespaces (depending on the :attr:`target` 
     25attribute of the :class:`ll.xist.converters.Converter` object passed around.) 
     26Some of these namespace modules completely ignore the target and convert to one 
     27fixed target namespace (:mod:`ll.xist.ns.html` in most cases). 
    3328""" 
    3429 
    3530 
    36 __docformat__ = "xist" 
     31__docformat__ = "reStructuredText" 
    3732 
    3833 
     
    6863    "xml" 
    6964] 
    70  
  • src/ll/xist/ns/abbr.py

    r3128 r3180  
    1010 
    1111""" 
    12 <p>This module contains entities for many abbreviations and acronyms.</p> 
     12This module contains entities for many abbreviations and acronyms. 
    1313""" 
    1414 
     
    1818 
    1919 
    20 __docformat__ = "xist" 
     20__docformat__ = "reStructuredText" 
    2121 
    2222 
  • src/ll/xist/ns/atom.py

    r3128 r3180  
    1010 
    1111""" 
    12 This namespace module implements Atom 1.0 as specified by 
    13 <a href="http://www.atompub.org/rfc4287.html">RFC 4287</a>. 
     12This namespace module implements Atom 1.0 as specified by :rfc:`4287`. 
    1413""" 
    1514 
     
    1918 
    2019 
    21 __docformat__ = "xist" 
     20__docformat__ = "reStructuredText" 
    2221 
    2322 
     
    2726class feed(xsc.Element): 
    2827    """ 
    29     The <class>feed</class> element is the document (i.e., top-level) element of 
    30     an Atom Feed Document, acting as a container for metadata and data associated 
     28    The :class:`feed` element is the document (i.e., top-level) element of an 
     29    Atom Feed Document, acting as a container for metadata and data associated 
    3130    with the feed. 
    3231    """ 
     
    3635class entry(xsc.Element): 
    3736    """ 
    38     The <class>entry</class> element represents an individual entry, acting as a 
     37    The :class:`entry` element represents an individual entry, acting as a 
    3938    container for metadata and data associated with the entry. 
    4039    """ 
     
    4443class content(xsc.Element): 
    4544    """ 
    46     The <class>content</class> element either contains or links to the content of 
    47     the <pyref class="entry><class>entry</class></pyref>. 
     45    The :class:`content` element either contains or links to the content of 
     46    the :class:`entry`. 
    4847    """ 
    4948    xmlns = xmlns 
     
    5554class author(xsc.Element): 
    5655    """ 
    57     The <class>author</class> element indicates the author of the 
    58     <pyref class="entry"><class>entry</class></pyref> or 
    59     <pyref class="feed"><class>feed</class></pyref>. 
     56    The :class:`author` element indicates the author of the 
     57    :class:`entry` or :class:`feed`. 
    6058    """ 
    6159    xmlns = xmlns 
     
    6462class category(xsc.Element): 
    6563    """ 
    66     The <class>category</class> element conveys information about a category 
    67     associated with an <pyref class="entry"><class>entry</class></pyref> or 
    68     <pyref class="feed"><class>feed</class></pyref>. 
     64    The :class:`category` element conveys information about a category 
     65    associated with an :class:`entry` or :class:`feed`. 
    6966    """ 
    7067    xmlns = xmlns 
     
    7774class contributor(xsc.Element): 
    7875    """ 
    79     The <class>contributor</class> element indicates a person or other entity 
    80     who contributed <pyref class="entry"><class>entry</class></pyref> or 
    81     <pyref class="feed"><class>feed</class></pyref>. 
     76    The :class:`contributor` element indicates a person or other entity 
     77    who contributed :class:`entry` or :class:`feed`. 
    8278    """ 
    8379    xmlns = xmlns 
     
    8682class generator(xsc.Element): 
    8783    """ 
    88     The <class>generator</class> element's content identifies the agent used to 
     84    The :class:`generator` element's content identifies the agent used to 
    8985    generate a feed, for debugging and other purposes. 
    9086    """ 
     
    9793class icon(xsc.Element): 
    9894    """ 
    99     The <class>icon</class> element's content is an IRI reference that identifies 
     95    The :class:`icon` element's content is an IRI reference that identifies 
    10096    an image that provides iconic visual identification for a feed. 
    10197    """ 
     
    105101class id(xsc.Element): 
    106102    """ 
    107     The <class>id</class> element conveys a permanent, universally unique identifier 
    108     for an <pyref class="entry"><class>entry</class></pyref> or 
    109     <pyref class="feed"><class>feed</class></pyref>. 
     103    The :class:`id` element conveys a permanent, universally unique identifier 
     104    for an :class:`entry` or :class:`feed`. 
    110105    """ 
    111106    xmlns = xmlns 
     
    114109class link(xsc.Element): 
    115110    """ 
    116     The <class>link</class> element defines a reference from an 
    117     <pyref class="entry"><class>entry</class></pyref> or 
    118     <pyref class="feed"><class>feed</class></pyref> to a Web resource. 
     111    The :class:`link` element defines a reference from an 
     112    :class:`entry` or :class:`feed` to a Web resource. 
    119113    """ 
    120114    xmlns = xmlns 
     
    130124class logo(xsc.Element): 
    131125    """ 
    132     The <class>logo</class> element's content is an IRI reference that identifies 
    133     an image that provides visual identification for a <pyref class="feed"><class>feed</class></pyref>. 
     126    The :class:`logo` element's content is an IRI reference that identifies 
     127    an image that provides visual identification for a :class:`feed`. 
    134128    """ 
    135129    xmlns = xmlns 
     
    138132class published(xsc.Element): 
    139133    """ 
    140     The <class>published</class> element indicatesg an instant in time associated 
    141     with an event early in the life cycle of the <pyref class="entry"><class>entry</class></pyref>. 
     134    The :class:`published` element indicatesg an instant in time associated 
     135    with an event early in the life cycle of the :class:`entry`. 
    142136    """ 
    143137    xmlns = xmlns 
     
    146140class rights(xsc.Element): 
    147141    """ 
    148     The <class>rights</class> element contains text that conveys information about 
    149     rights held in and over an <pyref class="entry"><class>entry</class></pyref> 
    150     or <pyref class="feed"><class>feed</class></pyref>. 
     142    The :class:`rights` element contains text that conveys information about 
     143    rights held in and over an :class:`entry` or :class:`feed`. 
    151144    """ 
    152145    xmlns = xmlns 
     
    157150class source(xsc.Element): 
    158151    """ 
    159     If an <pyref class="entry"><class>entry</class></pyref> is copied from one 
    160     <pyref class="feed"><class>feed</class></pyref> into another <class>feed</class>, 
    161     then the source <class>feed</class>'s metadata (all child elements of <class>feed</class> 
    162     other than the <class>entry</class> elements) may be preserved within 
    163     the copied entry by adding a <class>source</class> child element, if it is not 
    164     already present in the <class>entry</class>, and including some or all of the 
    165     source <class>feed</class>'s Metadata elements as the <class>source</class> 
    166     element's children. 
     152    If an :class:`entry` is copied from one :class:`feed` into another 
     153    :class:`feed`, then the source :class:`feed`'s metadata (all child elements 
     154    of :class:`feed` other than the :class:`entry` elements) may be preserved 
     155    within the copied entry by adding a :class:`source` child element, if it is 
     156    not already present in the :class:`entry`, and including some or all of the 
     157    source :class:`feed`'s Metadata elements as the :class:`source` element's 
     158    children. 
    167159    """ 
    168160    xmlns = xmlns 
     
    171163class subtitle(xsc.Element): 
    172164    """ 
    173     The <class>subtitle</class> element contains text that conveys a human-readable 
    174     description or subtitle for a <pyref class="feed"><class>feed</class></pyref>. 
     165    The :class:`subtitle` element contains text that conveys a human-readable 
     166    description or subtitle for a :class:`feed`. 
    175167    """ 
    176168    xmlns = xmlns 
     
    181173class summary(xsc.Element): 
    182174    """ 
    183     The <class>summary</class> element contains text that conveys a short summary, 
     175    The :class:`summary` element contains text that conveys a short summary, 
    184176    abstract, or excerpt of an entry. 
    185177    """ 
     
    191183class title(xsc.Element): 
    192184    """ 
    193     The <class>title</class> element contains text that conveys a human-readable 
    194     title for an <pyref class="entry"><class>entry</class></pyref> or 
    195     <pyref class="feed"><class>feed</class></pyref>. 
     185    The :class:`title` element contains text that conveys a human-readable 
     186    title for an :class:`entry` or :class:`feed`. 
    196187    """ 
    197188    xmlns = xmlns 
     
    202193class updated(xsc.Element): 
    203194    """ 
    204     The <class>updated</class> element contains a date indicating the most recent 
    205     instant in time when an <pyref class="entry"><class>entry</class></pyref> or 
    206     <pyref class="feed"><class>feed</class></pyref> was modified in a way the 
    207     publisher considers significant. 
     195    The :class:`updated` element contains a date indicating the most recent 
     196    instant in time when an :class:`entry` or :class:`feed` was modified in a 
     197    way the publisher considers significant. 
    208198    """ 
    209199    xmlns = xmlns 
     
    212202class email(xsc.Element): 
    213203    """ 
    214     The <class>email</class> element's content conveys an e-mail address associated with the person. 
     204    The :class:`email` element's content conveys an e-mail address associated 
     205    with the person. 
    215206    """ 
    216207    xmlns = xmlns 
     
    219210class uri(xsc.Element): 
    220211    """ 
    221     The <class>uri</class> element's content conveys an IRI associated with the person. 
     212    The :class:`uri` element's content conveys an IRI associated with the person. 
    222213    """ 
    223214    xmlns = xmlns 
     
    226217class name(xsc.Element): 
    227218    """ 
    228     The <class>name</class> element's content conveys a human-readable name for the person. 
     219    The :class:`name` element's content conveys a human-readable name for the 
     220    person. 
    229221    """ 
    230222    xmlns = xmlns 
  • src/ll/xist/ns/chars.py

    r3128 r3180  
    1010 
    1111""" 
    12 <p>An &xist; namespace that contains all the character entities defined in &html;.</p> 
     12An XIST namespace that contains all the character entities defined in HTML. 
    1313""" 
    1414 
     
    1717 
    1818 
    19 __docformat__ = "xist" 
     19__docformat__ = "reStructuredText" 
    2020 
    2121 
  • src/ll/xist/ns/code.py

    r3128 r3180  
    1010 
    1111""" 
    12 <p>An &xist; module that allows embedding Python code in &xml;</p> 
     12An XIST module that allows embedding Python code in XML. 
    1313""" 
    1414 
     
    2020 
    2121 
    22 __docformat__ = "xist" 
     22__docformat__ = "reStructuredText" 
    2323 
    2424 
     
    9191class pyexec(_base): 
    9292    """ 
    93     <p>Here the content of the processing instruction is executed as 
    94     Python code. Execution is done when the node is converted. When converted 
    95     such a node will result in an empty <lit>Null</lit> node.</p> 
     93    When converting a :class:`pyexec` object the content of the processing 
     94    instruction is executed as Python code. Execution is done when the node 
     95    is converted. When converted such a node will result in an empty 
     96    :data:`Null` node. 
    9697 
    97     <p>These processing instructions will be evaluated and executed in the 
    98     namespace of the module sandbox (which is a dictionary in the converter 
    99     context for the namespace).</p> 
     98    These processing instructions will be evaluated and executed in the 
     99    namespace of the module sandbox (which will be store in the converter 
     100    context). 
    100101    """ 
    101102 
     
    109110class pyeval(_base): 
    110111    """ 
    111     <p>Here the code will be executed when the node is converted to &html; 
    112     as if it was the body of a function, so you can return an expression 
    113     here. Although the content is used as a function body no indentation 
    114     is neccessary or allowed. The returned value will be converted to a 
    115     node and this resulting node will be converted.</p> 
     112    The content of a :class:`pyeval` processing instruction will be executed 
     113    when the node is converted as if it was the body of a function, so you 
     114    can return an expression here. Although the content is used as a function 
     115    body no indentation is neccessary or allowed. The returned value will be 
     116    converted to a node and this resulting node will be converted. 
    116117 
    117     <p>These processing instructions will be evaluated and executed in the 
    118     namespace of the module sandbox.</p> 
     118    These processing instructions will be evaluated and executed in the 
     119    namespace of the module sandbox (which will be store in the converter 
     120    context). 
    119121 
    120     <p>Note that you should not define the symbol <lit>__</lit> in any of your &xist; 
    121     processing instructions, as it is used by &xist; for internal purposes.</p> 
     122    Note that you should not define the symbol ``__`` in any of your XIST 
     123    processing instructions, as it is used by XIST for internal purposes. 
    122124    """ 
    123125 
    124126    def convert(self, converter): 
    125127        """ 
    126         <p>Evaluates the code as if it was the body of a Python funtion. 
    127         The <arg>converter</arg> argument will be available 
    128         under the name <arg>converter</arg> as an argument to the function.</p> 
     128        Evaluates the code as if it was the body of a Python funtion. The 
     129        :var:`converter` argument will be available under the name 
     130        :var:`converter` as an argument to the function. 
    129131        """ 
    130132        code = Code(self.content, True) 
  • src/ll/xist/ns/detox.py

    r3128 r3180  
    1010 
    1111''' 
    12 <p>This module is an &xist; namespace. It provides a simple template language 
    13 based on processing instructions embedded in &xml; or plain text.</p> 
    14  
    15 <p>The following example is a simple <z>Hello, World</z> type template:</p> 
    16  
    17 <prog><![CDATA[ 
    18 from ll.xist.ns import detox 
    19  
    20 template = """ 
    21 <?def helloworld(n=10)?> 
    22     <?for i in xrange(n)?> 
    23         Hello, World! 
    24     <?endfor?> 
    25 <?enddef?> 
    26 """ 
    27  
    28 module = detox.xml2mod(template) 
    29  
    30 print "".join(module.helloworld()) 
    31 ]]></prog> 
     12This module is an XIST namespace. It provides a simple template language 
     13based on processing instructions embedded in XML or plain text. 
     14 
     15The following example is a simple "Hello, World" type template:: 
     16 
     17    from ll.xist.ns import detox 
     18 
     19    template = """ 
     20    <?def helloworld(n=10)?> 
     21        <?for i in xrange(n)?> 
     22            Hello, World! 
     23        <?end for?> 
     24    <?end def?> 
     25    """ 
     26 
     27    module = detox.xml2mod(template) 
     28 
     29    print "".join(module.helloworld()) 
    3230''' 
    3331 
     
    3937 
    4038 
    41 __docformat__ = "xist" 
     39__docformat__ = "reStructuredText" 
    4240 
    4341 
     
    5856class code(xsc.ProcInst): 
    5957    """ 
    60     <p>Embed the PI data literally in the generated code.</p> 
    61  
    62     <p>For example <lit>&lt;?code foo = 42?&gt;</lit> will put the 
    63     statement <lit>foo = 42</lit> into the generated Python source.</p> 
     58    Embed the PI data literally in the generated code. 
     59 
     60    For example ``<?code foo = 42?>`` will put the statement ``foo = 42`` into 
     61    the generated Python source. 
    6462    """ 
    6563 
     
    6765class if_(xsc.ProcInst): 
    6866    """ 
    69     <p>Starts an if block. An if block can contain zero or more 
    70     <pyref class="elif_"><class>elif_</class></pyref> blocks, followed by zero 
    71     or one <pyref class="else_"><class>else_</class></pyref> block and must 
    72     be closed with an <pyref class="endif"><class>endif</class></pyref> PI.</p> 
    73  
    74     <p>For example:</p> 
    75  
    76     <prog><![CDATA[ 
    77     <?code import random?> 
    78     <?code n = random.choice("123?")?> 
    79     <?if n == "1"?> 
    80         One 
    81     <?elif n == "2"?> 
    82         Two 
    83     <?elif n == "3"?> 
    84         Three 
    85     <?else?> 
    86         Something else 
    87     <?end if?> 
    88     ]]></prog> 
     67    Starts an if block. An if block can contain zero or more :class:`elif_` 
     68    blocks, followed by zero or one :class:`else_` block and must be closed 
     69    with an :class:`endif` PI. 
     70 
     71    For example:: 
     72 
     73        <?code import random?> 
     74        <?code n = random.choice("123?")?> 
     75        <?if n == "1"?> 
     76            One 
     77        <?elif n == "2"?> 
     78            Two 
     79        <?elif n == "3"?> 
     80            Three 
     81        <?else?> 
     82            Something else 
     83        <?end if?> 
    8984    """ 
    9085    xmlname = "if" 
     
    107102class def_(xsc.ProcInst): 
    108103    """ 
    109     <p>Start a function (or method) definition. A function definition must be 
    110     closed with an <pyref class="enddef"><class>enddef</class></pyref> PI.</p> 
    111  
    112     <p>Example:</p> 
    113  
    114     <prog><![CDATA[ 
    115     <?def persontable(persons)?> 
    116         <table> 
    117             <tr> 
    118                 <th>first name</th> 
    119                 <th>last name</th> 
    120             </tr> 
    121             <?for person in persons?> 
     104    Start a function (or method) definition. A function definition must be 
     105    closed with an :class:`end` PI. 
     106 
     107    Example:: 
     108 
     109        <?def persontable(persons)?> 
     110            <table> 
    122111                <tr> 
    123                     <td><?textexpr person.firstname?></td> 
    124                     <td><?textexpr person.lastname?></td> 
     112                    <th>first name</th> 
     113                    <th>last name</th> 
    125114                </tr> 
     115                <?for person in persons?> 
     116                    <tr> 
     117                        <td><?textexpr person.firstname?></td> 
     118                        <td><?textexpr person.lastname?></td> 
     119                    </tr> 
     120                <?end for?> 
     121            </table> 
     122        <?end def?> 
     123 
     124    If the generated function contains output (i.e. if there is text content 
     125    or :class:`expr`, :class:`textexpr` or :class:`attrexpr` PIs before the 
     126    matching :class:`end`) the generated function will be a generator function. 
     127 
     128    Output outside of a function definition will be ignored. 
     129    """ 
     130    xmlname = "def" 
     131 
     132 
     133class class_(xsc.ProcInst): 
     134    """ 
     135    Start a class definition. A class definition must be closed with an 
     136    :class:`end` PI. 
     137 
     138    Example:: 
     139 
     140        <?class mylist(list)?> 
     141            <?def output(self)?> 
     142                <ul> 
     143                    <?for item in self?> 
     144                        <li><?textexpr item?></li> 
     145                    <?endfor?> 
     146                </ul> 
     147            <?end def?> 
     148        <?end class?> 
     149    """ 
     150    xmlname = "class" 
     151 
     152 
     153class for_(xsc.ProcInst): 
     154    """ 
     155    Start a ``for`` loop. A for loop must be closed with an :class:`end` PI. 
     156 
     157    For example:: 
     158 
     159        <ul> 
     160            <?for i in xrange(10)?> 
     161                <li><?expr str(i)?></li> 
    126162            <?end for?> 
    127         </table> 
    128     <?end def?> 
    129     ]]></prog> 
    130  
    131     <p>If the generated function contains output (i.e. if there is text content 
    132     or <pyref class="expr"><class>expr</class></pyref>, 
    133     <pyref class="textexpr"><class>textexpr</class></pyref> or 
    134     <pyref class="attrexpr"><class>attrexpr</class></pyref> PIs before the matching 
    135     <pyref class="enddef"><class>enddef</class></pyref>) the generated function 
    136     will be a generator function.</p> 
    137  
    138     <p>Output outside of a function definition will be ignored.</p> 
    139     """ 
    140     xmlname = "def" 
    141  
    142  
    143 class class_(xsc.ProcInst): 
    144     """ 
    145     <p>Start a class definition. A class definition must be closed with an 
    146     <pyref class="endclass"><class>endclass</class></pyref> PI.</p> 
    147  
    148     <p>Example:</p> 
    149     <prog><![CDATA[ 
    150     <?class mylist(list)?> 
    151         <?def output(self)?> 
    152             <ul> 
    153                 <?for item in self?> 
    154                     <li><?textexpr item?></li> 
    155                 <?endfor?> 
    156             </ul> 
    157         <?end def?> 
    158     <?end class?> 
    159     ]]></prog> 
    160     """ 
    161     xmlname = "class" 
    162  
    163  
    164 class for_(xsc.ProcInst): 
    165     """ 
    166     <p>Start a <lit>for</lit> loop. A for loop must be closed with an 
    167     <pyref class="endfor"><class>endfor</class></pyref> PI.</p> 
    168  
    169     <p>For example:</p> 
    170     <prog><![CDATA[ 
    171     <ul> 
    172         <?for i in xrange(10)?> 
    173             <li><?expr str(i)?></li> 
    174         <?end for?> 
    175     </ul> 
    176     ]]></prog> 
     163        </ul> 
    177164    """ 
    178165    xmlname = "for" 
     
    181168class while_(xsc.ProcInst): 
    182169    """ 
    183     <p>Start a <lit>while</lit> loop. A while loop must be closed with an 
    184     <pyref class="endwhile"><class>endwhile</class></pyref> PI.</p> 
    185  
    186     <p>For example:</p> 
    187     <prog><![CDATA[ 
    188     <?code i = 0?> 
    189     <ul> 
    190         <?while True?> 
    191             <li><?expr str(i)?><?code i += 1?></li> 
    192             <?code if i > 10: break?> 
    193         <?end while?> 
    194     </ul> 
    195     ]]></prog> 
     170    Start a ``while`` loop. A while loop must be closed with an :class:`end` PI. 
     171 
     172    For example:: 
     173 
     174        <?code i = 0?> 
     175        <ul> 
     176            <?while True?> 
     177                <li><?expr str(i)?><?code i += 1?></li> 
     178                <?code if i > 10: break?> 
     179            <?end while?> 
     180        </ul> 
    196181    """ 
    197182    xmlname = "while" 
     
    200185class end(xsc.ProcInst): 
    201186    """ 
    202     <p>Ends a <pyref class="while_">while</pyref> or 
    203     <pyref class="for_">for</pyref> loop or a 
    204     <pyref class="if_">if</pyref>, <pyref class="def_">def</pyref> or 
    205     <pyref class="class_">class</pyref> block. 
    206     </p> 
     187    Ends a :class:`while_` or :class:`for` loop or a :class:`if_`, :class:`def_` 
     188    or :class:`class_` block. 
    207189    """ 
    208190 
  • src/ll/xist/ns/doc.py

    r3174 r3180  
    1010 
    1111""" 
    12 <p>This namespace module provides classes that can be used for generating 
    13 documentation (in &html;, DocBook and XSL-FO).</p> 
     12This namespace module provides classes that can be used for generating 
     13documentation (in HTML, DocBook and XSL-FO). 
    1414""" 
    1515 
     
    2424 
    2525 
    26 __docformat__ = "xist" 
     26__docformat__ = "reStructuredText" 
    2727 
    2828 
     
    182182def explain(thing, name=None, format=None, context=[]): 
    183183    """ 
    184     <p>Return a &xml; representation of the documentation of 
    185     <arg>thing</arg>, which can be a function, method, class or module.</p> 
    186  
    187     <p>If <arg>thing</arg> is not a module, you must pass the context 
    188     in <arg>context</arg>, i.e. a list of names of objects into which <arg>thing</arg> 
    189     is nested. This means the first entry will always be the module name, and 
    190     the other entries will be class names.</p> 
     184    Return a XML representation of the doc string of :var:`thing`, which can be 
     185    a function, method, class or module. 
     186 
     187    If :var:`thing` is not a module, you must pass the context in :var:`context`, 
     188    i.e. a list of names of objects into which :var:`thing` is nested. This 
     189    means the first entry will always be the module name, and the other entries 
     190    will be class names. 
    191191    """ 
    192192 
     
    339339class base(xsc.Element): 
    340340    """ 
    341     The base of all element classes. Used for dispatching 
    342     to conversion targets. 
     341    The base of all element classes. Used for dispatching to conversion targets. 
    343342    """ 
    344343    xmlns = xmlns 
     
    464463class tab(xsc.Element): 
    465464    """ 
    466     Used for displaying a tab character in the &html; output. 
     465    Used for displaying a tab character in the HTML output. 
    467466    """ 
    468467    xmlns = xmlns 
     
    540539class prog(litblock): 
    541540    """ 
    542     A literal listing of all or part of a program 
     541    A literal listing of all or part of a program. 
    543542    """ 
    544543    xmlns = xmlns 
     
    552551class tty(litblock): 
    553552    """ 
    554     A dump of a shell session 
     553    A dump of a shell session. 
    555554    """ 
    556555    xmlns = xmlns 
     
    564563class prompt(inline): 
    565564    """ 
    566     The prompt in a <pyref class="tty"><class>tty</class></pyref> dump. 
     565    The prompt in a :class:`tty` dump. 
    567566    """ 
    568567    xmlns = xmlns 
     
    582581class input(inline): 
    583582    """ 
    584     Can be used inside a <pyref class="tty"><class>tty</class></pyref> to mark 
    585     the parts typed by the user. 
     583    Can be used inside a :class:`tty` to mark the parts typed by the user. 
    586584    """ 
    587585    xmlns = xmlns 
     
    601599class rep(inline): 
    602600    """ 
    603     Content that may or must be replaced by the user 
     601    Content that may or must be replaced by the user. 
    604602    """ 
    605603    xmlns = xmlns 
     
    705703class prop(code): 
    706704    """ 
    707     The name of a property in a programming language 
     705    The name of a property in a programming language. 
    708706    """ 
    709707    xmlns = xmlns 
     
    717715class class_(code): 
    718716    """ 
    719     The name of a class, in the object-oriented programming sense 
     717    The name of a class, in the object-oriented programming sense. 
    720718    """ 
    721719    xmlns = xmlns 
     
    758756class self(code): 
    759757    """ 
    760     <p>use this class when referring to the object for which a method has been 
    761     called, e.g.:</p> 
    762     <example> 
    763     <prog> 
    764         this function fooifies the object &lt;self/&gt;. 
    765     </prog> 
    766     </example> 
     758    Use this class when referring to the object for which a method has been 
     759    called, e.g.:: 
     760 
     761        this function fooifies the object <self/>;. 
    767762    """ 
    768763    xmlns = xmlns 
     
    786781class cls(inline): 
    787782    """ 
    788     <p>use this class when referring to the object for which a class method has been 
    789     called, e.g.:</p> 
    790     <example> 
    791     <prog> 
    792         this function fooifies the class &lt;cls/&gt;. 
    793     </prog> 
    794     </example> 
     783    Use this class when referring to the object for which a class method has 
     784    been called, e.g.:: 
     785 
     786        this function fooifies the class <cls/>. 
    795787    """ 
    796788    xmlns = xmlns 
     
    856848class dir(code): 
    857849    """ 
    858     The name of directory 
     850    The name of a directory 
    859851    """ 
    860852    xmlns = xmlns 
     
    948940class h(base): 
    949941    """ 
    950     The text of the title of a <pyref class="section"><class>section</class></pyref> 
    951     or an <pyref class="example"><class>example</class></pyref> 
     942    The text of the title of a :class:`section` or an :class:`example`. 
    952943    """ 
    953944    xmlns = xmlns 
     
    982973class section(block): 
    983974    """ 
    984     A recursive section 
     975    A recursive section. 
    985976    """ 
    986977    xmlns = xmlns 
     
    11051096class dt(block): 
    11061097    """ 
    1107     A term inside a <pyref class="dl"><class>dl</class></pyref> 
     1098    A term inside a :class:`dl`. 
    11081099    """ 
    11091100    xmlns = xmlns 
     
    11281119class li(block): 
    11291120    """ 
    1130     A wrapper for the elements of a list item in 
    1131     <pyref class="ul"><class>ul</class></pyref> or 
    1132     <pyref class="ol"><class>ol</class></pyref>. 
     1121    A wrapper for the elements of a list item in :class:`ul` or :class:`ol`. 
    11331122    """ 
    11341123    xmlns = xmlns 
     
    11771166class dd(block): 
    11781167    """ 
    1179     A wrapper for the elements of a list item 
    1180     <pyref class="dl"><class>dl</class></pyref> 
     1168    A wrapper for the elements of a list item :class:`dl`. 
    11811169    """ 
    11821170    xmlns = xmlns 
     
    12151203class list(block): 
    12161204    """ 
    1217     Common baseclass for <pyref class="ul"><class>ul</class></pyref>, 
    1218     <pyref class="ol"><class>ol</class></pyref> and 
    1219     <pyref class="dl"><class>dl</class></pyref>. 
     1205    Common baseclass for :class:`ul`, :class:`ol` and :class:`dl`. 
    12201206    """ 
    12211207    xmlns = xmlns 
     
    12251211class ul(list): 
    12261212    """ 
    1227     A list in which each entry is marked with a bullet or other dingbat 
     1213    A list in which each entry is marked with a bullet or other dingbat. 
    12281214    """ 
    12291215    xmlns = xmlns 
     
    12491235class ol(list): 
    12501236    """ 
    1251     A list in which each entry is marked with a sequentially incremented label 
     1237    A list in which each entry is marked with a sequentially incremented label. 
    12521238    """ 
    12531239    xmlns = xmlns 
     
    12731259class dl(list): 
    12741260    """ 
    1275     A list in which each entry is marked with a label 
     1261    A list in which each entry is marked with a label. 
    12761262    """ 
    12771263    xmlns = xmlns 
     
    13041290class example(block): 
    13051291    """ 
    1306     A formal example 
     1292    A formal example. 
    13071293    """ 
    13081294    xmlns = xmlns 
     
    14211407class em(inline): 
    14221408    """ 
    1423     Emphasized text 
     1409    Emphasized text. 
    14241410    """ 
    14251411    xmlns = xmlns 
     
    14441430class pyref(inline): 
    14451431    """ 
    1446     reference to a Python object: 
    1447     module, class, method, property or function 
     1432    Reference to a Python object: module, class, method, property or function. 
    14481433    """ 
    14491434    xmlns = xmlns 
  • src/ll/xist/ns/docbook.py

    r3128 r3180  
    1010 
    1111""" 
    12 <p>An &xist; namespace module that contains definitions for all the elements in DocBook 4.3</p> 
     12An XIST namespace module that contains definitions for all the elements in 
     13DocBook 4.3 
    1314""" 
    1415 
     
    1718 
    1819 
    19 __docformat__ = "xist" 
     20__docformat__ = "reStructuredText" 
    2021 
    2122 
  • src/ll/xist/ns/fo.py

    r3128 r3180  
    1010 
    1111""" 
    12 <p>An &xist; module that contains definitions for the 
    13 <a href="http://www.w3.org/TR/SVG/">&xsl;</a> 1.0 definition.</p> 
     12An XIST module that contains definitions for the XSL__ 1.0 definition. 
     13 
     14__ http://www.w3.org/TR/xsl11/ 
    1415""" 
    1516 
     
    1819 
    1920 
    20 __docformat__ = "xist" 
     21__docformat__ = "reStructuredText" 
    2122 
    2223 
  • src/ll/xist/ns/form.py

    r3128 r3180  
    1010 
    1111""" 
    12 <p>An &xist; module that contains elements that are useful for 
    13 forms. These are just abbreviations for the various 
    14 <lit>&lt;input type=<rep>...</rep>&gt;</lit> elements.</p> 
     12An XIST module that contains elements that are useful for forms. These are 
     13just abbreviations for the various ``<input type="...">`` elements. 
    1514""" 
    1615 
     
    2019 
    2120 
    22 __docformat__ = "xist" 
     21__docformat__ = "reStructuredText" 
    2322 
    2423 
  • src/ll/xist/ns/html.py

    r3128 r3180  
    1212 
    1313""" 
    14 <p>An &xist; namespace that contains definitions for all the elements 
    15 in <a href="http://www.w3.org/TR/html4/loose.dtd">&html; 4.0 transitional</a>.</p> 
     14An XIST namespace that contains definitions for all the elements in  
     15`HTML 4.0 transitional`__. 
     16 
     17__ http://www.w3.org/TR/html4/loose.dtd 
    1618""" 
    1719 
     
    2426 
    2527 
    26 __docformat__ = "xist" 
     28__docformat__ = "reStructuredText" 
    2729 
    2830 
     
    4850    def hasmedia(self, media): 
    4951        """ 
    50         Return whether <self> contains the media type <arg>media</arg>. Returns 
    51         <lit>True</lit> if <arg>media</arg> is <lit>None</lit> or <self/> is 
    52         empty. 
     52        Return whether :var:`self` contains the media type :var:`media`. Returns 
     53        ``True`` if :var:`media` is ``None`` or :var:`self` is empty. 
    5354        """ 
    5455        if media is not None and self: 
     
    236237class meta(xsc.Element): 
    237238    """ 
    238     generic metainformation. If the <lit>http-equiv</lit> attribute 
    239     has the value "content-type" the encoding in the <lit>content</lit> 
     239    generic metainformation. If the ``http-equiv`` attribute 
     240    has the value "content-type" the encoding in the ``content`` 
    240241    attribute will be set automatically when publishing. 
    241242    """ 
     
    13221323def astext(node, encoding="iso-8859-1", width=72): 
    13231324    """ 
    1324     <p>Return the node <arg>node</arg> as a formatted plain string. <arg>node</arg> 
    1325     must contain an &html; tree.</p> 
    1326  
    1327     <p>This requires that <app moreinfo="http://elinks.or.cz/">elinks</app> is 
    1328     installed.</p> 
    1329  
    1330     <p><arg>encoding</arg> specifies the output encoding. <arg>width</arg> 
    1331     specifies the output width.</p> 
     1325    Return the node :var:`node` as a formatted plain string. :var:`node` must 
     1326    contain an HTML tree. 
     1327 
     1328    This requires that elinks__ is installed. 
     1329 
     1330    __ http://elinks.or.cz/ 
     1331 
     1332    :var:`encoding` specifies the output encoding. :var:`width` specifies the 
     1333    output width. 
    13321334    """ 
    13331335 
  • src/ll/xist/ns/htmlspecials.py

    r3128 r3180  
    1010 
    1111""" 
    12 <p>An &xist; module that contains a collection of useful elements for 
    13 generating &html;.</p> 
     12An XIST module that contains a collection of useful elements for generating 
     13HTML. 
    1414""" 
    1515 
     
    2121 
    2222 
    23 __docformat__ = "xist" 
     23__docformat__ = "reStructuredText" 
    2424 
    2525 
     
    2929class plaintable(html.table): 
    3030    """ 
    31     <p>a &html; table where the values of the attributes <lit>cellpadding</lit>, 
    32     <lit>cellspacing</lit> and <lit>border</lit> default to <lit>0</lit>.</p> 
     31    a HTML table where the values of the attributes ``cellpadding``, 
     32    ``cellspacing`` and ``border`` default to ``0``. 
    3333    """ 
    3434    xmlns = xmlns 
     
    4848class plainbody(html.body): 
    4949    """ 
    50     <p>a &html; body where the attributes <lit>leftmargin</lit>, <lit>topmargin</lit>, 
    51     <lit>marginheight</lit> and <lit>marginwidth</lit> default to <lit>0</lit>.</p> 
     50    a HTML body where the attributes ``leftmargin``, ``topmargin``, 
     51    ``marginheight`` and ``marginwidth`` default to ``0``. 
    5252    """ 
    5353    xmlns = xmlns 
     
    7676        class color(xsc.TextAttr): 
    7777            """ 
    78             The pixel color as a &css; value. Leave it blank to get a transparent 
     78            The pixel color as a CSS value. Leave it blank to get a transparent 
    7979            pixel. 
    8080            """ 
     
    8686class pixel(_pixelbase): 
    8787    """ 
    88     <p>element for single transparent pixel image.</p> 
     88    Element for single transparent pixel image. 
    8989     
    90     <p>You can specify the pixel color via the <lit>color</lit> 
    91     attribute (which will set the background-color in the style attribute.</p> 
    92  
    93     <p>In addition to that you can specify width and height attributes 
    94     (and every other allowed attribute for the <class>img</class> element) 
    95     as usual.</p> 
     90    You can specify the pixel color via the ``color`` attribute (which will set 
     91    the background-color in the style attribute. 
     92 
     93    In addition to that you can specify width and height attributes (and every 
     94    other allowed attribute for the :class:`img` element) as usual. 
    9695    """ 
    9796    xmlns = xmlns 
     
    124123class autoimg(html.img): 
    125124    """ 
    126     <p>An image were width and height attributes are automatically generated.</p> 
     125    An image were width and height attributes are automatically generated. 
    127126     
    128     <p>If the attributes are already there, they won't be modified.</p> 
     127    If the attributes are already there, they won't be modified. 
    129128    """ 
    130129    xmlns = xmlns 
     
    142141class autopixel(_pixelbase): 
    143142    """ 
    144     <p>A pixel image were width and height attributes are automatically generated.</p> 
     143    A pixel image were width and height attributes are automatically generated. 
    145144     
    146     <p>This works like <pyref class="pixel"><class>pixel</class></pyref> but the 
    147     size is <z>inherited</z> from the image specified via the <lit>src</lit> attribute.</p> 
     145    This works like :class:`pixel` but the size is "inherited" from the image 
     146    specified via the ``src`` attribute. 
    148147    """ 
    149148    xmlns = xmlns 
     
    161160class autoinput(html.input): 
    162161    """ 
    163     <p>Extends <pyref module="ll.xist.ns.html" class="input"><class>input</class></pyref> 
    164     with the ability to automatically set the size, if this element 
    165     has <lit>type=="image"</lit>.</p> 
     162    Extends :class:`ll.xist.ns.html.input` with the ability to automatically 
     163    set the size, if this element has ``type=="image"``. 
    166164    """ 
    167165    xmlns = xmlns 
     
    204202class javascript(html.script): 
    205203    """ 
    206     <p>can be used for javascript.</p> 
     204    Can be used for javascript. 
    207205    """ 
    208206    xmlns = xmlns 
  • src/ll/xist/ns/ihtml.py

    r3128 r3180  
    1010 
    1111""" 
    12 <p>An &xist; module that contains the elements and entities for 
    13 i-mode compatible &html;.</p> 
     12An XIST module that contains the elements and entities for i-mode compatible HTML. 
    1413""" 
    1514 
     
    2019 
    2120 
    22 __docformat__ = "xist" 
     21__docformat__ = "reStructuredText" 
    2322 
    2423 
     
    9695        class clear(xsc.TextAttr): 
    9796            """ 
    98             Designates the way a character string wraps around an inline image by deciding where line feeding takes place. 
    99             Depending on the attribute, it also cancels the wraparound function. (1.0) 
     97            Designates the way a character string wraps around an inline image by 
     98            deciding where line feeding takes place. Depending on the attribute, 
     99            it also cancels the wraparound function. (1.0) 
    100100            """ 
    101101 
     
    110110class dd(xsc.Element): 
    111111    """ 
    112     Creates a definition list. (See <pyref class="dl"><class>dl</class></pyref>) (1.0) 
     112    Creates a definition list. (See :class:`dl`) (1.0) 
    113113    """ 
    114114    xmlns = xmlns 
     
    117117class dir(xsc.Element): 
    118118    """ 
    119     Creates a list of menus or directories. Each list item must be a <pyref class="li"><class>li</class></pyref>. (1.0) 
     119    Creates a list of menus or directories. Each list item must be a 
     120    :class:`li`. (1.0) 
    120121    """ 
    121122    xmlns = xmlns 
     
    131132class dl(xsc.Element): 
    132133    """ 
    133     Creates a definition list. The content consists of <pyref class="dd"><class>dd</class></pyref> and 
    134     <pyref class="dt"><class>dt</class></pyref> elements. (1.0) 
     134    Creates a definition list. The content consists of :class:`dd` and 
     135    :class:`dt` elements. (1.0) 
    135136    """ 
    136137    xmlns = xmlns 
     
    169170class head(xsc.Element): 
    170171    """ 
    171     Designates the information that is used as the page title and/or by the server. The <class>head</class> tag follows the <pyref class="html"><class>html</class></pyref> tag. (1.0) 
     172    Designates the information that is used as the page title and/or by the 
     173    server. The :class:`head` tag follows the :class:`html` tag. (1.0) 
    172174    """ 
    173175    xmlns = xmlns 
     
    267269        class align(xsc.TextAttr): 
    268270            """ 
    269             Defines the way the image and character string are laid out, and how the character string 
    270             wraps around the image. <lit>top</lit>, <lit>middle</lit> or <lit>bottom</lit>. (1.0) 
     271            Defines the way the image and character string are laid out, and how 
     272            the character string wraps around the image. ``top``, ``middle`` or 
     273            ``bottom``. (1.0) 
    271274            """ 
    272275        class width(xsc.TextAttr): 
     
    287290        class type(xsc.TextAttr): 
    288291            """ 
    289             Displays a textbox (<lit>text</lit>), a password input textbox (<lit>password</lit>), 
    290             checkbox (<lit>checkbox</lit>), radio button (<lit>radio</lit>), hidden field (<lit>hidden</lit>), 
    291             submit (<lit>submit</lit>) or reset (<lit>reset</lit>) (1.0) 
     292            Displays a textbox (``text``), a password input textbox (``password``), 
     293            checkbox (``checkbox``), radio button (``radio``), hidden field 
     294            (``hidden``), submit (``submit``) or reset (``reset``) (1.0) 
    292295            """ 
    293296        class name(xsc.TextAttr): 
    294297            """ 
    295             Designates the name of the field employed to pass the data, obtained using the <class>input</class> tag, 
    296             to an &cgi; script and others. (1.0) 
     298            Designates the name of the field employed to pass the data, obtained 
     299            using the :class:`input` tag, to an CGI script and others. (1.0) 
    297300            """ 
    298301        class size(xsc.IntAttr): 
     
    318321        class type(xsc.TextAttr): 
    319322            """ 
    320             Designates number format of a list. <lit>1</lit> is numeric, <lit>A</lit> is capital Roman letters, 
    321             and <lit>a</lit> is lower-case Roman letters. (2.0) 
     323            Designates number format of a list. ``1`` is numeric, ``A`` is capital 
     324            Roman letters, and ``a`` is lower-case Roman letters. (2.0) 
    322325            """ 
    323326        class value(xsc.IntAttr): 
     
    333336        class behaviour(xsc.TextAttr): 
    334337            """ 
    335             Designates whether text will scroll off screen, stop at the edge of the screen, etc. 
    336             (<lit>scroll</lit>, <lit>slide</lit> or <lit>alternate</lit>) (2.0) 
     338            Designates whether text will scroll off screen, stop at the edge of 
     339            the screen, etc. (``scroll``, ``slide`` or ``alternate``) (2.0) 
    337340            """ 
    338341        class direction(xsc.TextAttr): 
    339342            """ 
    340             Designates which direction text will scroll. (<lit>left</lit> or <lit>right</lit>) (2.0) 
     343            Designates which direction text will scroll. (``left`` or ``right``) (2.0) 
    341344            """ 
    342345        class loop(xsc.IntAttr): 
     
    368371            "Designates the name of the meta field" 
    369372        class http_equiv(xsc.TextAttr): 
    370             "Designates the HTTP header fields you want to emulate. (Fixed to <lit>Content-Type</lit>) (2.0)" 
     373            "Designates the HTTP header fields you want to emulate. (Fixed to ``Content-Type``) (2.0)" 
    371374            xmlname = "http-equiv" 
    372375        class content(xsc.TextAttr): 
    373             "Designates content type (Fixed <lit>to text/html; charset=SHIFT_JIS</lit>) (2.0)" 
     376            "Designates content type (Fixed ``to text/html; charset=SHIFT_JIS``) (2.0)" 
    374377 
    375378    def publish(self, publisher): 
     
    410413        class type(xsc.TextAttr): 
    411414            """ 
    412             Designates number format of a list. <lit>1</lit> is numeric, <lit>A</lit> is capital Roman letters, 
    413             and <lit>a</lit> is lower-case Roman letters. (2.0) 
     415            Designates number format of a list. ``1`` is numeric, ``A`` is capital Roman letters, 
     416            and ``a`` is lower-case Roman letters. (2.0) 
    414417            """ 
    415418        class start(xsc.IntAttr): 
     
    445448class pre(xsc.Element): 
    446449    """ 
    447     Displays a source file exactly as entered, including line feeds and blank spaces. 
     450    Displays a source file exactly as entered, including line feeds and blank 
     451    spaces. 
    448452    """ 
    449453    xmlns = xmlns 
     
    466470        class name(xsc.TextAttr): 
    467471            """ 
    468             Designates the name of the field employed to pass the data, obtained using the 
    469             TEXTAREA tag, to a CGI script and others. (1.0) 
     472            Designates the name of the field employed to pass the data, obtained 
     473            using the TEXTAREA tag, to a CGI script and others. (1.0) 
    470474            """ 
    471475        class accesschar(xsc.TextAttr): 
  • src/ll/xist/ns/jsp.py

    r3166 r3180  
    1010 
    1111""" 
    12 <p>A module that allows you to embed &jsp; content as processing instructions.</p> 
     12A module that allows you to embed JSP content as processing instructions. 
    1313""" 
    1414 
     
    1919 
    2020 
    21 __docformat__ = "xist" 
     21__docformat__ = "reStructuredText" 
    2222 
    2323 
     
    4040class scriptlet(xsc.ProcInst): 
    4141    """ 
    42     will be published as <markup>&lt;% <rep>content</rep> %&gt;</markup> 
     42    Will be published as ``<% content %>``. 
    4343    """ 
    4444 
     
    5151class expression(xsc.ProcInst): 
    5252    """ 
    53     will be published as <markup>&lt;%= <rep>content</rep> %&gt;</markup> 
     53    Will be published as ``<%= content %>``. 
    5454    """ 
    5555 
     
    6262class declaration(xsc.ProcInst): 
    6363    """ 
    64     will be published as <markup>&lt;%! <rep>content</rep> %&gt;</markup> 
     64    Will be published as ``<%! content %>``. 
    6565    """ 
    6666 
     
    105105class block(xsc.Element): 
    106106    """ 
    107     <p>This element embeds its content in <lit>{}</lit> brackets.</p> 
    108     <p>Note that the content itself will not be turned into a scriptlet 
    109     automatically but will be used as-is.</p> 
     107    This element embeds its content in ``{}`` brackets. Note that the content 
     108    itself will not be turned into a scriptlet automatically but will be used 
     109    as-is. 
    110110    """ 
    111111    xmlns = xmlns 
  • src/ll/xist/ns/kid.py

    r3128 r3180  
    1010 
    1111""" 
    12 This module is an &xist; namespace for 
    13 <a href="http://kid.lesscode.org/">Kid</a> files. 
     12This module is an XIST namespace for Kid__ files. 
     13 
     14__ http://kid.lesscode.org/ 
    1415""" 
    1516 
     
    1819 
    1920 
    20 __docformat__ = "xist" 
     21__docformat__ = "reStructuredText" 
    2122 
    2223 
     
    3031    class for_(xsc.TextAttr): 
    3132        """ 
    32         The <class>for_</class> attribute may appear on any element to signify 
    33         that the element should be processed multiple times, once for each 
    34         value in the sequence specified. 
     33        The :class:`for_` attribute may appear on any element to signify that 
     34        the element should be processed multiple times, once for each value in 
     35        the sequence specified. 
    3536        """ 
    3637        xmlns = xmlns 
     
    3940    class if_(xsc.TextAttr): 
    4041        """ 
    41         The <class>if_</class> attribute may appear on any element to signify 
    42         that the element and its decendant items should be output only if the 
    43         boolean expression specified evaluates to true in Python. 
     42        The :class:`if_` attribute may appear on any element to signify that 
     43        the element and its decendant items should be output only if the boolean 
     44        expression specified evaluates to true in Python. 
    4445        """ 
    4546        xmlns = xmlns 
     
    5657    class replace(xsc.TextAttr): 
    5758        """ 
    58         <class>replace</class> is shorthand for specifying a 
    59         <class>content</class> and a <markup>strip="True"</markup> 
    60         on the same element. 
     59        :class:`replace` is shorthand for specifying a :class:`content` and a 
     60        ``strip="True"`` on the same element. 
    6161        """ 
    6262        xmlns = xmlns 
     
    6464    class strip(xsc.TextAttr): 
    6565        """ 
    66         The <class>strip</class> attribute may apppear on any element to 
    67         signify that the containing element should not be output. 
     66        The :class:`strip` attribute may apppear on any element to signify that 
     67        the containing element should not be output. 
    6868        """ 
    6969        xmlns = xmlns 
     
    7171    class attrs(xsc.TextAttr): 
    7272        """ 
    73         The <class>attrs</class> attribute may appear on any element to 
    74         specify a set of attributes that should be set on the element 
    75         when it is processed. 
     73        The :class:`attrs` attribute may appear on any element to specify a set 
     74        of attributes that should be set on the element when it is processed. 
    7675        """ 
    7776        xmlns = xmlns 
     
    7978    class def_(xsc.TextAttr): 
    8079        """ 
    81         The <class>def_</class> attribute may appear on any element to 
    82         create a <z>Named Template Function</z>. 
     80        The :class:`def_` attribute may appear on any element to create a 
     81        "Named Template Function". 
    8382        """ 
    8483        xmlns = xmlns 
     
    8786    class match(xsc.TextAttr): 
    8887        """ 
    89         The <class>match</class> attribute may appear on any element to 
    90         create a <z>Match Template</z>. 
     88        The :class:`match` attribute may appear on any element to create a 
     89        "Match Template". 
    9190        """ 
    9291        xmlns = xmlns 
     
    9493    class extends(xsc.TextAttr): 
    9594        """ 
    96         The <class>extends</class> attribute may appear on the root element 
    97         to specify that the template should inherit the Named Template Functions 
    98         and Match Templates defined in another template (or set of templates). 
     95        The :class:`extends` attribute may appear on the root element to specify 
     96        that the template should inherit the Named Template Functions and Match 
     97        Templates defined in another template (or set of templates). 
    9998        """ 
    10099        xmlns = xmlns 
     
    103102class python(xsc.ProcInst): 
    104103    """ 
    105     The <class>python</class> processing instruction contains Python code. 
     104    The :class:`python` processing instruction contains Python code. 
    106105    """ 
  • src/ll/xist/ns/meta.py

    r3128 r3180  
    1010 
    1111""" 
    12 <p>An &xist; module that contains elements that simplify 
    13 handling meta data. All elements in this module will generate a 
    14 <pyref module="ll.xist.ns.html" class="meta"><class>html.meta</class></pyref> 
    15 element when converted.</p> 
     12An XIST module that contains elements that simplify handling meta data. All 
     13elements in this module will generate a :class:`ll.xist.ns.html.meta` element 
     14when converted. 
    1615""" 
    1716 
     
    2120 
    2221 
    23 __docformat__ = "xist" 
     22__docformat__ = "reStructuredText" 
    2423 
    2524 
     
    2928class contenttype(html.meta): 
    3029    """ 
    31     <p>Can be used for a <markup>&lt;meta http-equiv="Content-Type" content="text/html"/&gt;</markup>, 
     30    Can be used for a ``<meta http-equiv="Content-Type" content="text/html"/>``, 
    3231    where the character set will be automatically inserted on a call to 
    33     <pyref module="ll.xist.xsc" class="Node" method="publish"><meth>publish</meth></pyref>.</p> 
     32    :meth:`ll.xist.xsc.None.publish`. 
    3433 
    35     <p>Usage is simple: <markup>&lt;meta:contenttype/&gt;</markup></p> 
     34    Usage is simple: ``meta.contenttype()``. 
    3635    """ 
    3736    xmlns = xmlns 
     
    6362class contentscripttype(html.meta): 
    6463    """ 
    65     <p>Can be used for a <markup>&lt;meta http-equiv="Content-Script-Type" content="..."/&gt;</markup>.</p> 
     64    Can be used for a ``<meta http-equiv="Content-Script-Type" content="..."/>``. 
    6665 
    67     <p>Usage is simple: <markup>&lt;meta:contentscripttype type="text/javascript"/&gt;</markup></p> 
     66    Usage is simple: ``<markup>meta.contentscripttype(type="text/javascript")``. 
    6867    """ 
    6968    xmlns = xmlns 
     
    8382class keywords(html.meta): 
    8483    """ 
    85     <p>Can be used for a <markup>&lt;meta name="keywords" content="..."/&gt;</markup>.</p> 
     84    Can be used for a ``<meta name="keywords" content="..."/>``. 
    8685 
    87     <p>Usage is simple: <markup>&lt;meta:keywords&gt;foo, bar&lt;/meta:keywords&gt;</markup></p> 
     86    Usage is simple: ``meta.keywords("foo, bar")``. 
    8887    """ 
    8988    xmlns = xmlns 
     
    103102class description(html.meta): 
    104103    """ 
    105     <p>Can be used for a <markup>&lt;meta name="description" content="..."/&gt;</markup>.</p> 
     104    Can be used for a ``<meta name="description" content="..."/>``. 
    106105 
    107     <p>Usage is simple: <markup>&lt;meta:description&gt;This page describes the ...&lt;/meta:description&gt;</markup></p> 
     106    Usage is simple: ``meta.description("This page describes the ...")``. 
    108107    """ 
    109108    xmlns = xmlns 
     
    123122class stylesheet(html.link): 
    124123    """ 
    125     <p>Can be used for a <markup>&lt;link rel="stylesheet" type="text/css" href="..."/&gt;</markup>.</p> 
     124    Can be used for a ``<link rel="stylesheet" type="text/css" href="..."/>``. 
    126125 
    127     <p>Usage is simple: <markup>&lt;meta:stylesheet href="root:stylesheets/main.css"/&gt;</markup></p> 
     126    Usage is simple: ``meta.stylesheet(href="root:stylesheets/main.css")``. 
    128127    """ 
    129128    xmlns = xmlns 
     
    139138class made(html.link): 
    140139    """ 
    141     <p>Can be used for a <markup>&lt;link rel="made" href="mailto:..."/&gt;</markup>.</p> 
     140    Can be used for a ``<link rel="made" href="mailto:..."/>``. 
    142141 
    143     <p>Usage is simple: <markup>&lt;meta:made href="foobert@bar.org"/&gt;</markup>.</p> 
     142    Usage is simple: ``meta.made(href="foobert@bar.org")``. 
    144143    """ 
    145144    xmlns = xmlns 
     
    154153class author(xsc.Element): 
    155154    """ 
    156     <p>Can be used to embed author information in the header. 
    157     It will generate <markup>&lt;link rel="made"/&gt;</markup> and 
    158     <markup>&lt;meta name="author"/&gt;</markup> elements.</p> 
     155    Can be used to embed author information in the header. It will generate 
     156    ``<link rel="made"/>`` and ``<meta name="author"/>`` elements. 
    159157    """ 
    160158    xmlns = xmlns 
     
    178176class refresh(xsc.Element): 
    179177    """ 
    180     <p>A refresh header.</p> 
     178    A refresh header. 
    181179    """ 
    182180    xmlns = xmlns 
  • src/ll/xist/ns/metal.py

    r3128 r3180  
    1010 
    1111""" 
    12 <p>An &xist; module that contains the global attributes from 
    13 <app>Zope</app>s <z>Macro Expansion Template Attribute Language</z>.</p> 
     12An XIST module that contains the global attributes from Zopes "Macro Expansion 
     13Template Attribute Language". 
    1414""" 
    1515 
     
    1818 
    1919 
    20 __docformat__ = "xist" 
     20__docformat__ = "reStructuredText" 
    2121 
    2222 
  • src/ll/xist/ns/php.py

    r3128 r3180  
    1010 
    1111""" 
    12 <p>A module that allows you to embed PHP processing instructions.</p> 
     12A module that allows you to embed PHP processing instructions. 
    1313""" 
    1414 
     
    1717 
    1818 
    19 __docformat__ = "xist" 
     19__docformat__ = "reStructuredText" 
    2020 
    2121 
     
    2525class php(xsc.ProcInst): 
    2626    """ 
    27     <p>&php; processing instruction 
    28     (must be used with an explicit target php to work with &xml;)</p> 
     27    PHP processing instruction (must be used with an explicit target php to work 
     28    with XML) 
    2929    """ 
    3030 
  • src/ll/xist/ns/rest.py

    r3172 r3180  
    1010 
    1111from __future__ import with_statement 
     12 
     13__docformat__ = "reStructuredText" 
    1214 
    1315import os, optparse, collections, contextlib 
  • src/ll/xist/ns/rng.py

    r3128 r3180  
    1010 
    1111""" 
    12 This module is an &xist; namespace for 
    13 <a href="http://relaxng.org/">Relax NG</a> files. 
     12This module is an XIST namespace for `Relax NG`__ files. 
     13 
     14__ http://relaxng.org/ 
    1415""" 
    1516 
     
    1819 
    1920 
    20 __docformat__ = "xist" 
     21__docformat__ = "reStructuredText" 
    2122 
    2223 
     
    2627class base(xsc.Element): 
    2728    """ 
    28     <z>Abstract</z> basis class, providing common attributes. 
     29    "Abstract" basis class, providing common attributes. 
    2930    """ 
    3031    register = False 
     
    4748class attribute(base): 
    4849    """ 
    49     Specifies an &xml; attribute. 
     50    Specifies an XML attribute. 
    5051    """ 
    5152    xmlns = xmlns 
     
    6263class choice(base): 
    6364    """ 
    64     nameclass: a name matches choice if, and only if, it matches at least one of the subname classes 
    65     pattern: it matches a node if, and only if, at least one of its subpatterns matches the node 
     65    nameclass: a name matches choice if, and only if, it matches at least one of 
     66    the subname classes. pattern: it matches a node if, and only if, at least 
     67    one of its subpatterns matches the node 
    6668    """ 
    6769    xmlns = xmlns 
     
    7981class define(base): 
    8082    """ 
    81     Defines a part of a grammar pattern (also a pattern), recursion possible only inside an element. 
     83    Defines a part of a grammar pattern (also a pattern), recursion possible 
     84    only inside an element. 
    8285    """ 
    8386    xmlns = xmlns 
     
    8992class div(base): 
    9093    """ 
    91     Allows logical divisions, no effect on validation, annotations can be made here 
     94    Allows logical divisions, no effect on validation, annotations can be made 
     95    here 
    9296    """ 
    9397    xmlns = xmlns 
     
    98102class element_(base): 
    99103    """ 
    100     Specifies an &xml; element. 
     104    Specifies an XML element. 
    101105    """ 
    102106    xmlns = xmlns 
     
    118122class except_(base): 
    119123    """ 
    120     An <class>except_</class> element can remove a name class from another 
    121     (this class has no attributes) (inside a <class>name</class> element) or 
    122     it is used to remove a set of values from a data pattern. 
     124    An :class:`except_` element can remove a name class from another (this class 
     125    has no attributes) (inside a :class:`name` element) or it is used to remove 
     126    a set of values from a data pattern. 
    123127    """ 
    124128    xmlns = xmlns 
     
    138142class grammar(base): 
    139143    """ 
    140     A <class>grammar</class> element has a single <class>start</class> child element, 
    141     and zero or more <class>define</class> child elements. The <class>start</class> 
    142     and <class>define</class> elements contain patterns. These patterns can 
    143     contain <class>ref</class> elements that refer to patterns defined by any of 
    144     the <class>define</class> elements in that grammar element. A <class>grammar</class> 
    145     pattern is matched by matching the pattern contained in the <class>start</class> element. 
     144    A :class:`grammar` element has a single :class:`start` child element, and 
     145    zero or more :class:`define` child elements. The :class:`start` and 
     146    :class:`define` elements contain patterns. These patterns can contain 
     147    :class:`ref` elements that refer to patterns defined by any of the 
     148    :class:`define` elements in that grammar element. A :class:`grammar` pattern 
     149    is matched by matching the pattern contained in the :class:`start` element. 
    146150    """ 
    147151    xmlns = xmlns 
     
    159163class include(base): 
    160164    """ 
    161     Includes an extern grammar pattern. 
    162     Can contain define parts to overwrite that part (same name) in the extern pattern. 
    163     A possible start element inside include overwrites the start element of the extern pattern. 
     165    Includes an extern grammar pattern. Can contain define parts to overwrite 
     166    that part (same name) in the extern pattern. A possible start element 
     167    inside include overwrites the start element of the extern pattern. 
    164168    """ 
    165169    xmlns = xmlns 
     
    185189class mixed(base): 
    186190    """ 
    187     <markup>&lt;mixed&gt; p &lt;/mixed&gt;</markup> is short for 
    188     <markup>&lt;interleave&gt; &lt;text/&gt; p &lt;/interleave&gt;</markup> 
     191    ``<mixed> p </mixed>`` is short for ``<interleave> <text/> p </interleave>`` 
    189192    """ 
    190193    xmlns = xmlns 
     
    233236class param(base): 
    234237    """ 
    235     Specifies parameters passed to the datatype library to determine whether a value is valid per a datatype. 
     238    Specifies parameters passed to the datatype library to determine whether a 
     239    value is valid per a datatype. 
    236240    """ 
    237241    xmlns = xmlns 
     
    243247class parentRef(base): 
    244248    """ 
    245     Escapes out of the current grammar and references a definition from the parent of the current grammar. 
     249    Escapes out of the current grammar and references a definition from the 
     250    parent of the current grammar. 
    246251    """ 
    247252    xmlns = xmlns 
     
    253258class ref(base): 
    254259    """ 
    255     A <class>ref</class> pattern refers to a definition from the nearest grammar ancestor. 
     260    A :class:`ref` pattern refers to a definition from the nearest grammar 
     261    ancestor. 
    256262    """ 
    257263    xmlns = xmlns 
     
    263269class start(base): 
    264270    """ 
    265     Required start tag inside a <class>grammar</class> tag. 
     271    Required start tag inside a :class:`grammar` tag. 
    266272    """ 
    267273    xmlns = xmlns 
     
    280286class value(base): 
    281287    """ 
    282     By default, the <class>value</class> pattern will consider the string in the pattern 
    283     to match the string in the document if the two strings are the same after 
    284     the whitespace in both strings is normalized. Whitespace normalization 
     288    By default, the :class:`value` pattern will consider the string in the 
     289    pattern to match the string in the document if the two strings are the same 
     290    after the whitespace in both strings is normalized. Whitespace normalization 
    285291    strips leading and trailing whitespace characters, and collapses sequences 
    286     of one or more whitespace characters to a single space character. 
    287     This corresponds to the behaviour of an &xml; parser for an attribute 
    288     that is declared as other than CDATA. 
     292    of one or more whitespace characters to a single space character. This 
     293    corresponds to the behaviour of an XML parser for an attribute that is 
     294    declared as other than CDATA. 
    289295    """ 
    290296    xmlns = xmlns 
  • src/ll/xist/ns/rss091.py

    r3109 r3180  
    1717 
    1818 
    19 __docformat__ = "xist" 
     19__docformat__ = "reStructuredText" 
    2020 
    2121 
     
    3434class channel(xsc.Element): 
    3535    """ 
    36     Information about a particular channel. Everything pertaining to an individual 
    37     channel is contained within this tag. 
     36    Information about a particular channel. Everything pertaining to an 
     37    individual channel is contained within this tag. 
    3838    """ 
    3939    xmlns = xmlns 
     
    5656class description(xsc.Element): 
    5757    """ 
    58     A plain text description of an <class>item</class>, <class>channel</class>, 
    59     <class>image</class>, or <class>textinput</class>. 
     58    A plain text description of an :class:`item`, :class:`channel`, 
     59    :class:`image`, or :class:`textinput`. 
    6060    """ 
    6161    xmlns = xmlns 
     
    6464class docs(xsc.Element): 
    6565    """ 
    66     This tag should contain a &url; that references a description of the channel. 
     66    This tag should contain a URL that references a description of the channel. 
    6767    """ 
    6868    xmlns = xmlns 
     
    7171class height(xsc.Element): 
    7272    """ 
    73     Specifies the height of an <pyref class="image"><class>image</class></pyref>. 
    74     Should be an integer value. 
     73    Specifies the height of an :class:`image`. Should be an integer value. 
    7574    """ 
    7675    xmlns = xmlns 
     
    8079    """ 
    8180    Specifies an hour of the day. Should be an integer value between 0 and 23. 
    82     See <pyref class="skipHours"><class>skipHours</class></pyref>. 
     81    See :class:`skipHours`. 
    8382    """ 
    8483    xmlns = xmlns 
     
    8786class image(xsc.Element): 
    8887    """ 
    89     Specifies an image associated with a 
    90     <pyref class="channel"><class>channel</class></pyref>. 
     88    Specifies an image associated with a :class:`channel` 
    9189    """ 
    9290    xmlns = xmlns 
     
    9593class item(xsc.Element): 
    9694    """ 
    97     An item that is associated with a <pyref class="channel"><class>channel</class></pyref>. 
    98     The item should represent a web-page, or subsection within a web page. 
    99     It should have a unique URL associated with it. Each item must contain a 
    100     <pyref class="title"><class>title</class></pyref> and a 
    101     <pyref class="link"><class>link</class></pyref>. A 
    102     <pyref class="description"><class>description</class></pyref> is optional. 
     95    An item that is associated with a :class:`channel`. The item should 
     96    represent a web-page, or subsection within a web page. It should have a 
     97    unique URL associated with it. Each item must contain a :class:`title` and a 
     98    :class:`link`. A :class:`description` is optional. 
    10399    """ 
    104100    xmlns = xmlns 
     
    122118    """ 
    123119    This is a url that a user is expected to click on, as opposed to a 
    124     <pyref class="url"><class>url</class></pyref> that is for loading a resource, 
    125     such as an image. 
     120    :class:`url` that is for loading a resource, such as an image. 
    126121    """ 
    127122    xmlns = xmlns 
     
    138133class name(xsc.Element): 
    139134    """ 
    140     The name of an object, corresponding to the <lit>name</lit> attribute of an 
    141     &html; <pyref module="ll.xist.ns.html" class="input"><class>input</class></pyref> element. 
    142     Currently, this only applies to <pyref class="textinput"><class>textinput</class></pyref>. 
     135    The name of an object, corresponding to the ``name`` attribute of an 
     136    HTML :class:`input` element. Currently, this only applies to 
     137    :class:`textinput`. 
    143138    """ 
    144139    xmlns = xmlns 
     
    173168class skipDays(xsc.Element): 
    174169    """ 
    175     A list of <pyref class="day"><class>day</class></pyref>s of the week, in English, 
    176     indicating the days of the week when your channel will not be updated. As 
    177     with <pyref class="activeHours"><class>activeHours</class></pyref>, if you 
    178     know your channel will never be updated on Saturday or Sunday, for example. 
     170    A list of :class:`day`\s of the week, in English, indicating the days of 
     171    the week when your channel will not be updated. As with :class:`activeHours`, 
     172    if you know your channel will never be updated on Saturday or Sunday, for 
     173    example. 
    179174    """ 
    180175    xmlns = xmlns 
     
    183178class skipHours(xsc.Element): 
    184179    """ 
    185     A list of <pyref class="hour"><class>hours</class></pyref> indicating the 
    186     hours in the day, GMT, when the channel is unlikely to be updated. If this 
    187     sub-item is omitted, the channel is assumed to be updated hourly. 
     180    A list of :class:`hour`\s indicating the hours in the day, GMT, when the 
     181    channel is unlikely to be updated. If this sub-item is omitted, the channel 
     182    is assumed to be updated hourly. 
    188183    """ 
    189184    xmlns = xmlns 
     
    200195class title(xsc.Element): 
    201196    """ 
    202     An identifying string for a resource. When used in an 
    203     <pyref class="item"><class>item</class></pyref>, this is the name of the item's 
    204     link. When used in an <pyref class="image"><class>image</class></pyref>, this 
    205     is the <z>alt</z> text for the image. When used in a 
    206     <pyref class="channel"><class>channel</class></pyref>, this is the channel's 
    207     title. When used in a <pyref class="textinput"><class>textinput</class></pyref>, 
    208     this is the the textinput's title. 
     197    An identifying string for a resource. When used in an :class:`item`, this is 
     198    the name of the item's link. When used in an :class:`image`, this is the 
     199    "alt" text for the image. When used in a :class:`channel`, this is the 
     200    channel's title. When used in a :class:`textinput`, this is the textinput's 
     201    title. 
    209202    """ 
    210203    xmlns = xmlns 
     
    214207    """ 
    215208    Location to load a resource from. Note that this is slightly different from 
    216     the <pyref class="link"><class>link</class></pyref> tag, which specifies where 
    217     a user should be re-directed to if a resource is selected. 
     209    the :class:`link` tag, which specifies where a user should be re-directed to 
     210    if a resource is selected. 
    218211    """ 
    219212    xmlns = xmlns 
     
    230223class width(xsc.Element): 
    231224    """ 
    232     Specifies the width of an <pyref class="image"><class>image</class></pyref>. 
    233     Should be an integer value. 
     225    Specifies the width of an :class:`image`. Should be an integer value. 
    234226    """ 
    235227    xmlns = xmlns 
  • src/ll/xist/ns/rss20.py

    r3109 r3180  
    1717 
    1818 
    19 __docformat__ = "xist" 
     19__docformat__ = "reStructuredText" 
    2020 
    2121 
     
    3737class channel(xsc.Element): 
    3838    """ 
    39     Information about a particular channel. Everything pertaining to an individual 
    40     channel is contained within this tag. 
     39    Information about a particular channel. Everything pertaining to an 
     40    individual channel is contained within this tag. 
    4141    """ 
    4242    xmlns = xmlns 
     
    4545class title(xsc.Element): 
    4646    """ 
    47     The name of the <pyref class="channel"><class>channel</class></pyref>, 
    48     <pyref class="item"><class>item</class></pyref>, 
    49     <pyref class="image"><class>image</class></pyref> or 
    50     <pyref class="textInput"><class>textInput</class></pyref>. 
     47    The name of the :class:`channel`, :class:`item`, :class:`image` or 
     48    :class:`textInput`. 
    5149    """ 
    5250    xmlns = xmlns 
     
    5553class link(xsc.Element): 
    5654    """ 
    57     The &url;to the &html; website corresponding to the 
    58     <pyref class="channel"><class>channel</class></pyref>, 
    59     <pyref class="item"><class>item</class></pyref> or 
    60     <pyref class="image"><class>image</class></pyref>. 
    61     Inside <pyref class="textInput"><class>textInput</class></pyref> element it's 
    62     the &url; of the CGI script that processes text input requests. 
     55    The URLto the HTML website corresponding to the :class:`channel`, 
     56    :class:`item` or :class:`image`. Inside :class:`textInput` element it's 
     57    the URL of the CGI script that processes text input requests. 
    6358    """ 
    6459    xmlns = xmlns 
     
    6762class description(xsc.Element): 
    6863    """ 
    69     Phrase or sentence describing the <pyref class="channel"><class>channel</class></pyref>, 
    70     <pyref class="item"><class>item</class></pyref> or 
    71     <pyref class="textInput"><class>textInput</class></pyref>. 
     64    Phrase or sentence describing the :class:`channel`, :class:`item` or 
     65    :class:`textInput`. 
    7266    """ 
    7367    xmlns = xmlns 
     
    155149class ttl(xsc.Element): 
    156150    """ 
    157     <class>ttl</class> stands for time to live. It's a number of minutes that 
    158     indicates how long a channel can be cached before refreshing from the source. 
     151    :class:`ttl` stands for time to live. It's a number of minutes that 
     152    indicates how long a channel can be cached before refreshing from the 
     153    source. 
    159154    """ 
    160155    xmlns = xmlns 
     
    177172class name(xsc.Element): 
    178173    """ 
    179     The name of the text object in the  
    180     <pyref class="textInput"><class>textInput</class></pyref> area. 
     174    The name of the text object in the  :class:`textInput` area. 
    181175    """ 
    182176    xmlns = xmlns 
     
    207201    """ 
    208202    Specifies an hour of the day. Should be an integer value between 0 and 23. 
    209     See <pyref class="skipHours"><class>skipHours</class></pyref>. 
     203    See :class:`skipHours`. 
    210204    """ 
    211205    xmlns = xmlns 
     
    235229class item(xsc.Element): 
    236230    """ 
    237     An item that is associated with a <pyref class="channel"><class>channel</class></pyref>. 
    238     The item should represent a web-page, or subsection within a web page. 
    239     It should have a unique &url; associated with it. Each item must contain a 
    240     <pyref class="title"><class>title</class></pyref> or 
    241     <pyref class="description"><class>description</class></pyref>. 
     231    An item that is associated with a :class:`channel`. The item should 
     232    represent a web-page, or subsection within a web page. It should have a 
     233    unique URL associated with it. Each item must contain a :class:`title` or 
     234    :class:`description`. 
    242235    """ 
    243236    xmlns = xmlns 
     
    246239class author(xsc.Element): 
    247240    """ 
    248     Author of an <pyref class="item"><class>item</class></pyref>. 
     241    Author of an :class:`item`. 
    249242    """ 
    250243    xmlns = xmlns 
     
    253246class comments(xsc.Element): 
    254247    """ 
    255     &url; of a page for comments relating to the item. 
     248    URL of a page for comments relating to the item. 
    256249    """ 
    257250    xmlns = xmlns 
  • src/ll/xist/ns/ruby.py

    r3128 r3180  
    1010 
    1111""" 
    12 <p>An &xist; module that contains definitions for all the elements in Ruby 1.0.</p> 
     12An XIST module that contains definitions for all the elements in Ruby 1.0. 
    1313""" 
    1414 
     
    1717 
    1818 
    19 __docformat__ = "xist" 
     19__docformat__ = "reStructuredText" 
    2020 
    2121 
     
    3434class rb(xsc.Element): 
    3535    """ 
    36     The <class>rb</class> element is the container for the text of the ruby base. 
     36    The :class:`rb` element is the container for the text of the ruby base. 
    3737    """ 
    3838    xmlns = xmlns 
     
    4242class rbc(xsc.Element): 
    4343    """ 
    44     The <class>rbc</class> (<z>ruby base component</z>) element is the container for <pyref class="rb"><class>rb</class></pyref> elements. 
     44    The :class:`rbc` (<z>ruby base component</z>) element is the container for <pyref class="rb">:class:`rb`</pyref> elements. 
    4545    """ 
    4646    xmlns = xmlns 
     
    5050class rp(xsc.Element): 
    5151    """ 
    52     The <class>rp</class> element is intended to contain parenthesis characters in simple ruby. 
     52    The :class:`rp` element is intended to contain parenthesis characters in 
     53    simple ruby. 
    5354    """ 
    5455    xmlns = xmlns 
     
    5859class rt(xsc.Element): 
    5960    """ 
    60     The <class>rt</class> element is the container for the ruby text. 
     61    The :class:`rt` element is the container for the ruby text. 
    6162    """ 
    6263    xmlns = xmlns 
     
    6869class rtc(xsc.Element): 
    6970    """ 
    70     The <class>rtc</class> (<z>ruby text component</z>) element is the container for <pyref class="rt"><class>rt</class></pyref> elements. 
     71    The :class:`rtc` ("ruby text component") element is the container for 
     72    :class:`rt` elements. 
    7173    """ 
    7274    xmlns = xmlns 
     
    7678class ruby(xsc.Element): 
    7779    """ 
    78     The <class>ruby</class> element is an inline (or text-level) element that serves as the 
    79     container for either the <pyref class="rb"><class>rb</class></pyref>, 
    80     <pyref class="rt"><class>rt</class></pyref> and optional 
    81     <pyref class="rp><class>rp</class></pyref> elements or the 
    82     <pyref class="rbc"><class>rbc</class></pyref> and <pyref class="irtc"><class>rtc</class></pyref> elements. 
     80    The :class:`ruby` element is an inline (or text-level) element that serves 
     81    as the container for either the :class:`rb`, :class:`rt` and optional 
     82    :class:`rp` elements or the :class:`rbc` and :class:`rtc` elements. 
    8383    """ 
    8484    xmlns = xmlns 
  • src/ll/xist/ns/specials.py

    r3128 r3180  
    1010 
    1111""" 
    12 <p>An &xist; module that contains a collection of useful elements that 
    13 can be used for all conversion target, because they only generate text.</p> 
     12An XIST module that contains a collection of useful elements that can be used 
     13for all conversion target, because they only generate text. 
    1414""" 
    1515 
     
    2121 
    2222 
    23 __docformat__ = "xist" 
     23__docformat__ = "reStructuredText" 
    2424 
    2525 
     
    2929class z(xsc.Element): 
    3030    """ 
    31     <p>Put the content into double quotes.</p> 
     31    Put the content into double quotes. 
    3232    """ 
    3333    xmlns = xmlns 
     
    4141class filesize(xsc.Element): 
    4242    """ 
    43     <p>the size (in bytes) of the file whose URL is the attribute href 
    44     as a text node.</p> 
     43    The size (in bytes) of the file whose URL is the attribute href as a 
     44    text node. 
    4545    """ 
    4646    xmlns = xmlns 
     
    5959class filetime(xsc.Element): 
    6060    """ 
    61     <p>the time of the last modification of the file whose &url; is in the attribute <lit>href</lit> 
    62     as a text node. This will always be an &utc; timestamp.</p> 
     61    The time of the last modification of the file whose URL is in the attribute 
     62    ``href`` as a text node. This will always be an UTC timestamp. 
    6363    """ 
    6464    xmlns = xmlns 
     
    6767        class href(xsc.URLAttr): 
    6868            """ 
    69             <p>The &url; of the file.</p> 
     69            The URL of the file. 
    7070            """ 
    7171            required = True 
     
    7373        class format(xsc.TextAttr): 
    7474            """ 
    75             <p>A <func>strftime</func> compatible formatstring for formatting the timestamp.</p> 
     75            A :func:`strftime` compatible formatstring for formatting the timestamp. 
    7676            """ 
    7777            default = u"%d. %b. %Y, %H:%M" 
     
    8484class time(xsc.Element): 
    8585    """ 
    86     <p>the current time (i.e. the time when <pyref method="convert"><meth>convert</meth></pyref> 
    87     is called). You can specify the format of the string in the attribute <lit>format</lit>, which is a 
    88     <func>strftime</func> compatible string.</p> 
     86    the current time (i.e. the time when :meth:`convert` is called). You can 
     87    specify the format of the string in the attribute ``format``, which is a 
     88    :func:`strftime` compatible string. 
    8989    """ 
    9090    xmlns = xmlns 
     
    9393        class format(xsc.TextAttr): 
    9494            """ 
    95             <p>A <func>strftime</func> compatible formatstring for formatting the timestamp.</p> 
     95            A :func:`strftime` compatible formatstring for formatting the timestamp. 
    9696            """ 
    9797            default = u"%d. %b. %Y, %H:%M" 
    9898        class utc(xsc.BoolAttr): 
    9999            """ 
    100             <p>Should &utc; be used or local time?</p> 
     100            Should UTC be used or local time? 
    101101            """ 
    102102 
     
    113113class ignore(xsc.Element): 
    114114    """ 
    115     <p>Element that will be ignored when converted.</p> 
    116  
    117     <p><class>ignore</class> can be used to comment out stuff. 
    118     The content of the element must of course still be wellformed.</p> 
     115    Element that will be ignored when converted. 
     116 
     117    :class:`ignore` can be used to comment out stuff. The content of the 
     118    element must of course still be wellformed. 
    119119    """ 
    120120    xmlns = xmlns 
     
    155155class wrap(xsc.Element): 
    156156    """ 
    157     <p>a wrapper element that returns its content when converted.</p> 
    158  
    159     <p>This is e.g. useful if you want to parse a 
    160     file that starts with <pyref module="ll.xist.ns.jsp"><mod>&jsp;</mod></pyref> 
    161     processing instructions.</p> 
     157    A wrapper element that returns its content when converted. 
     158 
     159    This is e.g. useful if you want to parse a file that starts with 
     160    :mod:`ll.xist.ns.jsp` processing instructions. 
    162161    """ 
    163162    xmlns = xmlns 
     
    194193class literal(xsc.ProcInst): 
    195194    """ 
    196     <class>literal</class> is a processing instruction that will output 
    197     its content literally when published. 
     195    :class:`literal` is a processing instruction that will output its content 
     196    literally when published. 
    198197    """ 
    199198    def publish(self, publisher): 
     
    203202class url(xsc.ProcInst): 
    204203    """ 
    205     <class>url</class> is a processing instruction containing an &url;. 
    206     On publishing it will be replaced by an &url; that is relative to the base 
    207     &url; of the publisher. 
     204    :class:`url` is a processing instruction containing an URL. On publishing 
     205    it will be replaced by an URL that is relative to the base URL of the 
     206    publisher. 
    208207    """ 
    209208    def parsed(self, parser, start=None): 
  • src/ll/xist/ns/struts_config.py

    r3164 r3180  
    1010 
    1111""" 
    12 <p>Namespace module for <a href="http://jakarta.apache.org/struts/">Struts</a> 
    13 configuration files: <a href="http://jakarta.apache.org/struts/dtds/struts-config_1_1.dtd">http://jakarta.apache.org/struts/dtds/struts-config_1_1.dtd</a>.</p> 
     12Namespace module for Struts__ configuration files:  
     13http://jakarta.apache.org/struts/dtds/struts-config_1_1.dtd. 
     14 
     15 
     16__ http://jakarta.apache.org/struts/ 
    1417""" 
    1518 
     
    1922 
    2023 
    21 __docformat__ = "xist" 
     24__docformat__ = "reStructuredText" 
    2225 
    2326 
  • src/ll/xist/ns/struts_html.py

    r3152 r3180  
    1010 
    1111""" 
    12 <p>A module that allows you to embed tags from 
    13 the <a href="http://jakarta.apache.org/struts/">Struts</a> 
    14 html custom tag library.</p> 
     12A module that allows you to embed tags from Struts__ html custom tag library. 
     13 
     14__ http://jakarta.apache.org/struts/ 
    1515""" 
    1616 
     
    1919 
    2020 
    21 __docformat__ = "xist" 
     21__docformat__ = "reStructuredText" 
    2222 
    2323 
     
    2727class taglib(xsc.ProcInst): 
    2828    """ 
    29     creates a standard struts taglib header 
     29    Creates a standard struts taglib header 
    3030    """ 
    3131    xmlns = xmlns 
     
    3939class Element(xsc.Element): 
    4040    """ 
    41     common base class for all the struts html elements 
     41    Common base class for all the struts html elements 
    4242    """ 
    4343    register = False 
     
    7373class MouseElement(PartMouseElement): 
    7474    """ 
    75     common base class for all the struts elements which have mouse attributes 
     75    Common base class for all the struts elements which have mouse attributes 
    7676    """ 
    7777    xmlns = xmlns 
     
    8484class base(Element): 
    8585    """ 
    86     document base URI 
     86    Document base URI 
    8787    """ 
    8888    xmlns = xmlns 
     
    9595class button(MouseElement): 
    9696    """ 
    97     a button 
     97    A button 
    9898    """ 
    9999    xmlns = xmlns 
     
    105105class cancel(MouseElement): 
    106106    """ 
    107     a cancel button 
     107    A cancel button 
    108108    """ 
    109109    xmlns = xmlns 
     
    113113class checkbox(MouseElement): 
    114114    """ 
    115     a html checkbox element 
     115    A html checkbox element 
    116116    """ 
    117117    xmlns = xmlns 
     
    124124class errors(Element): 
    125125    """ 
    126     displays error messages which have been generated from an action or a validation method 
     126    Displays error messages which have been generated from an action or a 
     127    validation method 
    127128    """ 
    128129    xmlns = xmlns 
     
    137138class file(MouseElement): 
    138139    """ 
    139     html input element of type file 
     140    HTML input element of type file 
    140141    """ 
    141142    xmlns = xmlns 
     
    151152class form(Element): 
    152153    """ 
    153     html form 
     154    HTML form 
    154155    """ 
    155156    xmlns = xmlns 
     
    299300class javascript(Element): 
    300301    """ 
    301     Render JavaScript validation based on the validation rules loaded by the ValidatorPlugIn. 
     302    Render JavaScript validation based on the validation rules loaded by the 
     303    ValidatorPlugIn. 
    302304    """ 
    303305    xmlns = xmlns 
  • src/ll/xist/ns/svg.py

    r3128 r3180  
    1111 
    1212""" 
    13 This is a namespace module implementing 
    14 <a href="http://www.w3.org/TR/SVG11/">&svg; 1.1</a>. 
     13This is a namespace module implementing `SVG 1.1`__. 
     14 
     15__ http://www.w3.org/TR/SVG11/ 
    1516""" 
    1617 
     
    1920 
    2021 
    21 __docformat__ = "xist" 
     22__docformat__ = "reStructuredText" 
    2223 
    2324 
  • src/ll/xist/ns/tal.py

    r3128 r3180  
    1010 
    1111""" 
    12 <p>An &xist; module that contains the global attributes from 
    13 <app>Zope</app>s <z>Template Attribute Language</z>.</p> 
     12An XIST module that contains the global attributes from Zopes 
     13"Template Attribute Language". 
    1414""" 
    1515 
     
    1818 
    1919 
    20 __docformat__ = "xist" 
     20__docformat__ = "reStructuredText" 
    2121 
    2222 
  • src/ll/xist/ns/tld.py

    r3131 r3180  
    1010 
    1111""" 
    12 <p>This is the &xist; namespace for the JavaServer Pages 1.1 Tag Library 
    13 descriptor (<lit>.tld</lit>) (&xml;) file format/syntax.</p> 
     12This is the XIST namespace for the JavaServer Pages 1.1 Tag Library 
     13descriptor (``.tld``) (XML) file format/syntax. 
    1414""" 
    1515 
     
    1919 
    2020 
    21 __docformat__ = "xist" 
     21__docformat__ = "reStructuredText" 
    2222 
    2323 
     
    3131class DocTypeTLD11(xsc.DocType): 
    3232    """ 
    33     <p>document type for tag library descriptors version 1.1</p> 
     33    Document type for tag library descriptors version 1.1 
    3434    """ 
    3535    def __init__(self): 
     
    3939class attribute(xsc.Element): 
    4040    """ 
    41     <p>The attribute tag defines an attribute for the nesting tag</p> 
    42     <p>An attribute definition is composed of:</p> 
    43     <ul> 
    44     <li>the attributes name (required)</li> 
    45     <li>if the attribute is required or optional (optional)</li> 
    46     <li>if the attributes value may be dynamically calculated at runtime by a 
    47     scriptlet expression (optional)</li> 
    48     </ul> 
     41    The attribute tag defines an attribute for the nesting tag. An attribute 
     42    definition is composed of: 
     43 
     44    *   the attributes name (required) 
     45 
     46    *   if the attribute is required or optional (optional) 
     47 
     48    *   if the attributes value may be dynamically calculated at runtime by a 
     49        scriptlet expression (optional) 
    4950    """ 
    5051    xmlns = xmlns 
     
    6970class bodycontent(xsc.Element): 
    7071    """ 
    71     <p>Provides a hint as to the content of the body of this tag. 
    72     Primarily intended for use by page composition tools.</p> 
    73  
    74     <p>There are currently three values specified:</p> 
    75     <ul> 
    76         <li><lit>tagdependent</lit>: The body of the tag is interpreted 
    77             by the tag implementation itself, and is most likely in a 
    78             different <z>language</z>, e.g embedded &sql; statements. 
    79         </li> 
    80         <li><lit>JSP</lit>: The body of the tag contains nested &jsp; syntax</li> 
    81         <li><lit>empty</lit>: The body must be empty</li> 
    82     </ul> 
    83     <p>The default (if not defined) is <lit>JSP</lit>.</p> 
    84     <p>Valid values: <lit>tagdependent</lit>, <lit>JSP</lit>, 
    85     <lit>empty</lit>.</p> 
     72    Provides a hint as to the content of the body of this tag. Primarily 
     73    intended for use by page composition tools. 
     74 
     75    There are currently three values specified: 
     76 
     77    ``tagdependent`` 
     78        The body of the tag is interpreted by the tag implementation itself, 
     79        and is most likely in a different "language", e.g embedded SQL statements. 
     80 
     81    ``JSP`` 
     82        The body of the tag contains nested JSP syntax. 
     83 
     84        ``empty`` 
     85            The body must be empty. 
     86 
     87    The default (if not defined) is ``JSP``. 
    8688    """ 
    8789    xmlns = xmlns 
     
    9193class info(xsc.Element): 
    9294    """ 
    93     <p>Defines an arbitrary text string describing the tag library.</p> 
     95    Defines an arbitrary text string describing the tag library. 
    9496    """ 
    9597    xmlns = xmlns 
     
    102104class jspversion(xsc.Element): 
    103105    """ 
    104     <p>Describes the &jsp; version (number) this taglibrary requires in 
    105     order to function (dewey decimal). The default is <lit>1.1</lit>.</p> 
     106    Describes the JSP version (number) this taglibrary requires in order to 
     107    function (dewey decimal). The default is ``1.1``. 
    106108    """ 
    107109    xmlns = xmlns 
     
    111113class name(xsc.Element): 
    112114    """ 
    113     <p>Defines the canonical name of a tag or attribute being defined.</p> 
     115    Defines the canonical name of a tag or attribute being defined. 
    114116    """ 
    115117    xmlns = xmlns 
     
    119121class required(xsc.Element): 
    120122    """ 
    121     <p>Defines if the nesting attribute is required or optional.</p> 
    122     <p>Valid values: <lit>true</lit>, <lit>false</lit>, <lit>yes</lit>, 
    123     <lit>no</lit>.</p> 
     123    Defines if the nesting attribute is required or optional. Valid value are 
     124    ``true``, ``false``, ``yes`` and ``no``. 
    124125    """ 
    125126    xmlns = xmlns 
     
    129130class rtexprvalue(xsc.Element): 
    130131    """ 
    131     <p>Defines if the nesting attribute can have scriptlet expressions as 
    132     a value, i.e the value of the attribute may be dynamically calculated 
    133     at request time, as opposed to a static value determined at translation 
    134     time.</p> 
    135     <p>Valid values: <lit>true</lit>, <lit>false</lit>, <lit>yes</lit>, 
    136     <lit>no</lit>.</p> 
     132    Defines if the nesting attribute can have scriptlet expressions as a value, 
     133    i.e the value of the attribute may be dynamically calculated at request 
     134    time, as opposed to a static value determined at translation time. Valid 
     135    value are ``true``, ``false``, ``yes`` and ``no``. 
    137136    """ 
    138137    xmlns = xmlns 
     
    142141class shortname(xsc.Element): 
    143142    """ 
    144     <p>Defines a short (default) shortname to be used for tags and 
    145     variable names used/created by this tag library.</p> 
     143    Defines a short (default) shortname to be used for tags and variable names 
     144    used/created by this tag library. 
    146145    """ 
    147146    xmlns = xmlns 
     
    151150class tag(xsc.Element): 
    152151    """ 
    153     <p>The tag defines a unique tag in this tag library, defining:</p> 
    154     <ul> 
    155         <li>the unique tag/element name</li> 
    156         <li>the subclass of <class>javax.servlet.jsp.tagext.Tag</class> implementation class</li> 
    157         <li>an optional subclass of <class>javax.servlet.jsp.tagext.TagExtraInfo</class></li> 
    158         <li>the body content type (hint)</li> 
    159         <li>optional tag-specific information</li> 
    160         <li>any attributes</li> 
    161     </ul> 
     152    The tag defines a unique tag in this tag library, defining: 
     153 
     154    *   the unique tag/element name 
     155 
     156    *   the subclass of :class:`javax.servlet.jsp.tagext.Tag` implementation class 
     157 
     158    *   an optional subclass of :class:`javax.servlet.jsp.tagext.TagExtraInfo` 
     159 
     160    *   the body content type (hint) 
     161 
     162    *   optional tag-specific information 
     163 
     164    *   any attributes 
    162165    """ 
    163166    xmlns = xmlns 
     
    190193class tagclass(xsc.Element): 
    191194    """ 
    192     <p>Defines the subclass of <class>javax.serlvet.jsp.tagext.Tag</class> 
    193     that implements the request time semantics for this tag.</p> 
    194     <p>The content has to be a fully qualified Java class name.</p> 
     195    Defines the subclass of :class:`javax.serlvet.jsp.tagext.Tag` that 
     196    implements the request time semantics for this tag. 
     197 
     198    The content has to be a fully qualified Java class name. 
    195199    """ 
    196200    xmlns = xmlns 
     
    200204class taglib(xsc.Element): 
    201205    """ 
    202     <p>The taglib tag is the document root, it defines:</p> 
    203     <ul> 
    204         <li><lit>tlibversion</lit>: The version of the tag library implementation</li> 
    205         <li><lit>jspversion</lit>: The version of JSP the tag library depends upon</li> 
    206         <li><lit>shortname</lit>: A simple default short name that could be used by 
    207                     a &jsp; authoring tool to create names with a mnemonic 
    208                     value; for example, the it may be used as the prefered 
    209                     prefix value in taglib directives. 
    210         </li> 
    211         <li><lit>uri</lit>: A &url; uniquely identifying this taglib</li> 
    212         <li><lit>info</lit>: A simple string describing the <z>use</z> of 
    213                 this taglib, should be user discernable 
    214         </li> 
    215     </ul> 
     206    The taglib tag is the document root, it defines: 
     207     
     208    ``tlibversion`` 
     209        The version of the tag library implementation 
     210 
     211    ``jspversion`` 
     212        The version of JSP the tag library depends upon 
     213 
     214    ``shortname`` 
     215        A simple default short name that could be used by a JSP authoring tool 
     216        to create names with a mnemonic value; for example, the it may be used 
     217        as the prefered prefix value in taglib directives. 
     218 
     219    ``uri`` 
     220        A URL uniquely identifying this taglib 
     221 
     222    ``info`` 
     223        A simple string describing the "use" of this taglib, should be user 
     224        discernable. 
    216225    """ 
    217226    xmlns = xmlns 
     
    235244class teiclass(xsc.Element): 
    236245    """ 
    237     <p>Defines the subclass of <class>javax.servlet.jsp.tagext.TagExtraInfo</class> 
    238     for this tag. If this is not given, the class is not consulted at 
    239     translation time.</p> 
    240     <p>The content has to be a fully qualified Java class name.</p> 
     246    Defines the subclass of :class:`javax.servlet.jsp.tagext.TagExtraInfo` for 
     247    this tag. If this is not given, the class is not consulted at translation 
     248    time. The content has to be a fully qualified Java class name. 
    241249    """ 
    242250    xmlns = xmlns 
     
    246254class tlibversion(xsc.Element): 
    247255    """ 
    248     <p>Describes this version (number) of the taglibrary (dewey decimal).</p> 
     256    Describes this version (number) of the taglibrary (dewey decimal). 
    249257    """ 
    250258    xmlns = xmlns 
     
    254262class uri(xsc.Element): 
    255263    """ 
    256     <p>Defines a public URI that uniquely identifies this version of 
    257     the taglibrary. Leave it empty if it does not apply.</p> 
     264    Defines a public URI that uniquely identifies this version of the taglibrary. 
     265    Leave it empty if it does not apply. 
    258266    """ 
    259267    xmlns = xmlns 
  • src/ll/xist/ns/wml.py

    r3128 r3180  
    1010 
    1111""" 
    12 <p>An &xist; namespace module that contains definitions for all the elements in &wml; 1.3.</p> 
     12An XIST namespace module that contains definitions for all the elements in 
     13WML 1.3. 
    1314""" 
    1415 
     
    1718 
    1819 
    19 __docformat__ = "xist" 
     20__docformat__ = "reStructuredText" 
    2021 
    2122 
     
    5960class card(xsc.Element): 
    6061    """ 
    61     defines and names a new card 
     62    Defines and names a new card 
    6263    """ 
    6364    xmlns = xmlns 
     
    7071class do(xsc.Element): 
    7172    """ 
    72     mechanism used to allow user actions within a card 
     73    Mechanism used to allow user actions within a card 
    7374    """ 
    7475    xmlns = xmlns 
     
    8283class onevent(xsc.Element): 
    8384    """ 
    84     specifies an action to be performed when specific events occur 
     85    Specifies an action to be performed when specific events occur 
    8586    """ 
    8687    xmlns = xmlns 
     
    9192class head(xsc.Element): 
    9293    """ 
    93     provides information for an entire deck 
     94    Provides information for an entire deck 
    9495    """ 
    9596    xmlns = xmlns 
     
    100101class template(xsc.Element): 
    101102    """ 
    102     specifies a template containing settings that will be used deck wide 
     103    Specifies a template containing settings that will be used deck wide 
    103104    """ 
    104105    xmlns = xmlns 
     
    109110class access(xsc.Element): 
    110111    """ 
    111     applies access-control rules to a deck effectively restricting referred access 
     112    Applies access-control rules to a deck effectively restricting referred access 
    112113    """ 
    113114    xmlns = xmlns 
     
    119120class meta(xsc.Element): 
    120121    """ 
    121     specifies deck-specific meta information within a <pyref class="head"><class>head</class></pyref> block 
     122    Specifies deck-specific meta information within a :class:`head` block 
    122123    """ 
    123124    xmlns = xmlns 
     
    132133class go(xsc.Element): 
    133134    """ 
    134     opens a specified URL using GET or POST methods 
     135    Opens a specified URL using GET or POST methods 
    135136    """ 
    136137    xmlns = xmlns 
     
    146147class prev(xsc.Element): 
    147148    """ 
    148     returns to the previous card 
     149    Returns to the previous card 
    149150    """ 
    150151    xmlns = xmlns 
     
    155156class refresh(xsc.Element): 
    156157    """ 
    157     refreshes (or resets) variables to initial or updated values 
     158    Refreshes (or resets) variables to initial or updated values 
    158159    """ 
    159160    xmlns = xmlns 
     
    164165class noop(xsc.Element): 
    165166    """ 
    166     does nothing (as in no operation) 
     167    Does nothing (as in no operation) 
    167168    """ 
    168169    xmlns = xmlns 
     
    173174class postfield(xsc.Element): 
    174175    """ 
    175     specifies a field and value to be sent to a URL 
     176    Specifies a field and value to be sent to a URL 
    176177    """ 
    177178    xmlns = xmlns 
     
    183184class setvar(xsc.Element): 
    184185    """ 
    185     sets a variable to a specified value 
     186    Sets a variable to a specified value 
    186187    """ 
    187188    xmlns = xmlns 
     
    193194class select(xsc.Element): 
    194195    """ 
    195     displays a list of options for user selection 
     196    Displays a list of options for user selection 
    196197    """ 
    197198    xmlns = xmlns 
     
    208209class optgroup(xsc.Element): 
    209210    """ 
    210     groups options together so that the browser can optimize the display appropriately 
     211    Groups options together so that the browser can optimize the display 
     212    appropriately 
    211213    """ 
    212214    xmlns = xmlns 
     
    217219class option(xsc.Element): 
    218220    """ 
    219     creates options within a <pyref class="select"><class>select</class></pyref> list 
     221    Creates options within a :class:`select` list 
    220222    """ 
    221223    xmlns = xmlns 
     
    228230class input(xsc.Element): 
    229231    """ 
    230     prompts for user input which will be saved to a variable 
     232    Prompts for user input which will be saved to a variable 
    231233    """ 
    232234    xmlns = xmlns 
     
    246248class fieldset(xsc.Element): 
    247249    """ 
    248     groups input field together so that the browser can optimize the display appropriately 
     250    Groups input field together so that the browser can optimize the display 
     251    appropriately 
    249252    """ 
    250253    xmlns = xmlns 
     
    255258class timer(xsc.Element): 
    256259    """ 
    257     invokes a timer after a specified amount of inactivity 
     260    Invokes a timer after a specified amount of inactivity 
    258261    """ 
    259262    xmlns = xmlns 
     
    265268class img(xsc.Element): 
    266269    """ 
    267     displays an image in the browser 
     270    Displays an image in the browser 
    268271    """ 
    269272    xmlns = xmlns 
     
    281284class anchor(xsc.Element): 
    282285    """ 
    283     creates an anchor (also called a link) associated with <pyref class="go"><class>go</class></pyref>, 
    284     <pyref class="prev"><class>prev</class></pyref> or <pyref class="refresh"><class>refresh</class></pyref> tasks. 
     286    Creates an anchor (also called a link) associated with :class:`go`, 
     287    :class:`prev` or :class:`refresh` tasks. 
    285288    """ 
    286289    xmlns = xmlns 
     
    292295class a(xsc.Element): 
    293296    """ 
    294     creates an anchor (also called a link) 
     297    Creates an anchor (also called a link) 
    295298    """ 
    296299    xmlns = xmlns 
     
    303306class table(xsc.Element): 
    304307    """ 
    305     creates a columnar table providing control over table alignment 
     308    Creates a columnar table providing control over table alignment 
    306309    """ 
    307310    xmlns = xmlns 
     
    314317class tr(xsc.Element): 
    315318    """ 
    316     creates rows within a table 
     319    Creates rows within a table 
    317320    """ 
    318321    xmlns = xmlns 
     
    323326class td(xsc.Element): 
    324327    """ 
    325     creates cells within table rows 
     328    Creates cells within table rows 
    326329    """ 
    327330    xmlns = xmlns 
     
    332335class em(xsc.Element): 
    333336    """ 
    334     displays all text between <markup>&lt;em&gt;</markup> and <markup>&lt;/em&gt;</markup> formatted with emphasis 
     337    Displays all text between ``<em>`` and ``</em>`` formatted with emphasis 
    335338    """ 
    336339    xmlns = xmlns 
     
    341344class strong(xsc.Element): 
    342345    """ 
    343     displays all text between <markup>&lt;strong&gt;</markup> and <markup>&lt;/strong&gt;</markup> formatted with strong emphasis 
     346    Displays all text between ``<strong>`` and ``</strong>`` formatted with 
     347    strong emphasis 
    344348    """ 
    345349    xmlns = xmlns 
     
    350354class b(xsc.Element): 
    351355    """ 
    352     displays all text between <markup>&lt;b&gt;</markup> and <markup>&lt;/b&gt;</markup> in bold text 
     356    Displays all text between ``<b>`` and ``</b>`` in bold text 
    353357    """ 
    354358    xmlns = xmlns 
     
    359363class i(xsc.Element): 
    360364    """ 
    361     displays all text between <markup>&lt;i&gt;</markup> and <markup>&lt;/i&gt;</markup> in italic text 
     365    ``Displays all text between ``<i>`` and ``</i>`` in italic text 
    362366    """ 
    363367    xmlns = xmlns 
     
    368372class u(xsc.Element): 
    369373    """ 
    370     displays all text between <markup>&lt;u&gt;</markup> and <markup>&lt;/u&gt;</markup> as underlined text 
     374    Displays all text between ``<u>`` and ``</u>`` as underlined text 
    371375    """ 
    372376    xmlns = xmlns 
     
    377381class big(xsc.Element): 
    378382    """ 
    379     displays all text between <markup>&lt;big&gt;</markup> and <markup>&lt;/big&gt;</markup> in a large font 
     383    Displays all text between ``<big>`` and ``</big>`` in a large font 
    380384    """ 
    381385    xmlns = xmlns 
     
    386390class small(xsc.Element): 
    387391    """ 
    388     displays all text between <markup>&lt;small&gt;</markup> and <markup>&lt;/small&gt;</markup> in a small font 
     392    Displays all text between ``<small>`` and ``</small>`` in a small font 
    389393    """ 
    390394    xmlns = xmlns 
     
    395399class p(xsc.Element): 
    396400    """ 
    397     creates a paragraph, establishing alignment and wrapping for all text within it 
     401    Creates a paragraph, establishing alignment and wrapping for all text 
     402    within it 
    398403    """ 
    399404    xmlns = xmlns 
     
    405410class br(xsc.Element): 
    406411    """ 
    407     forces a line break 
     412    Forces a line break 
    408413    """ 
    409414    xmlns = xmlns 
     
    414419class pre(xsc.Element): 
    415420    """ 
    416     preformatted text 
     421    Preformatted text 
    417422    """ 
    418423    xmlns = xmlns 
  • src/ll/xist/ns/xlink.py

    r3128 r3180  
    1010 
    1111""" 
    12 <p>Contains the global attributes for the xlink namespace 
    13 (<lit>http://www.w3.org/1999/xlink</lit>).</p> 
     12Contains the global attributes for the xlink namespace 
     13(``http://www.w3.org/1999/xlink``). 
    1414""" 
    1515 
     
    1818 
    1919 
    20 __docformat__ = "xist" 
     20__docformat__ = "reStructuredText" 
    2121 
    2222 
  • src/ll/xist/ns/xml.py

    r3128 r3180  
    1010 
    1111""" 
    12 <p>Contains the global attributes for the &xml; namespace (like <lit>xml:lang</lit>), 
    13 and classes for the &xml; declaration.</p> 
     12Contains the global attributes for the XML namespace (like ``xml:lang``), 
     13and classes for the XML declaration. 
    1414""" 
    1515 
     
    1818 
    1919 
    20 __docformat__ = "xist" 
     20__docformat__ = "reStructuredText" 
    2121 
    2222 
     
    3838class XML(xsc.ProcInst): 
    3939    """ 
    40     &xml; declaration. The encoding will be automatically set when publishing 
    41     (by the &xml; codec). 
     40    XML declaration. The encoding will be automatically set when publishing 
     41    (by the XML codec). 
    4242    """ 
    4343    xmlname = "xml" 
     
    5656class declaration(xsc.Element): 
    5757    """ 
    58     <p>The &xml; declaration as an element. This makes it possible to generate 
    59     a declaration from within an &xml; file. 
     58    The XML declaration as an element. This makes it possible to generate a 
     59    declaration from within an XML file. 
    6060    """ 
    6161    xmlns = xmlns 
  • src/ll/xist/options.py

    r3109 r3180  
    1010 
    1111""" 
    12 Contains everthing related to options in &xist; (apart for syntax highlighting 
     12Contains everthing related to options in XIST (apart for syntax highlighting 
    1313which can be found in presenters.py). 
    1414""" 
     
    1818 
    1919 
    20 __docformat__ = "xist" 
     20__docformat__ = "reStructuredText" 
    2121 
    2222 
  • src/ll/xist/parsers.py

    r3144 r3180  
    1010 
    1111""" 
    12 <p>This file contains everything you need to parse &xist; objects from files, 
    13 strings, &url;s etc.</p> 
     12This file contains everything you need to parse XIST objects from files, 
     13strings, URLs etc. 
    1414""" 
    1515 
     
    2626 
    2727 
    28 __docformat__ = "xist" 
     28__docformat__ = "reStructuredText" 
    2929 
    3030 
     
    226226class Builder(object): 
    227227    """ 
    228     <p>It is the job of a <class>Builder</class> to create the object tree from 
    229     the events generated by the underlying parser.</p> 
     228    It is the job of a :class:`Builder` to create the object tree from the 
     229    events generated by the underlying parser. 
    230230    """ 
    231231 
    232232    def __init__(self, parser=None, prefixes=None, tidy=False, loc=True, validate=True, encoding=None, pool=None): 
    233233        """ 
    234         <p>Create a new <class>Builder</class> instance.</p> 
    235  
    236         <p>Arguments have the following meaning:</p> 
    237         <dl> 
    238         <dt><arg>parser</arg></dt><dd>an instance of the 
    239         <pyref class="Parser"><class>Parser</class></pyref> class (or any object 
    240         that provides the appropriate interface).</dd> 
    241  
    242         <dt><arg>prefixes</arg></dt><dd>a mapping that maps namespace 
    243         prefixes to namespace names/modules) (or lists of namespace names/modules). 
    244         This is used to preinitialize the namespace prefix mapping.</dd> 
    245  
    246         <dt><arg>tidy</arg></dt><dd>If <arg>tidy</arg> is true, 
    247         <a href="http://xmlsoft.org/">libxml2</a>'s &html; parser will be 
    248         used for parsing broken &html;.</dd> 
    249  
    250         <dt><arg>loc</arg></dt><dd>Should location information be attached 
    251         to the generated nodes?</dd> 
    252  
    253         <dt><arg>validate</arg></dt><dd>Should the parsed &xml; nodes be 
    254         validated after parsing?</dd> 
    255  
    256         <dt><arg>encoding</arg></dt><dd>The default encoding to use, when the 
    257         source doesn't provide an encoding. The default <lit>None</lit> results in 
    258         the encoding being detected from the &xml; itself.</dd> 
    259  
    260         <dt><arg>pool</arg></dt><dd>A <pyref module="ll.xist.xsc" class="Pool"><class>ll.xist.xsc.Pool</class></pyref> 
    261         object which will be used for instantiating all nodes during parsing.</dd> 
    262         </dl> 
     234        Create a new :class:`Builder` instance. 
     235 
     236        Arguments have the following meaning: 
     237 
     238        :var:`parser` 
     239            an instance of the :class:`Parser` class (or any object that provides 
     240            the appropriate interface). 
     241 
     242        :var:`prefixes` : mapping 
     243            a mapping that maps namespace prefixes to namespace names/modules) 
     244            (or lists of namespace names/modules). This is used to preinitialize 
     245            the namespace prefix mapping. 
     246 
     247        :var:`tidy` : bool 
     248            If :var:`tidy` is true, libxml2__'s HTML parser will be used for 
     249            parsing broken HTML. 
     250 
     251            __ http://xmlsoft.org/ 
     252 
     253        :var:`loc` : bool 
     254            Should location information be attached to the generated nodes? 
     255 
     256        :var:`validate` : bool 
     257            Should the parsed XML nodes be validated after parsing? 
     258 
     259        :var:`encoding` : string or :const:`None` 
     260            The default encoding to use, when the source doesn't provide an 
     261            encoding. The default :const:`None` results in the encoding being 
     262            detected from the XML itself. 
     263 
     264        :var:`pool` : :class:`ll.xist.xsc.Pool` object 
     265            This pool will be used for creates all nodes during parsing. 
    263266        """ 
    264267        self.parser = parser 
     
    291294    def _parseHTML(self, data, base, sysid, encoding): 
    292295        """ 
    293         Internal helper method for parsing &html; via <mod>libxml2</mod>. 
     296        Internal helper method for parsing HTML via :mod:`libxml2`. 
    294297        """ 
    295298        import libxml2 # This requires libxml2 (see http://www.xmlsoft.org/) 
     
    389392    def parsestring(self, data, base=None, encoding=None): 
    390393        """ 
    391         Parse the string <arg>data</arg> (<class>str</class> or <class>unicode</class>) 
    392         into an &xist; tree. <arg>base</arg> is the base &url; for the parsing 
    393         process, <arg>encoding</arg> can be used to force the parser to use the 
    394         specified encoding. 
     394        Parse the string :var:`data` (:class:`str` or :class:`unicode`) into an 
     395        XIST tree. :var:`base` is the base URL for the parsing process, 
     396        :var:`encoding` can be used to force the parser to use the specified 
     397        encoding. 
    395398        """ 
    396399        self.url = url.URL(base if base is not None else "STRING") 
     
    406409    def parseiter(self, iterable, base=None, encoding=None): 
    407410        """ 
    408         Parse the input from the iterable <arg>iterable<arg> (which must produce 
    409         the input in chunks of bytes) into an &xist; tree. <arg>base</arg> is the 
    410         base &url; for the parsing process, <arg>encoding</arg> can be used to 
     411        Parse the input from the iterable :var:`iterable:var:` (which must 
     412        produce the input in chunks of bytes) into an XIST tree. :var:`base` is 
     413        the base URL for the parsing process, :var:`encoding` can be used to 
    411414        force the parser to use the specified encoding. 
    412415        """ 
     
    422425    def parsestream(self, stream, base=None, encoding=None, bufsize=8192): 
    423426        """ 
    424         Parse &xml; input from the stream <arg>stream</arg>. <arg>base</arg> is 
    425         the base &url; for the parsing process, <arg>encoding</arg> can be used 
    426         to force the parser to use the specified encoding. <arg>bufsize</arg> is 
    427         the buffer size used from reading the stream in blocks. 
     427        Parse XML input from the stream :var:`stream`. :var:`base` is the base 
     428        URL for the parsing process, :var:`encoding` can be used to force the 
     429        parser to use the specified encoding. :var:`bufsize` is the buffer size 
     430        used from reading the stream in blocks. 
    428431        """ 
    429432        self.url = url.URL(base if base is not None else "STREAM") 
     
    440443    def parsefile(self, filename, base=None, encoding=None, bufsize=8192): 
    441444        """ 
    442         Parse &xml; input from the file named <arg>filename</arg>. <arg>base</arg> 
    443         is the base &url; for the parsing process (defaulting to <arg>filename</arg> 
    444         if not specified), <arg>encoding</arg> can be used to force the parser to 
    445         use the specified encoding. <arg>bufsize</arg> is the buffer size used 
    446         from reading the stream in blocks. 
     445        Parse XML input from the file named :var:`filename`. :var:`base` is the 
     446        base URL for the parsing process (defaulting to :var:`filename` if not 
     447        specified), :var:`encoding` can be used to force the parser to use the 
     448        specified encoding. :var:`bufsize` is the buffer size used from reading 
     449        the stream in blocks. 
    447450        """ 
    448451        self.url = url.File(filename) 
     
    463466    def parseurl(self, name, base=None, encoding=None, bufsize=8192, *args, **kwargs): 
    464467        """ 
    465         Parse &xml; input from the &url; <arg>name</arg> which might be a string 
    466         or an <pyref module="ll.url" class="URL"><class>URL</class></pyref> object 
    467         into an &xist; tree. <arg>base</arg> is the base &url; for the parsing process 
    468         (defaulting to the final &url; of the response (i.e. including redirects)). 
    469         <arg>encoding</arg> can be used to force the parser to use the specified 
    470         encoding. <arg>bufsize</arg> is the buffer size used from reading the 
    471         response in blocks <arg>*args</arg> and <arg>**kwargs</arg> will be passed 
    472         on to the <meth>open</meth> call. 
     468        Parse XML input from the URL :var:`name` (which might be a string 
     469        or an :class:`ll.url.URL` object) into an XIST tree. :var:`base` is the 
     470        base URL for the parsing process (defaulting to the final URL of the 
     471        response (i.e. including redirects)). :var:`encoding` can be used to 
     472        force the parser to use the specified encoding. :var:`bufsize` is the 
     473        buffer size used from reading the response in blocks :var:`args` and 
     474        :var:`kwargs` will be passed on to the :meth:`open` call. 
    473475        """ 
    474476        name = url.URL(name) 
     
    489491    def parseetree(self, tree, base=None): 
    490492        """ 
    491         Parse &xml; input from the object <arg>tree</arg> which must support the 
    492         <a href="http://effbot.org/zone/element-index.htm">ElementTree</a> 
    493         &api;. <arg>base</arg> is the base &url; for the parsing process 
    494         (i.e. this &url; will be prepended to all links in the tree). 
     493        Parse XML input from the object :var:`tree` which must support the 
     494        ElementTree__ API. :var:`base` is the base URL for the parsing process 
     495        (i.e. this URL will be prepended to all links in the tree). 
     496         
     497        __ http://effbot.org/zone/element-index.htm 
    495498        """ 
    496499        def toxsc(node): 
     
    669672def parsestring(data, base=None, encoding=None, **builderargs): 
    670673    """ 
    671     Parse the string <arg>data</arg> into an &xist; tree. For the arguments 
    672     <arg>base</arg> and <arg>encoding</arg> see the method 
    673     <pyref class="Builder" method="parsestring"><meth>parsestring</meth></pyref> 
    674     in the <class>Builder</class> class. You can pass any other argument that the 
    675     <pyref class="Builder" method="__init__"><class>Builder</class> constructor</pyref> 
    676     takes as keyword arguments via <arg>builderargs</arg>. 
     674    Parse the string :var:`data` into an XIST tree. For the arguments 
     675    :var:`base` and :var:`encoding` see the method :meth:`parsestring` in the 
     676    :class:`Builder` class. You can pass any other argument that the 
     677    :class:`Builder` constructor takes as keyword arguments 
     678    via :var:`builderargs`. 
    677679    """ 
    678680    builder = Builder(**builderargs) 
     
    682684def parseiter(iterable, base=None, encoding=None, **builderargs): 
    683685    """ 
    684     Parse the input from the iterable <arg>iterable</arg> (which must produce the 
    685     input in chunks of bytes) into an &xist; tree. For the arguments <arg>base</arg> 
    686     and <arg>encoding</arg> see the method 
    687     <pyref class="Builder" method="parsestring"><meth>parsestring</meth></pyref> 
    688     in the <class>Builder</class> class. You can pass any other argument that the 
    689     <pyref class="Builder" method="__init__"><class>Builder</class> constructor</pyref> 
    690     takes as keyword arguments via <arg>builderargs</arg>. 
     686    Parse the input from the iterable :var:`iterable` (which must produce the 
     687    input in chunks of bytes) into an XIST tree. For the arguments :var:`base` 
     688    and :var:`encoding` see the method :meth:`parsestring` in the 
     689    :class:`Builder` class. You can pass any other argument that the 
     690    :class:`Builder` constructor takes as keyword arguments via 
     691    :var:`builderargs`. 
    691692    """ 
    692693    builder = Builder(**builderargs) 
     
    696697def parsestream(stream, base=None, encoding=None, bufsize=8192, **builderargs): 
    697698    """ 
    698     Parse &xml; from the stream <arg>stream</arg> into an &xist; tree. 
    699     For the arguments <arg>base</arg>, <arg>encoding</arg> and <arg>bufzise</arg> 
    700     see the method <pyref class="Builder" method="parse"><meth>parse</meth></pyref> 
    701     in the <class>Parser</class> class. You can pass any other argument that the 
    702     <pyref class="Builder" method="__init__"><class>Builder</class> constructor</pyref> 
    703     takes as keyword arguments via <arg>builderargs</arg>. 
     699    Parse XML from the stream :var:`stream` into an XIST tree. For the arguments 
     700    :var:`base`, :var:`encoding` and :var:`bufzise` see the method :meth:`parse` 
     701    in the :class:`Parser` class. You can pass any other argument that the 
     702    :class:`Builder` constructor takes as keyword arguments via 
     703    :var:`builderargs`. 
    704704    """ 
    705705    builder = Builder(**builderargs) 
     
    709709def parsefile(filename, base=None, encoding=None, bufsize=8192, **builderargs): 
    710710    """ 
    711     Parse &xml; input from the file named <arg>filename</arg>. For the arguments 
    712     <arg>base</arg>, <arg>encoding</arg> and <arg>bufsize</arg> see the method 
    713     <pyref class="Builder" method="parsefile"><meth>parsefile</meth></pyref> 
    714     in the <class>Builder</class> class. You can pass any other argument that the 
    715     <pyref class="Builder" method="__init__"><class>Builder</class> constructor</pyref> 
    716     takes as keyword arguments via <arg>builderargs</arg>. 
     711    Parse XML input from the file named :var:`filename`. For the arguments 
     712    :var:`base`, :var:`encoding` and :var:`bufsize` see the method 
     713    :meth:`parsefile` in the :class:`Builder` class. You can pass any other 
     714    argument that the :class:`Builder` constructor takes as keyword arguments 
     715    via :var:`builderargs`. 
    717716    """ 
    718717    builder = Builder(**builderargs) 
     
    722721def parseurl(name, base=None, encoding=None, bufsize=8192, headers=None, data=None, **builderargs): 
    723722    """ 
    724     Parse &xml; input from the &url; <arg>name</arg> into an &xist; tree. 
    725     For the arguments <arg>base</arg>, <arg>encoding</arg>, <arg>bufsize</arg>, 
    726     <arg>headers</arg> and <arg>data</arg> see the method 
    727     <pyref class="Builder" method="parseurl"><meth>parseurl</meth></pyref> 
    728     in the <class>Builder</class> class. You can pass any other argument that the 
    729     <pyref class="Builder" method="__init__"><class>Builder</class> constructor</pyref> 
    730     takes as keyword arguments via <arg>builderargs</arg>. 
     723    Parse XML input from the URL :var:`name` into an XIST tree. For the arguments 
     724    :var:`base`, :var:`encoding`, :var:`bufsize`, :var:`headers` and :var:`data` 
     725    see the method :meth:`parseurl` in the :class:`Builder` class. You can pass 
     726    any other argument that the :class:`Builder` constructor takes as keyword 
     727    arguments via :var:`builderargs`. 
    731728    """ 
    732729    builder = Builder(**builderargs) 
     
    736733def parseetree(tree, base=None, **builderargs): 
    737734    """ 
    738     Parse &xml; input from the object <arg>tree</arg> which must support the 
    739     <a href="http://effbot.org/zone/element-index.htm">ElementTree</a> 
    740     &api;. For the argument <arg>base</arg> see the method 
    741     <pyref class="Builder" method="parseetree"><meth>parseetree</meth></pyref> 
    742     in the <class>Builder</class> class. You can pass any other argument that the 
    743     <pyref class="Builder" method="__init__"><class>Builder</class> constructor</pyref> 
    744     takes as keyword arguments via <arg>builderargs</arg>. 
     735    Parse XML input from the object :var:`tree` which must support the 
     736    ElementTree__ API. For the argument :var:`base` see the method 
     737    :meth:`parseetree` in the :class:`Builder` class. You can pass any other 
     738    argument that the :class:`Builder` constructor takes as keyword arguments 
     739    via :var:`builderargs`. 
     740 
     741    __ http://effbot.org/zone/element-index.htm 
    745742    """ 
    746743    builder = Builder(**builderargs) 
  • src/ll/xist/presenters.py

    r3162 r3180  
    1010 
    1111""" 
    12 This module contains presenter classes, which are used for displaying &xist; 
    13 nodes on screen (either on the terminal or via 
    14 <pyref module="IPython.Extensions.ipipe"><mod>ipipe</mod></pyref> browsers). 
     12This module contains presenter classes, which are used for displaying XIST 
     13nodes on screen (either on the terminal or via :mod:`ipipe` browsers). 
    1514""" 
     15 
     16 
     17__docformat__ = "reStructuredText" 
    1618 
    1719 
     
    3032 
    3133 
    32 __docformat__ = "xist" 
     34__docformat__ = "reStructuredText" 
    3335 
    3436 
     
    169171class Presenter(table): 
    170172    """ 
    171     <p>This class is the base of the presenter classes. It is abstract 
    172     and only serves as documentation for the methods.</p> 
    173     <p>A <class>Presenter</class> generates a specific 
    174     string representation of a node to be printed on the screen.</p> 
     173    This class is the base of the presenter classes. It is abstract and only 
     174    serves as documentation for the methods. 
     175 
     176    A :class:`Presenter` generates a specific string representation of a node 
     177    to be printed on the screen. 
    175178    """ 
    176179 
     
    181184    def presentText(self, node): 
    182185        """ 
    183         <p>present a <pyref module="ll.xist.xsc" class="Text"><class>Text</class></pyref> node.</p> 
     186        Present a :class:`ll.xist.xsc.Text` node. 
    184187        """ 
    185188 
     
    187190    def presentFrag(self, node): 
    188191        """ 
    189         <p>present a <pyref module="ll.xist.xsc" class="Frag"><class>Frag</class></pyref> node.</p> 
     192        Present a :class:`ll.xist.xsc.Frag` node. 
    190193        """ 
    191194 
     
    193196    def presentComment(self, node): 
    194197        """ 
    195         <p>present a <pyref module="ll.xist.xsc" class="Comment"><class>Comment</class></pyref> node.</p> 
     198        Present a :class:`ll.xist.xsc.Comment` node. 
    196199        """ 
    197200 
     
    199202    def presentDocType(self, node): 
    200203        """ 
    201         <p>present a <pyref module="ll.xist.xsc" class="DocType"><class>DocType</class></pyref> node.</p> 
     204        Present a :class:`ll.xist.xsc.DocType` node. 
    202205        """ 
    203206 
     
    205208    def presentProcInst(self, node): 
    206209        """ 
    207         <p>present a <pyref module="ll.xist.xsc" class="ProcInst"><class>ProcInst</class></pyref> node.</p> 
     210        Present a :class:`ll.xist.xsc.ProcInst` node. 
    208211        """ 
    209212 
     
    211214    def presentAttrs(self, node): 
    212215        """ 
    213         <p>present an <pyref module="ll.xist.xsc" class="Attrs"><class>Attrs</class></pyref> node.</p> 
     216        Present an :class:`ll.xist.xsc.Attrs` node. 
    214217        """ 
    215218 
     
    217220    def presentElement(self, node): 
    218221        """ 
    219         <p>present an <pyref module="ll.xist.xsc" class="Element"><class>Element</class></pyref> node.</p> 
     222        Present an :class:`ll.xist.xsc.Element` node. 
    220223        """ 
    221224 
     
    223226    def presentEntity(self, node): 
    224227        """ 
    225         <p>present a <pyref module="ll.xist.xsc" class="Entity"><class>Entity</class></pyref> node.</p> 
     228        Present a :class:`ll.xist.xsc.Entity` node. 
    226229        """ 
    227230 
     
    229232    def presentNull(self, node): 
    230233        """ 
    231         <p>present the <class>Null</class> node.</p> 
     234        Present the :data:`ll.xist.xsc.Null` node. 
    232235        """ 
    233236 
     
    235238    def presentAttr(self, node): 
    236239        """ 
    237         <p>present an <pyref module="ll.xist.xsc" class="Attr"><class>Attr</class></pyref> node.</p> 
     240        Present an :class:`ll.xist.xsc.Attr` node. 
    238241        """ 
    239242 
     
    516519class CodePresenter(Presenter): 
    517520    """ 
    518     <p>This presenter formats the object as a nested Python object tree.</p> 
    519  
    520     <p>This makes it possible to quickly convert &html;/&xml; files to &xist; 
    521     constructor calls.</p> 
     521    This presenter formats the object as a nested Python object tree. 
     522 
     523    This makes it possible to quickly convert HTML/XML files to XIST constructor 
     524    calls. 
    522525    """ 
    523526    def __init__(self, node, indent=None): 
     
    746749 
    747750 
    748 # used by the IPython displayhook below (set to None to disable) 
     751# used by the IPython displayhook below (set to :const:`None` to disable) 
    749752defaultpresenter = TreePresenter 
    750753 
  • src/ll/xist/publishers.py

    r3157 r3180  
    1010 
    1111""" 
    12 <p>This module contains classes that may be used as publishing 
    13 handlers in <pyref module="ll.xist.xsc" class="Node" method="publish"><meth>publish</meth></pyref>.</p> 
     12This module contains classes that may be used as publishing handlers in 
     13:meth:`ll.xist.xsc.None.publish`. 
    1414""" 
    1515 
     
    2323 
    2424 
    25 __docformat__ = "xist" 
     25__docformat__ = "reStructuredText" 
    2626 
    2727 
    2828def cssescapereplace(exc): 
    2929    """ 
    30     PEP 293 codec callback that escapes unencodable character for CSS output. 
     30    :pep:`293` codec callback that escapes unencodable character for CSS output. 
    3131    """ 
    3232    if not isinstance(exc, UnicodeEncodeError): 
     
    3838class Publisher(object): 
    3939    """ 
    40     A <class>Publisher</class> object is used for serializing an &xist; tree into 
    41     a byte sequence. 
     40    A :class:`Publisher` object is used for serializing an XIST tree into a byte 
     41    sequence. 
    4242    """ 
    4343 
    4444    def __init__(self, encoding=None, xhtml=1, validate=True, prefixes={}, prefixdefault=False, hidexmlns=()): 
    4545        """ 
    46         <p><arg>encoding</arg> specifies the encoding to be used for the byte sequence. 
    47         If <lit>None</lit> is used the encoding in the &xml; declaration will be 
    48         used. If there is none, UTF-8 will be used.</p> 
    49  
    50         <p>With the parameter <arg>xhtml</arg> you can specify if you want &html; output:</p> 
    51         <dl> 
    52         <dt>&html; (<lit><arg>xhtml</arg>==0</lit>)</dt> 
    53         <dd>Elements with a empty content model will be published as 
    54         <markup>&lt;foo&gt;</markup>.</dd> 
    55         <dt>&html; browser compatible &xml; (<lit><arg>xhtml</arg>==1</lit>)</dt> 
    56         <dd>Elements with an empty content model will be published as <markup>&lt;foo /&gt;</markup> 
    57         and others that just happen to be empty as <markup>&lt;foo&gt;&lt;/foo&gt;</markup>. This 
    58         is the default.</dd> 
    59         <dt>Pure &xml; (<lit><arg>xhtml</arg>==2</lit>)</dt> 
    60         <dd>All empty elements will be published as <markup>&lt;foo/&gt;</markup>.</dd> 
    61         </dl> 
    62  
    63         <p><arg>validate</arg> specifies whether validation should be done before 
    64         publishing.</p> 
    65  
    66         <p><arg>prefixes</arg> is a dictionary that specifies which namespace 
    67         prefixes should be used for publishing. Keys in the dictionary are either 
    68         namespace names or objects that have an <lit>xmlns</lit> attribute which 
    69         is the namespace name. Value can be:</p> 
    70  
    71         <dl> 
    72         <dt><lit>False</lit></dt> 
    73         <dd>Treat elements in this namespace as if they are not in any namespace 
    74         (if global attributes from this namespace are encountered, a prefix will 
    75         be used nonetheless).</dd> 
    76         <dt><lit>None</lit></dt> 
    77         <dd>Treat the namespace as the default namespaces (i.e. use unprefixed 
    78         element names). Global attributes will again result in a prefix.</dd> 
    79         <dt><lit>True</lit></dt> 
    80         <dd>The publisher uses a unique non-empty prefix for this namespace.</dd> 
    81         <dt>A string</dt> 
    82         <dd>Use this prefix for the namespace.</dd> 
    83         </dl> 
    84  
    85         <p>If an element or attribute is encountered whose namespace is not in 
    86         <arg>prefixes</arg> <arg>prefixdefault</arg> is used as the fallback.</p> 
    87  
    88         <p><arg>hidexmlns</arg> can be a list or set that contains namespace names 
    89         for which no <lit>xmlns</lit> attributes should be published. (This can be 
    90         used to hide the namespace declarations for e.g. Java taglibs.)</p> 
     46        Create a publisher. Arguments have the following meaning: 
     47 
     48        :var:`encoding` : string or :const:`None` 
     49            Specifies the encoding to be used for the byte sequence. If 
     50            :const:`None` is used the encoding in the XML declaration will be used. 
     51            If there is none, UTF-8 will be used. 
     52 
     53        :var:`xhtml` : int 
     54            With the parameter :var:`xhtml` you can specify if you want HTML 
     55            output: 
     56 
     57            HTML (``xhtml==0``) 
     58                Elements with a empty content model will be published as ``<foo>``. 
     59 
     60            HTML browser compatible XML (``xhtml==1``) 
     61                Elements with an empty content model will be published as ``<foo />`` 
     62                and others that just happen to be empty as ``<foo></foo>``. This is 
     63                the default. 
     64 
     65            Pure XML (``xhtml==2``) 
     66                All empty elements will be published as <foo/>. 
     67 
     68        :var:`validate` : bool 
     69            Specifies whether validation should be done before publishing. 
     70 
     71        :var:`prefixes` : mapping 
     72            A dictionary that specifies which namespace prefixes should be used 
     73            for publishing. Keys in the dictionary are either namespace names or 
     74            objects that have an ``xmlns`` attribute which is the namespace name. 
     75            Value can be: 
     76 
     77            :const:`False` 
     78                Treat elements in this namespace as if they are not in any 
     79                namespace (if global attributes from this namespace are encountered, 
     80                a prefix willbe used nonetheless). 
     81 
     82            :const:`None` 
     83                Treat the namespace as the default namespaces (i.e. use unprefixed 
     84                element names). Global attributes will again result in a prefix. 
     85 
     86            :const:`True` 
     87                The publisher uses a unique non-empty prefix for this namespace. 
     88 
     89            A string 
     90                Use this prefix for the namespace. 
     91 
     92        :var:`prefixdefault` : string or :const:`None` 
     93            If an element or attribute is encountered whose namespace name is not 
     94            in :var:`prefixes` :var:`prefixdefault` is used as the fallback. 
     95 
     96        :var:`hidexmlns` : list or set 
     97            :var:`hidexmlns` can be a list or set that contains namespace names 
     98            for which no ``xmlns`` attributes should be published. (This can be 
     99            used to hide the namespace declarations for e.g. Java taglibs.) 
    91100        """ 
    92101        self.base = None 
     
    103112    def encode(self, text): 
    104113        """ 
    105         Encode <arg>text</arg> with the encoding and error handling currently 
     114        Encode :var:`text` with the encoding and error handling currently 
    106115        active and return the resulting byte string. 
    107116        """ 
     
    110119    def encodetext(self, text): 
    111120        """ 
    112         <p>Encode <arg>test</arg> as text data. <arg>text</arg> must 
    113         be a <class>unicode</class> object. The publisher will apply the configured 
    114         encoding, error handling and the current text filter (which escapes 
    115         characters that can't appear in text data (like <lit>&lt;</lit> etc.)) 
    116         and return the resulting <class>str</class> object. 
     121        Encode :var:`test` as text data. :var:`text` must be a :class:`unicode` 
     122        object. The publisher will apply the configured encoding, error handling 
     123        and the current text filter (which escapes characters that can't appear 
     124        in text data (like ````` etc.)) and return the resulting :class:`str` 
     125        object. 
    117126        """ 
    118127        self.encoder.errors = self.__errors[-1] 
     
    123132    def pushtextfilter(self, filter): 
    124133        """ 
    125         <p>pushes a new text filter function on the text filter stack. 
    126         This function is responsible for escaping characters that can't appear 
    127         in text data (like <lit>&lt;</lit>)). This is used to switch on escaping 
    128         of <lit>"</lit> inside attribute values.</p> 
     134        Pushes a new text filter function on the text filter stack. This function 
     135        is responsible for escaping characters that can't appear in text data 
     136        (like ``<``)). This is used to switch on escaping of ``"`` inside 
     137        attribute values. 
    129138        """ 
    130139        self.__textfilters.append(filter) 
     
    132141    def poptextfilter(self): 
    133142        """ 
    134         <p>pops the current text filter function from the stack.</p> 
     143        Pops the current text filter function from the stack. 
    135144        """ 
    136145        self.__textfilters.pop() 
     
    138147    def pusherrors(self, errors): 
    139148        """ 
    140         <p>pushes a new error handling scheme onto the error handling stack.</p> 
     149        Pushes a new error handling scheme onto the error handling stack. 
    141150        """ 
    142151        self.__errors.append(errors) 
     
    144153    def poperrors(self): 
    145154        """ 
    146         <p>pop the current error handling scheme from the error handling stack.</p> 
     155        Pop the current error handling scheme from the error handling stack. 
    147156        """ 
    148157        self.__errors.pop() 
     
    177186    def getprefix(self, object): 
    178187        """ 
    179         Can be used during publication by custom publish methods: Return the prefix 
    180         configured for object <arg>object</arg>. 
     188        Can be used during publication by custom publish methods: Return the 
     189        prefix configured for object :var:`object`. 
    181190        """ 
    182191        xmlns = getattr(object, "xmlns") 
     
    216225    def publish(self, node, base=None): 
    217226        """ 
    218         <p>publish the node <arg>node</arg>. This method is a generator that 
    219         will yield the resulting &xml; byte sequence in fragments.</p> 
     227        Publish the node :var:`node`. This method is a generator that will yield 
     228        the resulting XML byte sequence in fragments. 
    220229        """ 
    221230        self._ns2prefix.clear() 
  • src/ll/xist/scripts/doc2txt.py

    r3109 r3180  
    1616       to generate spam.txt from spam.xml 
    1717""" 
     18 
     19 
     20__docformat__ = "reStructuredText" 
    1821 
    1922 
  • src/ll/xist/scripts/dtd2xsc.py

    r3128 r3180  
    1111 
    1212""" 
    13 <p>Module that helps to create &xist; namespace modules from &dtd;s. 
    14 Needs <app>xmlproc</app> from the <app>PyXML</app> package. 
    15 For usage information type:</p> 
    16 <prog> 
    17 dtd2xsc --help 
    18 </prog> 
     13Module that helps to create XIST namespace modules from DTDs. Needs xmlproc__ 
     14 
     15__http://www.garshol.priv.no/download/software/xmlproc/ 
     16 
     17For usage information type:: 
     18 
     19    $ dtd2xsc --help 
     20 
    1921""" 
     22 
     23 
     24__docformat__ = "reStructuredText" 
    2025 
    2126 
     
    2833 
    2934 
    30 __docformat__ = "xist" 
     35__docformat__ = "reStructuredText" 
    3136 
    3237 
    3338def getxmlns(dtd): 
    3439    """ 
    35     Extract the value of all fixed <lit>xmlns</lit> attributes 
     40    Extract the value of all fixed ``xmlns`` attributes 
    3641    """ 
    3742    found = set() 
     
    4954def dtd2xnd(dtd, xmlns=None): 
    5055    """ 
    51     Convert &dtd; information from the &url; <arg>dtdurl</arg> to an &xist; &dom; 
    52     using the <pyref module="ll.xist.xnd"><mod>xnd</mod></pyref> functionality. 
     56    Convert DTD information from the URL :var:`dtdurl` to an XIST DOM using the 
     57    :mod:`ll.xist.xnd` functionality. 
    5358    """ 
    5459 
  • src/ll/xist/scripts/tld2xsc.py

    r3128 r3180  
    1111 
    1212""" 
    13 <p>Module that helps to create &xist; namespace modules from TLD files 
    14 (Java tag library descriptors). 
    15 For usage information type:</p> 
    16 <prog> 
    17 tld2xsc --help 
    18 </prog> 
     13Module that helps to create XIST namespace modules from TLD files (Java tag 
     14library descriptors). 
     15 
     16For usage information type:: 
     17 
     18    $ tld2xsc --help 
    1919""" 
     20 
     21__docformat__ = "reStructuredText" 
    2022 
    2123 
     
    2729 
    2830 
    29 __docformat__ = "xist" 
     31__docformat__ = "reStructuredText" 
    3032 
    3133 
  • src/ll/xist/scripts/xml2xsc.py

    r3109 r3180  
    1515 
    1616 
    17 __docformat__ = "xist" 
     17__docformat__ = "reStructuredText" 
    1818 
    1919 
  • src/ll/xist/sims.py

    r3109 r3180  
    1818 
    1919 
    20 __docformat__ = "xist" 
     20__docformat__ = "reStructuredText" 
    2121 
    2222 
     
    3030    """ 
    3131    Warning that is issued when an element has content, but it shouldn't 
    32     (i.e. <lit>model</lit> is <pyref class="Empty"><class>Empty</class></pyref>) 
     32    (i.e. :attr:`model` is :class:`Empty`) 
    3333    """ 
    3434 
     
    8888def badtext(node): 
    8989    """ 
    90     Return whether <arg>node</arg> is a text node (i.e. 
    91     <pyref module="ll.xist" class="Text"><class>Text</class></pyref> 
     90    Return whether :var:`node` is a text node (i.e. :class:`ll.xist.xsc.Text` 
    9291    that does not consist of whitespace only). 
    9392    """ 
     
    109108    def checkvalid(self, node): 
    110109        """ 
    111         check that the content of <arg>node</arg> is valid. 
     110        check that the content of :var:`node` is valid. 
    112111        """ 
    113112        if isinstance(node, xsc.Element): 
     
    118117class NoElements(object): 
    119118    """ 
    120     This validator checks that an element does not have child elements 
    121     from the same namespace. 
     119    This validator checks that an element does not have child elements from the 
     120    same namespace. 
    122121    """ 
    123122    empty = False 
     
    128127    def checkvalid(self, node): 
    129128        """ 
    130         check that the content of <arg>node</arg> is valid. 
     129        check that the content of :var:`node` is valid. 
    131130        """ 
    132131        if isinstance(node, xsc.Element): 
     
    148147    def checkvalid(self, node): 
    149148        """ 
    150         check that the content of <arg>node</arg> is valid. 
     149        check that the content of :var:`node` is valid. 
    151150        """ 
    152151        if isinstance(node, xsc.Element): 
     
    168167    def __init__(self, *elements): 
    169168        """ 
    170         Every element in <lit>elements</lit> may be in the content of the 
    171         node to which this validator is attached. Any other element from one 
    172         of the namespaces of those elements is invalid. Elements from other 
    173         namespaces are OK. 
     169        Every element in :var:`elements` may be in the content of the node to 
     170        which this validator is attached. Any other element from one of the 
     171        namespaces of those elements is invalid. Elements from other namespaces 
     172        are OK. 
    174173        """ 
    175174        self.elements = elements 
     
    180179    def checkvalid(self, node): 
    181180        """ 
    182         check that the content of <arg>node</arg> is valid. 
     181        check that the content of :var:`node` is valid. 
    183182        """ 
    184183        ns = None 
     
    196195class ElementsOrText(Elements): 
    197196    """ 
    198     This validator checks that an element doesn't have child elements 
    199     from the same namespace except those specified in the constructor. 
     197    This validator checks that an element doesn't have child elements from the 
     198    same namespace except those specified in the constructor. 
    200199    """ 
    201200 
    202201    def __init__(self, *elements): 
    203202        """ 
    204         Every element in <lit>elements</lit> may be in the content of the 
    205         node to which this validator is attached. Any other element from one 
    206         of the namespaces of those elements is invalid. Elements from other 
    207         namespaces are OK. 
     203        Every element in :var:`elements` may be in the content of the node to 
     204        which this validator is attached. Any other element from one of the 
     205        namespaces of those elements is invalid. Elements from other namespaces 
     206        are OK. 
    208207        """ 
    209208        self.elements = elements 
     
    214213    def checkvalid(self, node): 
    215214        """ 
    216         check that the content of <arg>node</arg> is valid. 
     215        Check that the content of :var:`node` is valid. 
    217216        """ 
    218217        ns = None 
     
    237236    def checkvalid(self, node): 
    238237        """ 
    239         Check that the content of <arg>node</arg> is valid. 
    240         This method does nothing as anything is valid. 
     238        Check that the content of :var:`node` is valid. This method does nothing 
     239        as anything is valid. 
    241240        """ 
    242241 
  • src/ll/xist/xfind.py

    r3128 r3180  
    1010 
    1111""" 
    12 <p>This module contains XFind and CSS selectors and related classes and functions.</p> 
    13  
    14 <p>A selector is a &xist; tree traversal filter that traverses the complete 
    15 &xml; tree and outputs those nodes specified by the selector. Selectors can 
    16 be combined with various operations and form a language comparable to 
    17 <a href="http://www.w3.org/TR/xpath">XPath</a> but implemented as Python 
    18 expressions.</p> 
     12This module contains XFind and CSS selectors and related classes and functions. 
     13 
     14A selector is a XIST tree traversal filter that traverses the complete XML tree 
     15and outputs those nodes specified by the selector. Selectors can be combined 
     16with various operations and form a language comparable to XPath__ but 
     17implemented as Python expressions. 
     18 
     19__ http://www.w3.org/TR/xpath 
    1920""" 
    2021 
     
    2425 
    2526 
    26 __docformat__ = "xist" 
     27__docformat__ = "reStructuredText" 
    2728 
    2829 
    2930class CSSWeight(tuple): 
    3031    """ 
    31     The specificity of a &css; selector as a 3-item tuple as specified by 
    32     <a href="http://www.w3.org/TR/css3-selectors/#specificity">CSS3</a>. 
     32    The specificity of a CSS selector as a 3-item tuple as specified by CSS3__. 
     33     
     34    __ http://www.w3.org/TR/css3-selectors/#specificity 
    3335    """ 
    3436 
     
    4749    Base class for all tree traversal filters that visit the complete tree. 
    4850    Whether a node gets output can be specified by overwriting the 
    49     <meth>matchpath</meth> method. Selectors can be combined with various 
    50     operations (see methods below). 
     51    :meth:`matchpath` method. Selectors can be combined with various operations 
     52    (see methods below). 
    5153    """ 
    5254 
     
    6062    def __div__(self, other): 
    6163        """ 
    62         Create a <pyref class="ChildCombinator"><class>ChildCombinator</class></pyref> 
    63         with <self/> as the left hand selector and <arg>other</arg> as the right 
    64         hand selector. 
     64        Create a :class:`ChildCombinator` with :var:`self` as the left hand 
     65        selector and :var:`other` as the right hand selector. 
    6566        """ 
    6667        return ChildCombinator(self, xsc.makewalkfilter(other)) 
     
    6869    def __floordiv__(self, other): 
    6970        """ 
    70         Create a <pyref class="DescendantCombinator"><class>DescendantCombinator</class></pyref> 
    71         with <self/> as the left hand selector and <arg>other</arg> as the right 
    72         hand selector. 
     71        Create a :class:`DescendantCombinator` with :var:`self` as the left hand 
     72        selector and :var:`other` as the right hand selector. 
    7373        """ 
    7474        return DescendantCombinator(self, xsc.makewalkfilter(other)) 
     
    7676    def __mul__(self, other): 
    7777        """ 
    78         Create an <pyref class="AdjacentSiblingCombinator"><class>AdjacentSiblingCombinator</class></pyref> 
    79         with <self/> as the left hand selector and <arg>other</arg> as the right 
    80         hand selector. 
     78        Create an :class:`AdjacentSiblingCombinator` with :var:`self` as the left 
     79        hand selector and :var:`other` as the right hand selector. 
    8180        """ 
    8281        return AdjacentSiblingCombinator(self, xsc.makewalkfilter(other)) 
     
    8483    def __pow__(self, other): 
    8584        """ 
    86         Create a <pyref class="GeneralSiblingCombinator"><class>GeneralSiblingCombinator</class></pyref> 
    87         with <self/> as the left hand selector and <arg>other</arg> as the right 
    88         hand selector. 
     85        Create a :class:`GeneralSiblingCombinator` with :var:`self` as the left 
     86        hand selector and :var:`other` as the right hand selector. 
    8987        """ 
    9088        return GeneralSiblingCombinator(self, xsc.makewalkfilter(other)) 
     
    9290    def __and__(self, other): 
    9391        """ 
    94         Create an <pyref class="AndCombinator"><class>AndCombinator</class></pyref> 
    95         from <self/> and <arg>other</arg>. 
     92        Create an :class:`AndCombinator` from :var:`self` and :var:`other`. 
    9693        """ 
    9794        return AndCombinator(self, xsc.makewalkfilter(other)) 
     
    9996    def __or__(self, other): 
    10097        """ 
    101         Create an <pyref class="OrCombinator"><class>OrCombinator</class></pyref> 
    102         from <self/> and <arg>other</arg>. 
     98        Create an :class:`OrCombinator` from :var:`self` and :var:`other`. 
    10399        """ 
    104100        return OrCombinator(self, xsc.makewalkfilter(other)) 
     
    106102    def __invert__(self): 
    107103        """ 
    108         Create a <pyref class="NotCombinator"><class>NotCombinator</class></pyref> 
    109         inverting <self/>. 
     104        Create a :class:`NotCombinator` inverting :var:`self`. 
    110105        """ 
    111106        return NotCombinator(self) 
     
    113108    def cssweight(self): 
    114109        """ 
    115         Return the &css; specificity of <self/> as a 
    116         <pyref class="CSSWeight"><class>CSSWeight</class></pyref> object. 
     110        Return the CSS specificity of :var:`self` as a :class:`CSSWeight` object. 
    117111        """ 
    118112        return CSSWeight() 
     
    121115class IsInstanceSelector(Selector): 
    122116    """ 
    123     <p>Selector that selects all nodes that are instances of the specified type. 
    124     You can either create an <class>IsInstanceSelector</class> object directly 
     117    Selector that selects all nodes that are instances of the specified type. 
     118    You can either create an :class:`IsInstanceSelector` object directly 
    125119    or simply pass a class to a function that expects a walk filter (this class 
    126     will be automatically wrapped in an <class>IsInstanceSelector</class>).</p> 
    127  
    128     <example> 
    129     <tty> 
    130     <prompt>>>> </prompt><input>from ll.xist import parsers, xfind</input> 
    131     <prompt>>>> </prompt><input>from ll.xist.ns import html</input> 
    132     <prompt>>>> </prompt><input>doc = parsers.parseurl("http://www.python.org", tidy=True)</input> 
    133     <prompt>>>> </prompt><input>for node in doc.walknode(<em>html.a</em>):</input> 
    134     <prompt>... </prompt><input>\tprint node.bytes()</input> 
    135     <prompt>... </prompt><input></input> 
    136     <![CDATA[<a id="logolink" accesskey="1" href="http://www.python.org/"><img src="http://www.python.org/images/python-logo.gif" id="logo" border="0" alt="homepage" /></a> 
    137     <a accesskey="2" href="http://www.python.org/#left%2dhand%2dnavigation"><img id="skiptonav" src="http://www.python.org/images/trans.gif" border="0" alt="skip to navigation" /></a> 
    138     <a accesskey="3" href="http://www.python.org/#content%2dbody"><img id="skiptocontent" src="http://www.python.org/images/trans.gif" border="0" alt="skip to content" /></a> 
    139     <a class="reference" href="http://www.python.org/search">Advanced Search</a> 
    140     <a title="About The Python Language" href="http://www.python.org/about/">About</a>]]> 
    141     <rep>...</rep> 
    142     </tty> 
    143     </example> 
     120    will be automatically wrapped in an :class:`IsInstanceSelector`):: 
     121 
     122        >>> from ll.xist import parsers, xfind 
     123        >>> from ll.xist.ns import html 
     124        >>> doc = parsers.parseurl("http://www.python.org", tidy=True) 
     125        >>> for node in doc.walknode(html.a): 
     126        ...     print node.bytes() 
     127        ...  
     128        <a id="logolink" accesskey="1" href="http://www.python.org/"><img src="http://www.python.org/images/python-logo.gif" id="logo" border="0" alt="homepage" /></a> 
     129        <a accesskey="2" href="http://www.python.org/#left%2dhand%2dnavigation"><img id="skiptonav" src="http://www.python.org/images/trans.gif" border="0" alt="skip to navigation" /></a> 
     130        <a accesskey="3" href="http://www.python.org/#content%2dbody"><img id="skiptocontent" src="http://www.python.org/images/trans.gif" border="0" alt="skip to content" /></a> 
     131        <a class="reference" href="http://www.python.org/search">Advanced Search</a> 
     132        <a title="About The Python Language" href="http://www.python.org/about/">About</a> 
     133        ... 
    144134    """ 
    145135    def __init__(self, *types): 
     
    161151    def __getitem__(self, index): 
    162152        """ 
    163         Return an <pyref class="nthoftype"><class>nthoftype</class></pyref> 
    164         selector that uses <arg>index</arg> as the index and <self/>s types 
    165         as the types. 
     153        Return an :class:`nthoftype` selector that uses :var:`index` as the 
     154        index and ``self.types`` as the types. 
    166155        """ 
    167156        return nthoftype(index, *self.types) 
     
    176165class hasname(Selector): 
    177166    """ 
    178     <p>Selector that selects all nodes that have a specified Python name (which 
     167    Selector that selects all nodes that have a specified Python name (which 
    179168    only selects elements, processing instructions and entities). Also a namespace 
    180169    name can be specified as a second argument, which will only select elements 
    181     from the specified namespace.</p> 
    182  
    183     <example> 
    184     <tty> 
    185     <prompt>>>> </prompt><input>from ll.xist import parsers, xfind</input> 
    186     <prompt>>>> </prompt><input>doc = parsers.parseurl("http://www.python.org", tidy=True)</input> 
    187     <prompt>>>> </prompt><input>for node in doc.walknode(<em>xfind.hasname("img")</em>):</input> 
    188     <prompt>... </prompt><input>\tprint node.bytes()</input> 
    189     <prompt>... </prompt><input></input> 
    190     <![CDATA[<img border="0" src="http://www.python.org/images/python-logo.gif" alt="homepage" id="logo" /> 
    191     <img border="0" id="skiptonav" alt="skip to navigation" src="http://www.python.org/images/trans.gif" /> 
    192     <img border="0" id="skiptocontent" alt="skip to content" src="http://www.python.org/images/trans.gif" /> 
    193     <img alt="success story photo" class="success" src="http://www.python.org/images/success/nasa.jpg" />]]> 
    194     </tty> 
    195     </example> 
     170    from the specified namespace:: 
     171 
     172        >>> from ll.xist import parsers, xfind 
     173        >>> doc = parsers.parseurl("http://www.python.org", tidy=True) 
     174        >>> for node in doc.walknode(xfind.hasname("img")): 
     175        ...     print node.bytes() 
     176        ...  
     177        <img border="0" src="http://www.python.org/images/python-logo.gif" alt="homepage" id="logo" /> 
     178        <img border="0" id="skiptonav" alt="skip to navigation" src="http://www.python.org/images/trans.gif" /> 
     179        <img border="0" id="skiptocontent" alt="skip to content" src="http://www.python.org/images/trans.gif" /> 
     180        <img alt="success story photo" class="success" src="http://www.python.org/images/success/nasa.jpg" /> 
    196181    """ 
    197182    def __init__(self, name, xmlns=None): 
     
    214199class hasname_xml(Selector): 
    215200    """ 
    216     <class>hasname_xml</class> works similar to <pyref class="hasname"><class>hasname</class></pyref> 
    217     except that the specified name is treated as the &xml; name, not the Python name. 
     201    :class:`hasname_xml` works similar to :class:`hasname` except that the 
     202    specified name is treated as the XML name, not the Python name. 
    218203    """ 
    219204    def __init__(self, name, xmlns=None): 
     
    236221class IsSelector(Selector): 
    237222    """ 
    238     <p>Selector that selects one specific node in the tree. This can be 
    239     combined with other selectors via <pyref class="ChildCombinator"><class>ChildCombinator</class>s</pyref> 
    240     or <pyref class="DescendantCombinator"><class>DescendantCombinator</class>s</pyref> 
    241     to select children of this specific node. You can either create an 
    242     <class>IsSelector</class> directly or simply pass a node to a function that 
    243     expects a walk filter.</p> 
    244  
    245     <example> 
    246     <tty> 
    247     <prompt>>>> </prompt><input>from ll.xist import parsers, xfind</input> 
    248     <prompt>>>> </prompt><input>doc = parsers.parseurl("http://www.python.org", tidy=True)</input> 
    249     <prompt>>>> </prompt><input>for node in doc.walknode(<em>doc[0]/xsc.Element</em>):</input> 
    250     <prompt>... </prompt><input>\tprint repr(node)</input> 
    251     <prompt>... </prompt><input></input> 
    252     <![CDATA[<ll.xist.ns.html.head element object (13 children/no attrs) (from http://www.python.org/:6:?) at 0xb6c82f4c> 
    253     <ll.xist.ns.html.body element object (19 children/no attrs) (from http://www.python.org/:26:?) at 0xb6c3154c>]]> 
    254     </tty> 
    255     </example> 
     223    Selector that selects one specific node in the tree. This can be combined 
     224    with other selectors via :class:`ChildCombinator` or 
     225    :class:`DescendantCombinator` selectors to select children of this specific 
     226    node. You can either create an :class:`IsSelector` directly or simply pass 
     227    a node to a function that expects a walk filter:: 
     228 
     229        >>> from ll.xist import parsers, xfind 
     230        >>> doc = parsers.parseurl("http://www.python.org", tidy=True) 
     231        >>> for node in doc.walknode(doc[0]/xsc.Element): 
     232        ...     print repr(node) 
     233        ...  
     234        <ll.xist.ns.html.head element object (13 children/no attrs) (from http://www.python.org/:6:?) at 0xb6c82f4c> 
     235        <ll.xist.ns.html.body element object (19 children/no attrs) (from http://www.python.org/:26:?) at 0xb6c3154c> 
    256236    """ 
    257237    def __init__(self, node): 
     
    278258class empty(Selector): 
    279259    """ 
    280     <p>Selector that selects all empty elements or fragments.</p> 
    281  
    282     <example> 
    283     <tty> 
    284     <prompt>>>> </prompt><input>from ll.xist import parsers, xfind</input> 
    285     <prompt>>>> </prompt><input>doc = parsers.parseurl("http://www.python.org", tidy=True)</input> 
    286     <prompt>>>> </prompt><input>for node in doc.walknode(<em>xfind.empty</em>):</input> 
    287     <prompt>... </prompt><input>\tprint node.bytes()</input> 
    288     <prompt>... </prompt><input></input> 
    289     <![CDATA[<meta content="text/html; charset=utf-8" http-equiv="content-type" /> 
    290     <meta content="python programming language object oriented web free source" name="keywords" /> 
    291     <meta content="      Home page for Python, an interpreted, interactive, object-oriented, extensible 
    292           programming language. It provides an extraordinary combination of clarity and 
    293           versatility, and is free and comprehensively ported. " name="description" /> 
    294     <a type="application/rss+xml" href="http://www.python.org/channews.rdf" rel="alternate" title="RSS" />]]> 
    295     <rep>...</rep> 
    296     </tty> 
    297     </example> 
     260    Selector that selects all empty elements or fragments:: 
     261 
     262        >>> from ll.xist import parsers, xfind 
     263        >>> doc = parsers.parseurl("http://www.python.org", tidy=True) 
     264        >>> for node in doc.walknode(xfind.empty): 
     265        ...     print node.bytes() 
     266        ...  
     267        <meta content="text/html; charset=utf-8" http-equiv="content-type" /> 
     268        <meta content="python programming language object oriented web free source" name="keywords" /> 
     269        <meta content="      Home page for Python, an interpreted, interactive, object-oriented, extensible 
     270              programming language. It provides an extraordinary combination of clarity and 
     271              versatility, and is free and comprehensively ported. " name="description" /> 
     272        <a type="application/rss+xml" href="http://www.python.org/channews.rdf" rel="alternate" title="RSS" /> 
     273        ... 
    298274    """ 
    299275 
     
    314290class onlychild(Selector): 
    315291    """ 
    316     <p>Selector that selects all node that are the only child of their parents.</p> 
    317  
    318     <example> 
    319     <tty> 
    320     <prompt>>>> </prompt><input>from ll.xist import parsers, xfind</input> 
    321     <prompt>>>> </prompt><input>doc = parsers.parseurl("http://www.python.org", tidy=True)</input> 
    322     <prompt>>>> </prompt><input>for node in doc.walknode(<em>xfind.onlychild &amp; html.a</em>):</input> 
    323     <prompt>... </prompt><input>\tprint node.bytes()</input> 
    324     <prompt>... </prompt><input></input> 
    325     <![CDATA[<a accesskey="2" href="http://www.python.org/#left%2dhand%2dnavigation"><img id="skiptonav" alt="skip to navigation" src="http://www.python.org/images/trans.gif" border="0" /></a> 
    326     <a accesskey="3" href="http://www.python.org/#content%2dbody"><img id="skiptocontent" alt="skip to content" src="http://www.python.org/images/trans.gif" border="0" /></a> 
    327     <a href="http://www.python.org/download/releases/2.5.1">Quick Links (2.5.1)</a> 
    328     <a title="Manuals for Latest Stable Release" href="http://docs.python.org/">Documentation</a>]]> 
    329     <rep>...</rep> 
    330     </tty> 
    331     </example> 
     292    Selector that selects all node that are the only child of their parents:: 
     293 
     294        >>> from ll.xist import parsers, xfind 
     295        >>> doc = parsers.parseurl("http://www.python.org", tidy=True) 
     296        >>> for node in doc.walknode(<em>xfind.onlychild & html.a</em>): 
     297        ...     print node.bytes() 
     298        ...  
     299        <a accesskey="2" href="http://www.python.org/#left%2dhand%2dnavigation"><img id="skiptonav" alt="skip to navigation" src="http://www.python.org/images/trans.gif" border="0" /></a> 
     300        <a accesskey="3" href="http://www.python.org/#content%2dbody"><img id="skiptocontent" alt="skip to content" src="http://www.python.org/images/trans.gif" border="0" /></a> 
     301        <a href="http://www.python.org/download/releases/2.5.1">Quick Links (2.5.1)</a> 
     302        <a title="Manuals for Latest Stable Release" href="http://docs.python.org/">Documentation</a> 
     303        ... 
    332304    """ 
    333305 
     
    348320class onlyoftype(Selector): 
    349321    """ 
    350     <p>Selector that selects all nodes that are the only nodes of their type among 
    351     their siblings.</p> 
    352  
    353     <example> 
    354     <tty> 
    355     <prompt>>>> </prompt><input>from ll.xist import parsers, xfind</input> 
    356     <prompt>>>> </prompt><input>doc = parsers.parseurl("http://www.python.org", tidy=True)</input> 
    357     <prompt>>>> </prompt><input>for node in doc.walknode(<em>xfind.onlyoftype &amp; xsc.Element</em>):</input> 
    358     <prompt>... </prompt><input>\tprint repr(node)</input> 
    359     <prompt>... </prompt><input></input> 
    360     <![CDATA[<ll.xist.ns.html.html element object (2 children/1 attr) (from http://www.python.org/:4:?) at 0xb6d6e7ec> 
    361     <ll.xist.ns.html.head element object (13 children/no attrs) (from http://www.python.org/:6:?) at 0xb6cc1f8c> 
    362     <ll.xist.ns.html.title element object (1 child/no attrs) (from http://www.python.org/:8:?) at 0xb6d79b8c> 
    363     <ll.xist.ns.html.body element object (19 children/no attrs) (from http://www.python.org/:26:?) at 0xb6d7282c>]]> 
    364     <rep>...</rep> 
    365     </tty> 
    366     </example> 
     322    Selector that selects all nodes that are the only nodes of their type among 
     323    their siblings:: 
     324 
     325        >>> from ll.xist import parsers, xfind 
     326        >>> doc = parsers.parseurl("http://www.python.org", tidy=True) 
     327        >>> for node in doc.walknode(xfind.onlyoftype & xsc.Element): 
     328        ...     print repr(node) 
     329        ...  
     330        <ll.xist.ns.html.html element object (2 children/1 attr) (from http://www.python.org/:4:?) at 0xb6d6e7ec> 
     331        <ll.xist.ns.html.head element object (13 children/no attrs) (from http://www.python.org/:6:?) at 0xb6cc1f8c> 
     332        <ll.xist.ns.html.title element object (1 child/no attrs) (from http://www.python.org/:8:?) at 0xb6d79b8c> 
     333        <ll.xist.ns.html.body element object (19 children/no attrs) (from http://www.python.org/:26:?) at 0xb6d7282c> 
     334        ... 
    367335    """ 
    368336 
     
    388356class hasattr(Selector): 
    389357    """ 
    390     <p>Selector that selects all element nodes that have an attribute with one 
     358    Selector that selects all element nodes that have an attribute with one 
    391359    of the specified Python names. For selecting nodes with global attributes 
    392     the attribute class can be passed.</p> 
    393  
    394     <example> 
    395     <tty> 
    396     <prompt>>>> </prompt><input>from ll.xist import parsers, xfind</input> 
    397     <prompt>>>> </prompt><input>from ll.xist.ns import html, xml</input> 
    398     <prompt>>>> </prompt><input>doc = parsers.parseurl("http://www.python.org", tidy=True)</input> 
    399     <prompt>>>> </prompt><input>for node in doc.walknode(<em>xfind.hasattr(xml.Attrs.lang)</em>):</input> 
    400     <prompt>... </prompt><input>\tprint repr(node)</input> 
    401     <prompt>... </prompt><input></input> 
    402     <![CDATA[<ll.xist.ns.html.html element object (2 children/2 attrs) (from http://www.python.org/:4:?) at 0xb6d71d4c>]]> 
    403     </tty> 
    404     </example> 
     360    the attribute class can be passed:: 
     361 
     362        >>> from ll.xist import parsers, xfind 
     363        >>> from ll.xist.ns import html, xml 
     364        >>> doc = parsers.parseurl("http://www.python.org", tidy=True) 
     365        >>> for node in doc.walknode(xfind.hasattr(xml.Attrs.lang)): 
     366        ...     print repr(node) 
     367        ...  
     368        <ll.xist.ns.html.html element object (2 children/2 attrs) (from http://www.python.org/:4:?) at 0xb6d71d4c> 
    405369    """ 
    406370 
     
    423387class hasattr_xml(Selector): 
    424388    """ 
    425     <class>hasattr_xml</class> works similar to <pyref class="hasattr"><class>hasattr</class></pyref> 
    426     except that the specified names are treated as &xml; names instead of Python names. 
     389    :class:`hasattr_xml` works similar to :class:`hasattr` except that the 
     390    specified names are treated as XML names instead of Python names. 
    427391    """ 
    428392 
     
    445409class attrhasvalue(Selector): 
    446410    """ 
    447     <p>Selector that selects all element nodes where an attribute with the 
    448     specified Python name has the specified value. For global attributes 
    449     the attribute class can be passed. Note that 
    450     <pyref module="ll.xist.xsc" class="Attr" method="isfancy">fancy</pyref> attributes 
    451     will not be considered.</p> 
    452  
    453     <example> 
    454     <tty> 
    455     <prompt>>>> </prompt><input>from ll.xist import parsers, xfind</input> 
    456     <prompt>>>> </prompt><input>doc = parsers.parseurl("http://www.python.org", tidy=True)</input> 
    457     <prompt>>>> </prompt><input>for node in doc.walknode(<em>xfind.attrhasvalue("rel", "stylesheet")</em>):</input> 
    458     <prompt>... </prompt><input>\tprint repr(node)</input> 
    459     <prompt>... </prompt><input></input> 
    460     <![CDATA[<a media="screen" type="text/css" href="http://www.python.org/styles/screen-switcher-default.css" rel="stylesheet" id="screen-switcher-stylesheet" /> 
    461     <a media="scReen" type="text/css" rel="stylesheet" href="http://www.python.org/styles/netscape4.css" /> 
    462     <a media="print" type="text/css" rel="stylesheet" href="http://www.python.org/styles/print.css" />]]> 
    463     </tty> 
    464     </example> 
     411    Selector that selects all element nodes where an attribute with the 
     412    specified Python name has the specified value. For global attributes the 
     413    attribute class can be passed. Note that "fancy" attributes (i.e. those 
     414    containing non-text) will not be considered:: 
     415 
     416        >>> from ll.xist import parsers, xfind 
     417        >>> doc = parsers.parseurl("http://www.python.org", tidy=True) 
     418        >>> for node in doc.walknode(xfind.attrhasvalue("rel", "stylesheet")): 
     419        ...     print repr(node) 
     420        ...  
     421        <a media="screen" type="text/css" href="http://www.python.org/styles/screen-switcher-default.css" rel="stylesheet" id="screen-switcher-stylesheet" /> 
     422        <a media="scReen" type="text/css" rel="stylesheet" href="http://www.python.org/styles/netscape4.css" /> 
     423        <a media="print" type="text/css" rel="stylesheet" href="http://www.python.org/styles/print.css" /> 
    465424    """ 
    466425 
     
    484443class attrhasvalue_xml(Selector): 
    485444    """ 
    486     <class>attrhasvalue_xml</class> works similar to <pyref class="attrhasvalue"><class>attrhasvalue</class></pyref> 
    487     except that the specified name is treated as an &xml; name instead of a Python name. 
     445    :class:`attrhasvalue_xml` works similar to :class:`attrhasvalue` except that 
     446    the specified name is treated as an XML name instead of a Python name. 
    488447    """ 
    489448 
     
    507466class attrcontains(Selector): 
    508467    """ 
    509     <p>Selector that selects all element nodes where an attribute with the 
     468    Selector that selects all element nodes where an attribute with the 
    510469    specified Python name contains the specified substring in its value. For 
    511     global attributes the attribute class can be passed. Note that 
    512     <pyref module="ll.xist.xsc" class="Attr" method="isfancy">fancy</pyref> 
    513     attributes will not be considered.</p> 
    514  
    515     <example> 
    516     <tty> 
    517     <prompt>>>> </prompt><input>from ll.xist import parsers, xfind</input> 
    518     <prompt>>>> </prompt><input>doc = parsers.parseurl("http://www.python.org", tidy=True)</input> 
    519     <prompt>>>> </prompt><input>for node in doc.walknode(<em>xfind.attrcontains("rel", "stylesheet")</em>):</input> 
    520     <prompt>... </prompt><input>\tprint repr(node)</input> 
    521     <prompt>... </prompt><input></input> 
    522     <![CDATA[<a type="text/css" id="screen-switcher-stylesheet" media="screen" rel="stylesheet" href="http://www.python.org/styles/screen-switcher-default.css" /> 
    523     <a type="text/css" media="scReen" rel="stylesheet" href="http://www.python.org/styles/netscape4.css" /> 
    524     <a type="text/css" media="print" rel="stylesheet" href="http://www.python.org/styles/print.css" /> 
    525     <a type="text/css" title="large text" media="screen" rel="alternate stylesheet" href="http://www.python.org/styles/largestyles.css" /> 
    526     <a type="text/css" title="default fonts" media="screen" rel="alternate stylesheet" href="http://www.python.org/styles/defaultfonts.css" />]]> 
    527     </tty> 
    528     </example> 
     470    global attributes the attribute class can be passed. Note that "fancy" 
     471    attributes (i.e. those containing non-text) will not be considered:: 
     472 
     473        >>> from ll.xist import parsers, xfind 
     474        >>> doc = parsers.parseurl("http://www.python.org", tidy=True) 
     475        >>> for node in doc.walknode(xfind.attrcontains("rel", "stylesheet")): 
     476        ... \tprint repr(node) 
     477        ...  
     478        <a type="text/css" id="screen-switcher-stylesheet" media="screen" rel="stylesheet" href="http://www.python.org/styles/screen-switcher-default.css" /> 
     479        <a type="text/css" media="scReen" rel="stylesheet" href="http://www.python.org/styles/netscape4.css" /> 
     480        <a type="text/css" media="print" rel="stylesheet" href="http://www.python.org/styles/print.css" /> 
     481        <a type="text/css" title="large text" media="screen" rel="alternate stylesheet" href="http://www.python.org/styles/largestyles.css" /> 
     482        <a type="text/css" title="default fonts" media="screen" rel="alternate stylesheet" href="http://www.python.org/styles/defaultfonts.css" /> 
    529483    """ 
    530484 
     
    548502class attrcontains_xml(Selector): 
    549503    """ 
    550     <class>attrcontains_xml</class> works similar to <pyref class="attrcontains"><class>attrcontains</class></pyref> 
    551     except that the specified name is treated as an &xml; name instead of a Python name. 
     504    :class:`attrcontains_xml` works similar to :class:`attrcontains` except that 
     505    the specified name is treated as an XML name instead of a Python name. 
    552506    """ 
    553507 
     
    571525class attrstartswith(Selector): 
    572526    """ 
    573     <p>Selector that selects all element nodes where an attribute with the 
    574     specified Python name starts with the specified string. For global attributes 
    575     the attribute class can be passed. Note that 
    576     <pyref module="ll.xist.xsc" class="Attr" method="isfancy">fancy</pyref> attributes 
    577     will not be considered.</p> 
    578  
    579     <example> 
    580     <tty> 
    581     <prompt>>>> </prompt><input>from ll.xist import parsers, xfind</input> 
    582     <prompt>>>> </prompt><input>doc = parsers.parseurl("http://www.python.org", tidy=True)</input> 
    583     <prompt>>>> </prompt><input>for node in doc.walknode(<em>xfind.attrstartswith("class_", "input-")</em>):</input> 
    584     <prompt>... </prompt><input>\tprint repr(node)</input> 
    585     <prompt>... </prompt><input></input> 
    586     <![CDATA[<input class="input-text" id="q" type="text" name="q" /> 
    587     <input value="search" class="input-button" id="submit" type="submit" name="submit" />]]> 
    588     </tty> 
    589     </example> 
     527    Selector that selects all element nodes where an attribute with the 
     528    specified Python name starts with the specified string. For global 
     529    attributes the attribute class can be passed. Note that "fancy" attributes 
     530    (i.e. those containing non-text) will not be considered:: 
     531 
     532        >>> from ll.xist import parsers, xfind 
     533        >>> doc = parsers.parseurl("http://www.python.org", tidy=True) 
     534        >>> for node in doc.walknode(xfind.attrstartswith("class_", "input-")): 
     535        ...     print repr(node) 
     536        ...  
     537        <input class="input-text" id="q" type="text" name="q" /> 
     538        <input value="search" class="input-button" id="submit" type="submit" name="submit" /> 
    590539    """ 
    591540 
     
    609558class attrstartswith_xml(Selector): 
    610559    """ 
    611     <class>attrstartswith_xml</class> works similar to <pyref class="attrstartswith"><class>attrstartswith</class></pyref> 
    612     except that the specified name is treated as an &xml; name instead of a Python name. 
     560    :class:`attrstartswith_xml` works similar to :class:`attrstartswith` except 
     561    that the specified name is treated as an XML name instead of a Python name. 
    613562    """ 
    614563 
     
    632581class attrendswith(Selector): 
    633582    """ 
    634     <p>Selector that selects all element nodes where an attribute with the 
     583    Selector that selects all element nodes where an attribute with the 
    635584    specified Python name ends with the specified string. For global attributes 
    636     the attribute class can be passed. Note that 
    637     <pyref module="ll.xist.xsc" class="Attr" method="isfancy">fancy</pyref> attributes 
    638     will not be considered.</p> 
    639  
    640     <example> 
    641     <tty> 
    642     <prompt>>>> </prompt><input>from ll.xist import parsers, xfind</input> 
    643     <prompt>>>> </prompt><input>doc = parsers.parseurl("http://www.python.org", tidy=True)</input> 
    644     <prompt>>>> </prompt><input>for node in doc.walknode(<em>xfind.attrendswith("href", ".css")</em>):</input> 
    645     <prompt>... </prompt><input>\tprint repr(node)</input> 
    646     <prompt>... </prompt><input></input> 
    647     <![CDATA[<a href="http://www.python.org/styles/screen-switcher-default.css" type="text/css" rel="stylesheet" id="screen-switcher-stylesheet" media="screen" /> 
    648     <a type="text/css" rel="stylesheet" href="http://www.python.org/styles/netscape4.css" media="scReen" /> 
    649     <a type="text/css" rel="stylesheet" href="http://www.python.org/styles/print.css" media="print" /> 
    650     <a title="large text" type="text/css" rel="alternate stylesheet" href="http://www.python.org/styles/largestyles.css" media="screen" /> 
    651     <a title="default fonts" type="text/css" rel="alternate stylesheet" href="http://www.python.org/styles/defaultfonts.css" media="screen" />]]> 
    652     </tty> 
    653     </example> 
     585    the attribute class can be passed. Note that "fancy" attributes (i.e. those 
     586    containing non-text) will not be considered:: 
     587 
     588        >>> from ll.xist import parsers, xfind 
     589        >>> doc = parsers.parseurl("http://www.python.org", tidy=True) 
     590        >>> for node in doc.walknode(xfind.attrendswith("href", ".css")): 
     591        ...     print repr(node) 
     592        ...  
     593        <a href="http://www.python.org/styles/screen-switcher-default.css" type="text/css" rel="stylesheet" id="screen-switcher-stylesheet" media="screen" /> 
     594        <a type="text/css" rel="stylesheet" href="http://www.python.org/styles/netscape4.css" media="scReen" /> 
     595        <a type="text/css" rel="stylesheet" href="http://www.python.org/styles/print.css" media="print" /> 
     596        <a title="large text" type="text/css" rel="alternate stylesheet" href="http://www.python.org/styles/largestyles.css" media="screen" /> 
     597        <a title="default fonts" type="text/css" rel="alternate stylesheet" href="http://www.python.org/styles/defaultfonts.css" media="screen" /> 
    654598    """ 
    655599 
     
    673617class attrendswith_xml(Selector): 
    674618    """ 
    675     <class>attrendswith_xml</class> works similar to <pyref class="attrendswith"><class>attrendswith</class></pyref> 
    676     except that the specified name is treated as an &xml; name instead of a Python name. 
     619    :class:`attrendswith_xml` works similar to :class:`attrendswith` except that 
     620    the specified name is treated as an XML name instead of a Python name. 
    677621    """ 
    678622 
     
    696640class hasid(Selector): 
    697641    """ 
    698     <p>Selector that selects all element nodes where the <lit>id</lit> attribute 
    699     has the specified value.</p> 
    700     <example> 
    701     <tty> 
    702     <prompt>>>> </prompt><input>from ll.xist import parsers, xfind</input> 
    703     <prompt>>>> </prompt><input>doc = parsers.parseurl("http://www.python.org", tidy=True)</input> 
    704     <prompt>>>> </prompt><input>for node in doc.walknode(<em>xfind.hasid("logo")</em>):</input> 
    705     <prompt>... </prompt><input>\tprint node.bytes()</input> 
    706     <prompt>... </prompt><input></input> 
    707     <![CDATA[<img src="http://www.python.org/images/python-logo.gif" id="logo" alt="homepage" border="0" />]]> 
    708     </tty> 
    709     </example> 
     642    Selector that selects all element nodes where the ``id`` attribute has the 
     643    specified value:: 
     644 
     645        >>> from ll.xist import parsers, xfind 
     646        >>> doc = parsers.parseurl("http://www.python.org", tidy=True) 
     647        >>> for node in doc.walknode(xfind.hasid("logo")): 
     648        ...     print node.bytes() 
     649        ...  
     650        <img src="http://www.python.org/images/python-logo.gif" id="logo" alt="homepage" border="0" /> 
    710651    """ 
    711652 
     
    731672class hasclass(Selector): 
    732673    """ 
    733     <p>Selector that selects all element nodes where the <lit>class</lit> attribute 
    734     has the specified value.</p> 
    735     <example> 
    736     <tty> 
    737     <prompt>>>> </prompt><input>from ll.xist import parsers, xfind</input> 
    738     <prompt>>>> </prompt><input>doc = parsers.parseurl("http://www.python.org", tidy=True)</input> 
    739     <prompt>>>> </prompt><input>for node in doc.walknode(<em>xfind.hasclass("reference")</em>):</input> 
    740     <prompt>... </prompt><input>\tprint node.bytes()</input> 
    741     <prompt>... </prompt><input></input> 
    742     <![CDATA[<a class="reference" href="http://www.python.org/search">Advanced Search</a> 
    743     <a href="http://www.python.org/about/success/rackspace" class="reference">Rackspace</a> 
    744     <a href="http://www.python.org/about/success/ilm" class="reference">Industrial Light and Magic</a> 
    745     <a href="http://www.python.org/about/success/astra" class="reference">AstraZeneca</a>]]> 
    746     <rep>...</rep> 
    747     </tty> 
    748     </example> 
     674    Selector that selects all element nodes where the ``class`` attribute has 
     675    the specified value:: 
     676 
     677        >>> from ll.xist import parsers, xfind 
     678        >>> doc = parsers.parseurl("http://www.python.org", tidy=True) 
     679        >>> for node in doc.walknode(xfind.hasclass("reference")<): 
     680        ...     print node.bytes() 
     681        ...  
     682        <a class="reference" href="http://www.python.org/search">Advanced Search</a> 
     683        <a href="http://www.python.org/about/success/rackspace" class="reference">Rackspace</a> 
     684        <a href="http://www.python.org/about/success/ilm" class="reference">Industrial Light and Magic</a> 
     685        <a href="http://www.python.org/about/success/astra" class="reference">AstraZeneca</a> 
     686        ... 
    749687    """ 
    750688 
     
    770708class inattr(Selector): 
    771709    """ 
    772     <p>Selector that selects all attribute nodes and nodes inside of attributes.</p> 
    773     <example> 
    774     <tty> 
    775     <prompt>>>> </prompt><input>from ll.xist import parsers, xfind</input> 
    776     <prompt>>>> </prompt><input>doc = parsers.parseurl("http://www.python.org", tidy=True)</input> 
    777     <prompt>>>> </prompt><input>for node in doc.walknode(<em>xfind.inattr &amp; xsc.Text</em>):</input> 
    778     <prompt>... </prompt><input>\tprint node.bytes()</input> 
    779     <prompt>... </prompt><input></input> 
     710    Selector that selects al