Back to index

moin  1.9.0~rc2
Public Member Functions | Static Public Attributes Class Reference
Inheritance diagram for
Inheritance graph
Collaboration diagram for
Collaboration graph

List of all members.

Public Member Functions

def analyse_text

Static Public Attributes

 flags = re.MULTILINE|re.DOTALL
string name = 'XML'
list aliases = ['xml']
list filenames = ['*.xml', '*.xsl', '*.rss', '*.xslt', '*.xsd', '*.wsdl']
list mimetypes
dictionary tokens

Detailed Description

Generic lexer for XML (eXtensible Markup Language).

Definition at line 599 of file

Member Function Documentation

Reimplemented in

Definition at line 642 of file

00643     def analyse_text(text):
00644         if looks_like_xml(text):
00645             return 0.5

Member Data Documentation

Reimplemented in

Definition at line 607 of file

list = ['*.xml', '*.xsl', '*.rss', '*.xslt', '*.xsd', '*.wsdl'] [static]

Reimplemented in

Definition at line 608 of file = re.MULTILINE|re.DOTALL [static]

Definition at line 604 of file

Initial value:
['text/xml', 'application/xml', 'image/svg+xml',
                 'application/rss+xml', 'application/atom+xml',
                 'application/xsl+xml', 'application/xslt+xml']

Definition at line 609 of file

Reimplemented in

Definition at line 606 of file

Initial value:
        'root': [
            ('[^<&]+', Text),
            (r'&\S*?;', Name.Entity),
            (r'<\!\[CDATA\[.*?\]\]>', Comment.Preproc),
            ('<!--', Comment, 'comment'),
            (r'<\?.*?\?>', Comment.Preproc),
            ('<![^>]*>', Comment.Preproc),
            (r'<\s*[a-zA-Z0-9:._-]+', Name.Tag, 'tag'),
            (r'<\s*/\s*[a-zA-Z0-9:._-]+\s*>', Name.Tag),
        'comment': [
            ('[^-]+', Comment),
            ('-->', Comment, '#pop'),
            ('-', Comment),
        'tag': [
            (r'\s+', Text),
            (r'[a-zA-Z0-9_.:-]+\s*=', Name.Attribute, 'attr'),
            (r'/?\s*>', Name.Tag, '#pop'),
        'attr': [
            ('\s+', Text),
            ('".*?"', String, '#pop'),
            ("'.*?'", String, '#pop'),
            (r'[^\s>]+', String, '#pop'),

Definition at line 613 of file

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