Package translate :: Package storage :: Module dtd :: Class dtdfile

[hide private]
[frames] | no frames]

# Class dtdfile

source code

               object --+
                        |
    base.TranslationStore --+
                            |
                           dtdfile

this class represents a .dtd file, made up of dtdunits

Nested Classes | [hide private]

| UnitClass this class represents an entity definition from a dtd file (and possibly associated comments)

Instance Methods | [hide private]

__init__(self, inputfile=None) construct a dtdfile, optionally reading in from inputfile | source code

parse(self, dtdsrc) read the source code of a dtd file in and include them as dtdunits in self.units (any existing units are lost) | source code

__str__(self) convert to a string. | source code

getoutput(self) convert the units back to source | source code

makeindex(self) makes self.index dictionary keyed on entities | source code

rewrap(self) | source code

Inherited from `base.TranslationStore`: `addsourceunit`, `addunit`, `findunit`, `getunits`, `isempty`, `save`, `savefile`, `setsourcelanguage`, `settargetlanguage`, `translate`, `unit_iter` Inherited from `base.TranslationStore` (private): `_assignname` Inherited from `object`: `__delattr__`, `__getattribute__`, `__hash__`, `__new__`, `__reduce__`, `__reduce_ex__`, `__repr__`, `__setattr__`

Class Methods | [hide private]

Inherited from `base.TranslationStore`: `parsefile`, `parsestring`

Class Variables | [hide private]

Inherited from `base.TranslationStore`: `Extensions`, `Mimetypes`

Properties | [hide private]

Inherited from `object`: `__class__`

Method Details | [hide private]

### __init__(self, inputfile=None)
(Constructor)

source code

construct a dtdfile, optionally reading in from inputfile

Overrides: object.__init__

### parse(self, dtdsrc)

source code

read the source code of a dtd file in and include them as dtdunits in self.units (any existing units are lost)

Overrides: base.TranslationStore.parse

### __str__(self)
(Informal representation operator)

source code

convert to a string. double check that unicode is handled somehow here

Overrides: object.__str__

### makeindex(self)

source code

makes self.index dictionary keyed on entities

Overrides: base.TranslationStore.makeindex