Back to index

moin  1.9.0~rc2
Public Member Functions | Public Attributes | Static Public Attributes | Private Member Functions | Private Attributes
MoinMoin.formatter.text_xml.Formatter Class Reference
Inheritance diagram for MoinMoin.formatter.text_xml.Formatter:
Inheritance graph
[legend]
Collaboration diagram for MoinMoin.formatter.text_xml.Formatter:
Collaboration graph
[legend]

List of all members.

Public Member Functions

def __init__
def startDocument
def endDocument
def lang
def sysmsg
def rawHTML
def pagelink
def interwikilink
def url
def attachment_link
def attachment_image
def attachment_drawing
def text
def rule
def icon
def strong
def emphasis
def highlight
def number_list
def bullet_list
def listitem
def code
def small
def big
def sup
def sub
def strike
def preformatted
def paragraph
def linebreak
def heading
def table
def table_row
def table_cell
def anchordef
def anchorlink
def underline
def definition_list
def definition_term
def definition_desc
def image
def transclusion
def transclusion_param
def code_area
def code_line
def code_token
def set_highlight_re
def setPage
def startContent
def endContent
def attachment_inlined
def line_anchordef
def line_anchorlink
def smiley
def nowikiword
def code_area
def heading
def macro
def parser
def div
def span
def escapedText
def comment
def sanitize_to_id
def make_id_unique
def qualify_id

Public Attributes

 in_pre
 request
 pagelinks
 in_p
 page

Static Public Attributes

string hardspace = ' '

Private Member Functions

def _escape

Private Attributes

 _current_depth
 _base_depth

Detailed Description

    Send XML data.

Definition at line 14 of file text_xml.py.


Constructor & Destructor Documentation

def MoinMoin.formatter.text_xml.Formatter.__init__ (   self,
  request,
  kw 
)

Reimplemented from MoinMoin.formatter.FormatterBase.

Definition at line 21 of file text_xml.py.

00021 
00022     def __init__(self, request, **kw):
00023         FormatterBase.__init__(self, request, **kw)
00024         self._current_depth = 1
00025         self._base_depth = 0
00026         self.in_pre = 0


Member Function Documentation

def MoinMoin.formatter.text_xml.Formatter._escape (   self,
  text,
  extra_mapping = {"'": "'" 
) [private]

Definition at line 27 of file text_xml.py.

00027 
00028     def _escape(self, text, extra_mapping={"'": "'", '"': """}):
00029         return saxutils.escape(text, extra_mapping)

Here is the caller graph for this function:

Reimplemented from MoinMoin.formatter.FormatterBase.

Definition at line 183 of file text_xml.py.

00183 
00184     def anchordef(self, id):
00185         return '<anchor id="%s"/>' % id

def MoinMoin.formatter.text_xml.Formatter.anchorlink (   self,
  on,
  name = '',
  kw 
)

Reimplemented from MoinMoin.formatter.FormatterBase.

Definition at line 186 of file text_xml.py.

00186 
00187     def anchorlink(self, on, name='', **kw):
00188         id = kw.get('id', None)
00189         extra = ''
00190         if id:
00191             extra = ' id="%s"' % id
00192         return ('<link anchor="%s"%s>' % (name, extra), '</link>') [not on]

def MoinMoin.formatter.text_xml.Formatter.attachment_drawing (   self,
  url,
  text,
  kw 
)

Reimplemented from MoinMoin.formatter.FormatterBase.

Definition at line 79 of file text_xml.py.

00079 
00080     def attachment_drawing(self, url, text, **kw):
00081         return '<attachmentdrawing href="%s">%s</attachmentdrawing>' % (url, text)

Reimplemented from MoinMoin.formatter.FormatterBase.

Definition at line 76 of file text_xml.py.

00076 
00077     def attachment_image(self, url, **kw):
00078         return '<attachmentimage href="%s"></attachmentimage>' % (url, )

def MoinMoin.formatter.FormatterBase.attachment_inlined (   self,
  url,
  text,
  kw 
) [inherited]

Reimplemented in MoinMoin.formatter.text_gedit.Formatter.

Definition at line 123 of file __init__.py.

00123 
00124     def attachment_inlined(self, url, text, **kw):
00125         from MoinMoin.action import AttachFile
00126         import os
00127         _ = self.request.getText
00128         pagename, filename = AttachFile.absoluteName(url, self.page.page_name)
00129         fname = wikiutil.taintfilename(filename)
00130         fpath = AttachFile.getFilename(self.request, pagename, fname)
00131         ext = os.path.splitext(filename)[1]
00132         Parser = wikiutil.getParserForExtension(self.request.cfg, ext)
00133         if Parser is not None:
00134             try:
00135                 content = file(fpath, 'r').read()
00136                 # Try to decode text. It might return junk, but we don't
00137                 # have enough information with attachments.
00138                 content = wikiutil.decodeUnknownInput(content)
00139                 colorizer = Parser(content, self.request, filename=filename)
00140                 colorizer.format(self)
00141             except IOError:
00142                 pass
00143 
00144         return (self.attachment_link(1, url) +
00145                 self.text(text) +
00146                 self.attachment_link(0))

Here is the call graph for this function:

def MoinMoin.formatter.text_xml.Formatter.attachment_link (   self,
  on,
  url = None,
  kw 
)

Reimplemented from MoinMoin.formatter.FormatterBase.

Definition at line 70 of file text_xml.py.

00070 
00071     def attachment_link(self, on, url=None, **kw):
00072         if on:
00073             return '<attachment href="%s">' % (url, )
00074         else:
00075             return '</attachment>'

def MoinMoin.formatter.text_xml.Formatter.big (   self,
  on,
  kw 
)

Reimplemented from MoinMoin.formatter.FormatterBase.

Definition at line 127 of file text_xml.py.

00127 
00128     def big(self, on, **kw):
00129         return ['<big>', '</big>'][not on]

def MoinMoin.formatter.text_xml.Formatter.bullet_list (   self,
  on,
  kw 
)

Reimplemented from MoinMoin.formatter.FormatterBase.

Definition at line 112 of file text_xml.py.

00112 
00113     def bullet_list(self, on, **kw):
00114         result = ''
00115         if self.in_p:
00116             result = self.paragraph(0)
00117         return result + ['<ul>', '</ul>\n'][not on]

Here is the call graph for this function:

def MoinMoin.formatter.text_xml.Formatter.code (   self,
  on,
  kw 
)

Reimplemented from MoinMoin.formatter.FormatterBase.

Definition at line 121 of file text_xml.py.

00121 
00122     def code(self, on, **kw):
00123         return ['<code>', '</code>'][not on]

def MoinMoin.formatter.text_xml.Formatter.code_area (   self,
  on,
  code_id,
  code_type = 'code',
  show = 0,
  start = -1,
  step = -1,
  msg = None 
)

Definition at line 224 of file text_xml.py.

00224 
00225     def code_area(self, on, code_id, code_type='code', show=0, start=-1, step=-1, msg=None):
00226         return ('<codearea id="%s">' % code_id, '</codearea')[not on]

def MoinMoin.formatter.FormatterBase.code_area (   self,
  on,
  code_id,
  kw 
) [inherited]

Definition at line 248 of file __init__.py.

00248 
00249     def code_area(self, on, code_id, **kw):
00250         raise NotImplementedError

Reimplemented from MoinMoin.formatter.FormatterBase.

Definition at line 227 of file text_xml.py.

00227 
00228     def code_line(self, on):
00229         return ('<codeline>', '</codeline')[not on]

def MoinMoin.formatter.text_xml.Formatter.code_token (   self,
  on,
  tok_type 
)

Reimplemented from MoinMoin.formatter.FormatterBase.

Definition at line 230 of file text_xml.py.

00230 
00231     def code_token(self, on, tok_type):
00232         return ('<codetoken type="%s">' % tok_type, '</codetoken')[not on]
def MoinMoin.formatter.FormatterBase.comment (   self,
  text,
  kw 
) [inherited]

Reimplemented in MoinMoin.formatter.text_gedit.Formatter.

Definition at line 389 of file __init__.py.

00389 
00390     def comment(self, text, **kw):
00391         return ""

Reimplemented from MoinMoin.formatter.FormatterBase.

Definition at line 205 of file text_xml.py.

00205 
00206     def definition_desc(self, on, **kw):
00207         return ['<item>', '</item>'][not on]

Reimplemented from MoinMoin.formatter.FormatterBase.

Definition at line 196 of file text_xml.py.

00196 
00197     def definition_list(self, on, **kw):
00198         result = ''
00199         if self.in_p:
00200             result = self.paragraph(0)
00201         return result + ['<gloss>', '</gloss>'][not on]

Here is the call graph for this function:

def MoinMoin.formatter.text_xml.Formatter.definition_term (   self,
  on,
  compact = 0,
  kw 
)

Reimplemented from MoinMoin.formatter.FormatterBase.

Definition at line 202 of file text_xml.py.

00202 
00203     def definition_term(self, on, compact=0, **kw):
00204         return ['<label>', '</label>'][not on]

def MoinMoin.formatter.FormatterBase.div (   self,
  on,
  kw 
) [inherited]
open/close a blocklevel division 

Reimplemented in MoinMoin.formatter.text_html.Formatter, and MoinMoin.formatter.text_docbook.Formatter.

Definition at line 354 of file __init__.py.

00354 
00355     def div(self, on, **kw):
00356         """ open/close a blocklevel division """
00357         return ""

def MoinMoin.formatter.text_xml.Formatter.emphasis (   self,
  on,
  kw 
)

Reimplemented from MoinMoin.formatter.FormatterBase.

Definition at line 100 of file text_xml.py.

00100 
00101     def emphasis(self, on, **kw):
00102         return ['<em>', '</em>'][not on]

def MoinMoin.formatter.FormatterBase.endContent (   self) [inherited]

Reimplemented in MoinMoin.formatter.text_docbook.Formatter, and MoinMoin.macro.TableOfContents.TOCFormatter.

Definition at line 80 of file __init__.py.

00080 
00081     def endContent(self):
00082         if self.page:
00083             self.request.uid_generator.end()
00084         return ""

Reimplemented from MoinMoin.formatter.FormatterBase.

Definition at line 35 of file text_xml.py.

00035 
00036     def endDocument(self):
00037         result = ""
00038         while self._current_depth > 1:
00039             result += "</s%d>" % self._current_depth
00040             self._current_depth -= 1
00041         return result + '</s1>'

def MoinMoin.formatter.FormatterBase.escapedText (   self,
  on,
  kw 
) [inherited]
This allows emitting text as-is, anything special will
    be escaped (at least in HTML, some text output format
    would possibly do nothing here)

Reimplemented in MoinMoin.formatter.text_html.Formatter, and MoinMoin.formatter.dom_xml.Formatter.

Definition at line 382 of file __init__.py.

00382 
00383     def escapedText(self, on, **kw):
00384         """ This allows emitting text as-is, anything special will
00385             be escaped (at least in HTML, some text output format
00386             would possibly do nothing here)
00387         """
00388         return ""

def MoinMoin.formatter.text_xml.Formatter.heading (   self,
  on,
  depth,
  id = None,
  kw 
)

Definition at line 153 of file text_xml.py.

00153 
00154     def heading(self, on, depth, id=None, **kw):
00155         if not on:
00156             return '">\n'
00157         # remember depth of first heading, and adapt current depth accordingly
00158         if not self._base_depth:
00159             self._base_depth = depth
00160         depth = max(depth + (2 - self._base_depth), 2)
00161 
00162         # close open sections
00163         result = ""
00164         while self._current_depth >= depth:
00165             result = result + "</s%d>\n" % self._current_depth
00166             self._current_depth -= 1
00167         self._current_depth = depth
00168 
00169         id_text = ''
00170         if id:
00171             id_text = ' id="%s"' % id
00172 
00173         return result + '<s%d%s title="' % (depth, id_text)

def MoinMoin.formatter.FormatterBase.heading (   self,
  on,
  depth,
  kw 
) [inherited]
def MoinMoin.formatter.text_xml.Formatter.highlight (   self,
  on,
  kw 
)

Reimplemented from MoinMoin.formatter.FormatterBase.

Definition at line 103 of file text_xml.py.

00103 
00104     def highlight(self, on, **kw):
00105         return ['<strong>', '</strong>'][not on]

def MoinMoin.formatter.text_xml.Formatter.icon (   self,
  type 
)

Reimplemented from MoinMoin.formatter.FormatterBase.

Definition at line 94 of file text_xml.py.

00094 
00095     def icon(self, type):
00096         return '<icon type="%s" />' % type

def MoinMoin.formatter.text_xml.Formatter.image (   self,
  src = None,
  kw 
)
An inline image.

Extra keyword arguments are according to the HTML <img> tag attributes.
In particular an 'alt' or 'title' argument should give a description
of the image.

Reimplemented from MoinMoin.formatter.FormatterBase.

Definition at line 208 of file text_xml.py.

00208 
00209     def image(self, src=None, **kw):
00210         valid_attrs = ['src', 'width', 'height', 'alt', 'title']
00211         attrs = {'src': src}
00212         for key, value in kw.items():
00213             if key in valid_attrs:
00214                 attrs[key] = value
00215         return FormatterBase.image(self, **attrs) + '</img>'

def MoinMoin.formatter.text_xml.Formatter.interwikilink (   self,
  on,
  interwiki = '',
  pagename = '',
  kw 
)
calls pagelink() for internal interwikilinks
    to make sure they get counted for self.pagelinks.
    IMPORTANT: on and off must be called with same parameters, see
       also the text_html formatter.

Reimplemented from MoinMoin.formatter.FormatterBase.

Definition at line 57 of file text_xml.py.

00057 
00058     def interwikilink(self, on, interwiki='', pagename='', **kw):
00059         if on:
00060             return '<interwiki wiki="%s" pagename="%s">' % (interwiki, pagename)
00061         else:
00062             return '</interwiki>'

def MoinMoin.formatter.text_xml.Formatter.lang (   self,
  on,
  lang_name 
)

Reimplemented from MoinMoin.formatter.FormatterBase.

Definition at line 42 of file text_xml.py.

00042 
00043     def lang(self, on, lang_name):
00044         return ('<div lang="">' % lang_name, '</div>')[not on]

def MoinMoin.formatter.FormatterBase.line_anchordef (   self,
  lineno 
) [inherited]

Reimplemented in MoinMoin.formatter.text_html.Formatter, MoinMoin.formatter.dom_xml.Formatter, and MoinMoin.formatter.text_gedit.Formatter.

Definition at line 150 of file __init__.py.

00150 
00151     def line_anchordef(self, lineno):
00152         return ""

def MoinMoin.formatter.FormatterBase.line_anchorlink (   self,
  on,
  lineno = 0 
) [inherited]

Reimplemented in MoinMoin.formatter.text_html.Formatter, and MoinMoin.formatter.text_gedit.Formatter.

Definition at line 156 of file __init__.py.

00156 
00157     def line_anchorlink(self, on, lineno=0):
00158         return ""

def MoinMoin.formatter.text_xml.Formatter.linebreak (   self,
  preformatted = 1 
)

Reimplemented from MoinMoin.formatter.FormatterBase.

Definition at line 150 of file text_xml.py.

00150 
00151     def linebreak(self, preformatted=1):
00152         return ['\n', '<br/>\n'][not preformatted]

def MoinMoin.formatter.text_xml.Formatter.listitem (   self,
  on,
  kw 
)

Reimplemented from MoinMoin.formatter.FormatterBase.

Definition at line 118 of file text_xml.py.

00118 
00119     def listitem(self, on, **kw):
00120         return ['<li>', '</li>\n'][not on]

def MoinMoin.formatter.FormatterBase.macro (   self,
  macro_obj,
  name,
  args,
  markup = None 
) [inherited]

Reimplemented in MoinMoin.formatter.text_docbook.Formatter, MoinMoin.formatter.dom_xml.Formatter, MoinMoin.formatter.text_gedit.Formatter, and MoinMoin.macro.TableOfContents.TOCFormatter.

Definition at line 307 of file __init__.py.

00307 
00308     def macro(self, macro_obj, name, args, markup=None):
00309         # call the macro
00310         try:
00311             return macro_obj.execute(name, args)
00312         except ImportError, err:
00313             errmsg = unicode(err)
00314             if not name in errmsg:
00315                 raise
00316             if markup:
00317                 return (self.span(1, title=errmsg) +
00318                         self.text(markup) +
00319                         self.span(0))
00320             else:
                return self.text(errmsg)

Here is the call graph for this function:

def MoinMoin.formatter.FormatterBase.make_id_unique (   self,
  id 
) [inherited]
Take an ID and make it unique in the current namespace.

Definition at line 406 of file __init__.py.

00406 
00407     def make_id_unique(self, id):
00408         '''
00409         Take an ID and make it unique in the current namespace.
00410         '''
00411         ns = self.request.uid_generator.include_id
00412         if not ns is None:
00413             ns = self.sanitize_to_id(ns)
00414         id = self.sanitize_to_id(id)
00415         id = self.request.uid_generator(id, ns)
00416         return id

Here is the call graph for this function:

Here is the caller graph for this function:

def MoinMoin.formatter.FormatterBase.nowikiword (   self,
  text 
) [inherited]

Reimplemented in MoinMoin.formatter.text_gedit.Formatter.

Definition at line 184 of file __init__.py.

00184 
00185     def nowikiword(self, text):
00186         return self.text(text)

Here is the call graph for this function:

def MoinMoin.formatter.text_xml.Formatter.number_list (   self,
  on,
  type = None,
  start = None,
  kw 
)

Reimplemented from MoinMoin.formatter.FormatterBase.

Definition at line 106 of file text_xml.py.

00106 
00107     def number_list(self, on, type=None, start=None, **kw):
00108         result = ''
00109         if self.in_p:
00110             result = self.paragraph(0)
00111         return result + ['<ol>', '</ol>\n'][not on]

Here is the call graph for this function:

def MoinMoin.formatter.text_xml.Formatter.pagelink (   self,
  on,
  pagename = '',
  page = None,
  kw 
)
make a link to page <pagename>. Instead of supplying a pagename,
    it is also possible to give a live Page object, then page.page_name
    will be used.

Reimplemented from MoinMoin.formatter.FormatterBase.

Definition at line 51 of file text_xml.py.

00051 
00052     def pagelink(self, on, pagename='', page=None, **kw):
00053         FormatterBase.pagelink(self, on, pagename, page, **kw)
00054         if page is None:
00055             page = Page(self.request, pagename, formatter=self)
00056         return page.link_to(self.request, on=on, **kw)

def MoinMoin.formatter.text_xml.Formatter.paragraph (   self,
  on,
  kw 
)

Reimplemented from MoinMoin.formatter.FormatterBase.

Definition at line 146 of file text_xml.py.

00146 
00147     def paragraph(self, on, **kw):
00148         FormatterBase.paragraph(self, on)
00149         return ['<p>', '</p>\n'][not on]

def MoinMoin.formatter.FormatterBase.parser (   self,
  parser_name,
  lines 
) [inherited]
parser_name MUST be valid!
    writes out the result instead of returning it!

Reimplemented in MoinMoin.formatter.dom_xml.Formatter, and MoinMoin.formatter.text_gedit.Formatter.

Definition at line 331 of file __init__.py.

00331 
00332     def parser(self, parser_name, lines):
00333         """ parser_name MUST be valid!
00334             writes out the result instead of returning it!
00335         """
00336         # attention: this is copied into text_python!
00337         parser = wikiutil.searchAndImportPlugin(self.request.cfg, "parser", parser_name)
00338         args = None
00339         if lines:
00340             args = self._get_bang_args(lines[0])
00341             logging.debug("formatter.parser: parser args %r" % args)
00342             if args is not None:
00343                 lines = lines[1:]
00344         if lines and not lines[0]:
00345             lines = lines[1:]
00346         if lines and not lines[-1].strip():
00347             lines = lines[:-1]
00348         p = parser('\n'.join(lines), self.request, format_args=args)
00349         p.format(self)
00350         del p
00351         return ''

Here is the call graph for this function:

Here is the caller graph for this function:

def MoinMoin.formatter.text_xml.Formatter.preformatted (   self,
  on,
  kw 
)

Reimplemented from MoinMoin.formatter.FormatterBase.

Definition at line 139 of file text_xml.py.

00139 
00140     def preformatted(self, on, **kw):
00141         FormatterBase.preformatted(self, on)
00142         result = ''
00143         if self.in_p:
00144             result = self.paragraph(0)
00145         return result + ['<source><![CDATA[', ']]></source>'][not on]

Here is the call graph for this function:

def MoinMoin.formatter.FormatterBase.qualify_id (   self,
  id 
) [inherited]
Take an ID and return a string that is qualified by
the current namespace; this default implementation
is suitable if the dot ('.') is valid in IDs for your
formatter.

Definition at line 417 of file __init__.py.

00417 
00418     def qualify_id(self, id):
00419         '''
00420         Take an ID and return a string that is qualified by
00421         the current namespace; this default implementation
00422         is suitable if the dot ('.') is valid in IDs for your
00423         formatter.
00424         '''
00425         ns = self.request.uid_generator.include_id
00426         if not ns is None:
00427             ns = self.sanitize_to_id(ns)
00428             return '%s.%s' % (ns, id)
00429         return id

Here is the call graph for this function:

Here is the caller graph for this function:

def MoinMoin.formatter.text_xml.Formatter.rawHTML (   self,
  markup 
)
This allows emitting pre-formatted HTML markup, and should be
    used wisely (i.e. very seldom).

    Using this event while generating content results in unwanted
    effects, like loss of markup or insertion of CDATA sections
    when output goes to XML formats.

Reimplemented from MoinMoin.formatter.FormatterBase.

Definition at line 48 of file text_xml.py.

00048 
00049     def rawHTML(self, markup):
00050         return '<![CDATA[' + markup.replace(']]>', ']]>]]&gt;<![CDATA[') + ']]>'

def MoinMoin.formatter.text_xml.Formatter.rule (   self,
  size = 0,
  kw 
)

Reimplemented from MoinMoin.formatter.FormatterBase.

Definition at line 87 of file text_xml.py.

00087 
00088     def rule(self, size=0, **kw):
00089         return "\n<br/>%s<br/>\n" % ("-" * 78, ) # <hr/> not supported in stylebook
00090 #        if size:
00091 #            return '<hr size="%d"/>\n' % (size, )
00092 #        else:
00093 #            return '<hr/>\n'

def MoinMoin.formatter.FormatterBase.sanitize_to_id (   self,
  text 
) [inherited]
Take 'text' and return something that is a valid ID
for this formatter.
The default returns the first non-space character of the string.

Because of the way this is used, it must be idempotent,
i.e. calling it on an already sanitized id must yield the
original id.

Reimplemented in MoinMoin.formatter.text_html.Formatter.

Definition at line 394 of file __init__.py.

00394 
00395     def sanitize_to_id(self, text):
00396         '''
00397         Take 'text' and return something that is a valid ID
00398         for this formatter.
00399         The default returns the first non-space character of the string.
00400 
00401         Because of the way this is used, it must be idempotent,
00402         i.e. calling it on an already sanitized id must yield the
00403         original id.
00404         '''
00405         return text.strip()[:1]

Here is the caller graph for this function:

def MoinMoin.formatter.FormatterBase.set_highlight_re (   self,
  hi_re = None 
) [inherited]
set the highlighting regular expression (e.g. for search terms)

@param hi_re: either a valid re as str/unicode (you may want to use
      re.escape before passing generic strings!) or a compiled
      re object. raises re.error for invalid re.

Definition at line 43 of file __init__.py.

00043 
00044     def set_highlight_re(self, hi_re=None):
00045         """ set the highlighting regular expression (e.g. for search terms)
00046 
00047         @param hi_re: either a valid re as str/unicode (you may want to use
00048                       re.escape before passing generic strings!) or a compiled
00049                       re object. raises re.error for invalid re.
00050         """
00051         if isinstance(hi_re, (str, unicode)):
00052             hi_re = re.compile(hi_re, re.U + re.IGNORECASE)
00053         self._highlight_re = hi_re

def MoinMoin.formatter.FormatterBase.setPage (   self,
  page 
) [inherited]

Reimplemented in MoinMoin.formatter.dom_xml.Formatter.

Definition at line 57 of file __init__.py.

00057 
00058     def setPage(self, page):
00059         self.page = page

def MoinMoin.formatter.text_xml.Formatter.small (   self,
  on,
  kw 
)

Reimplemented from MoinMoin.formatter.FormatterBase.

Definition at line 124 of file text_xml.py.

00124 
00125     def small(self, on, **kw):
00126         return ['<small>', '</small>'][not on]

def MoinMoin.formatter.FormatterBase.smiley (   self,
  text 
) [inherited]

Reimplemented in MoinMoin.formatter.text_docbook.Formatter, MoinMoin.formatter.dom_xml.Formatter, and MoinMoin.formatter.text_plain.Formatter.

Definition at line 181 of file __init__.py.

00181 
00182     def smiley(self, text):
00183         return text

def MoinMoin.formatter.FormatterBase.span (   self,
  on,
  kw 
) [inherited]
open/close a inline span 

Reimplemented in MoinMoin.formatter.text_html.Formatter, MoinMoin.formatter.text_docbook.Formatter, and MoinMoin.formatter.text_gedit.Formatter.

Definition at line 358 of file __init__.py.

00358 
00359     def span(self, on, **kw):
00360         """ open/close a inline span """
00361         return ""

Here is the caller graph for this function:

def MoinMoin.formatter.FormatterBase.startContent (   self,
  content_id = "content",
  kw 
) [inherited]

Reimplemented in MoinMoin.formatter.text_docbook.Formatter, and MoinMoin.macro.TableOfContents.TOCFormatter.

Definition at line 75 of file __init__.py.

00075 
00076     def startContent(self, content_id="content", **kw):
00077         if self.page:
00078             self.request.uid_generator.begin(self.page.page_name)
00079         return ""

Reimplemented from MoinMoin.formatter.FormatterBase.

Definition at line 30 of file text_xml.py.

00030 
00031     def startDocument(self, pagename):
00032         encoding = config.charset
00033         return '<?xml version="1.0" encoding="%s"?>\n<s1 title="%s">' % (
00034             encoding, self._escape(pagename))

Here is the call graph for this function:

def MoinMoin.formatter.text_xml.Formatter.strike (   self,
  on,
  kw 
)

Reimplemented from MoinMoin.formatter.FormatterBase.

Definition at line 136 of file text_xml.py.

00136 
00137     def strike(self, on, **kw):
00138         return ['<strike>', '</strike>'][not on]

def MoinMoin.formatter.text_xml.Formatter.strong (   self,
  on,
  kw 
)

Reimplemented from MoinMoin.formatter.FormatterBase.

Definition at line 97 of file text_xml.py.

00097 
00098     def strong(self, on, **kw):
00099         return ['<strong>', '</strong>'][not on]

def MoinMoin.formatter.text_xml.Formatter.sub (   self,
  on,
  kw 
)

Reimplemented from MoinMoin.formatter.FormatterBase.

Definition at line 133 of file text_xml.py.

00133 
00134     def sub(self, on, **kw):
00135         return ['<sub>', '</sub>'][not on]

def MoinMoin.formatter.text_xml.Formatter.sup (   self,
  on,
  kw 
)

Reimplemented from MoinMoin.formatter.FormatterBase.

Definition at line 130 of file text_xml.py.

00130 
00131     def sup(self, on, **kw):
00132         return ['<sup>', '</sup>'][not on]

def MoinMoin.formatter.text_xml.Formatter.sysmsg (   self,
  on,
  kw 
)
Emit a system message (embed it into the page).

    Normally used to indicate disabled options, or invalid markup.

Reimplemented from MoinMoin.formatter.FormatterBase.

Definition at line 45 of file text_xml.py.

00045 
00046     def sysmsg(self, on, **kw):
00047         return ('<sysmsg>', '</sysmsg>')[not on]

def MoinMoin.formatter.text_xml.Formatter.table (   self,
  on,
  attrs = {},
  kw 
)

Reimplemented from MoinMoin.formatter.FormatterBase.

Definition at line 174 of file text_xml.py.

00174 
00175     def table(self, on, attrs={}, **kw):
00176         return ['<table>', '</table>'][not on]

def MoinMoin.formatter.text_xml.Formatter.table_cell (   self,
  on,
  attrs = {},
  kw 
)

Reimplemented from MoinMoin.formatter.FormatterBase.

Definition at line 180 of file text_xml.py.

00180 
00181     def table_cell(self, on, attrs={}, **kw):
00182         return ['<td>', '</td>'][not on]

def MoinMoin.formatter.text_xml.Formatter.table_row (   self,
  on,
  attrs = {},
  kw 
)

Reimplemented from MoinMoin.formatter.FormatterBase.

Definition at line 177 of file text_xml.py.

00177 
00178     def table_row(self, on, attrs={}, **kw):
00179         return ['<tr>', '</tr>'][not on]

def MoinMoin.formatter.text_xml.Formatter.text (   self,
  text,
  kw 
)

Reimplemented from MoinMoin.formatter.FormatterBase.

Definition at line 82 of file text_xml.py.

00082 
00083     def text(self, text, **kw):
00084         if self.in_pre:
00085             return text.replace(']]>', ']]>]]&gt;<![CDATA[')
00086         return self._escape(text)

Here is the call graph for this function:

def MoinMoin.formatter.text_xml.Formatter.transclusion (   self,
  on,
  kw 
)

Reimplemented from MoinMoin.formatter.FormatterBase.

Definition at line 216 of file text_xml.py.

00216 
00217     def transclusion(self, on, **kw):
00218         # TODO, see text_html formatter
00219         return ''

Reimplemented from MoinMoin.formatter.FormatterBase.

Definition at line 220 of file text_xml.py.

00220 
00221     def transclusion_param(self, **kw):
00222         # TODO, see text_html formatter
00223         return ''

def MoinMoin.formatter.text_xml.Formatter.underline (   self,
  on,
  kw 
)

Reimplemented from MoinMoin.formatter.FormatterBase.

Definition at line 193 of file text_xml.py.

00193 
00194     def underline(self, on, **kw):
00195         return self.strong(on) # no underline in StyleBook

Here is the call graph for this function:

def MoinMoin.formatter.text_xml.Formatter.url (   self,
  on,
  url = '',
  css = None,
  kw 
)

Reimplemented from MoinMoin.formatter.FormatterBase.

Definition at line 63 of file text_xml.py.

00063 
00064     def url(self, on, url='', css=None, **kw):
00065         if css:
00066             str = ' class="%s"' % css
00067         else:
00068             str = ''
00069         return ('<jump href="%s"%s>' % (self._escape(url), str), '</jump>') [not on]

Here is the call graph for this function:

Here is the caller graph for this function:


Member Data Documentation

Reimplemented from MoinMoin.formatter.FormatterBase.

Definition at line 24 of file text_xml.py.

Definition at line 23 of file text_xml.py.

Reimplemented from MoinMoin.formatter.FormatterBase.

Definition at line 19 of file text_xml.py.

Definition at line 38 of file __init__.py.

Reimplemented from MoinMoin.formatter.FormatterBase.

Definition at line 25 of file text_xml.py.

Reimplemented in MoinMoin.formatter.dom_xml.Formatter.

Definition at line 58 of file __init__.py.

Definition at line 37 of file __init__.py.


The documentation for this class was generated from the following file: