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 get_tokens_unprocessed
def analyse_text

Static Public Attributes

string name = 'XSLT'
list aliases = ['xslt']
list filenames = ['*.xsl', '*.xslt']
 flags = re.MULTILINE|re.DOTALL
list mimetypes
dictionary tokens

Detailed Description

A lexer for XSLT.

*New in Pygments 0.10.*

Definition at line 647 of file

Member Function Documentation

Reimplemented from

Definition at line 678 of file

00679     def analyse_text(text):
00680         if looks_like_xml(text) and '<xsl' in text:
00681             return 0.8

Definition at line 669 of file

00670     def get_tokens_unprocessed(self, text):
00671         for index, token, value in XmlLexer.get_tokens_unprocessed(self, text):
00672             m = re.match('</?xsl:([^>]*)/?>?', value)
00674             if token is Name.Tag and m and in self.EXTRA_KEYWORDS:
00675                 yield index, Keyword, value
00676             else:
00677                 yield index, token, value

Here is the caller graph for this function:

Member Data Documentation

Reimplemented from

Definition at line 655 of file

Initial value:
        'apply-imports', 'apply-templates', 'attribute',
        'attribute-set', 'call-template', 'choose', 'comment',
        'copy', 'copy-of', 'decimal-format', 'element', 'fallback',
        'for-each', 'if', 'import', 'include', 'key', 'message',
        'namespace-alias', 'number', 'otherwise', 'output', 'param',
        'preserve-space', 'processing-instruction', 'sort',
        'strip-space', 'stylesheet', 'template', 'text', 'transform',
        'value-of', 'variable', 'when', 'with-param'

Definition at line 658 of file

list = ['*.xsl', '*.xslt'] [static]

Reimplemented from

Definition at line 656 of file = re.MULTILINE|re.DOTALL [static, inherited]

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 from

Definition at line 654 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: