Package translate :: Package storage :: Package placeables :: Module general :: Class XMLEntityPlaceable |
[hide private]
[frames] | no frames]

# Class XMLEntityPlaceable

source code

Placeable handling XML entities (`&xxxxx;`-style entities).

Instance Methods | [hide private]
Inherited from `strelem.StringElem`: `__add__`, `__contains__`, `__eq__`, `__ge__`, `__getitem__`, `__getslice__`, `__gt__`, `__init__`, `__iter__`, `__le__`, `__len__`, `__lt__`, `__mul__`, `__ne__`, `__radd__`, `__repr__`, `__rmul__`, `__str__`, `__unicode__`, `apply_to_strings`, `copy`, `delete_elem`, `delete_range`, `depth_first`, `elem_at_offset`, `elem_offset`, `encode`, `find`, `find_elems_with`, `flatten`, `get_ancestor_where`, `get_index_data`, `get_parent_elem`, `insert`, `insert_between`, `isleaf`, `iter_depth_first`, `map`, `print_tree`, `prune`, `remove_type`, `translate` Inherited from `object`: `__delattr__`, `__getattribute__`, `__hash__`, `__new__`, `__reduce__`, `__reduce_ex__`, `__setattr__`

Class Methods | [hide private]
parse(cls, pstr) A parser method to extract placeables from a string based on a regular expression. | source code

Class Variables | [hide private]
| iseditable = `False` Whether this string should be changable by the user.
| istranslatable = `False` Whether this string is translatable into other languages.
| regex = `re.compile(r'`(?x)`&`(``(``[`a`-`zA`-`Z`]``[`a`-`zA`-`Z0`-`9\.-`]``*``)``|``(`#`(`\d`{1,5``...``
Inherited from `base.Ph`: `has_content` Inherited from `strelem.StringElem`: `isfragile`, `isvisible`, `renderer`, `sub`

Properties | [hide private]
Inherited from `object`: `__class__`

Method Details | [hide private]

### parse(cls, pstr) Class Method | source code
A parser method to extract placeables from a string based on a regular expression. Use this function as the `@parse()` method of a placeable class. Parameters: `pstr` - The string to parse into an instance of this class. Returns: An instance of the current class, or `None` if the string not parseable by this class. Overrides: strelem.StringElem.parse

Class Variable Details | [hide private]

  ### regex Value:
      re.compile(r'(?x)&(([a-zA-Z][a-zA-Z0-9\.-]*)|(#(\d{1,5}|x[a-fA-F0-9]{1
      ,5})+));')