Back to index

moin  1.9.0~rc2
Public Member Functions | Static Public Attributes
MoinMoin.support.pygments.lexers.web.XmlLexer Class Reference
Inheritance diagram for MoinMoin.support.pygments.lexers.web.XmlLexer:
Inheritance graph
[legend]
Collaboration diagram for MoinMoin.support.pygments.lexers.web.XmlLexer:
Collaboration graph
[legend]

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 web.py.


Member Function Documentation

Reimplemented in MoinMoin.support.pygments.lexers.web.XsltLexer.

Definition at line 642 of file web.py.

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


Member Data Documentation

Reimplemented in MoinMoin.support.pygments.lexers.web.XsltLexer.

Definition at line 607 of file web.py.

list MoinMoin.support.pygments.lexers.web.XmlLexer.filenames = ['*.xml', '*.xsl', '*.rss', '*.xslt', '*.xsd', '*.wsdl'] [static]

Reimplemented in MoinMoin.support.pygments.lexers.web.XsltLexer.

Definition at line 608 of file web.py.

MoinMoin.support.pygments.lexers.web.XmlLexer.flags = re.MULTILINE|re.DOTALL [static]

Definition at line 604 of file web.py.

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 web.py.

Reimplemented in MoinMoin.support.pygments.lexers.web.XsltLexer.

Definition at line 606 of file web.py.

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 web.py.


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