plugins/geshi/geshi/xml.php
author Dan
Sun, 10 Feb 2008 18:10:52 -0500
changeset 0 441963e5b07a
child 2 9e3258dfae15
permissions -rw-r--r--
Initial population - based on GeSHi 1.0.7.20
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
0
441963e5b07a Initial population - based on GeSHi 1.0.7.20
Dan
parents:
diff changeset
     1
<?php
441963e5b07a Initial population - based on GeSHi 1.0.7.20
Dan
parents:
diff changeset
     2
/*************************************************************************************
441963e5b07a Initial population - based on GeSHi 1.0.7.20
Dan
parents:
diff changeset
     3
 * xml.php
441963e5b07a Initial population - based on GeSHi 1.0.7.20
Dan
parents:
diff changeset
     4
 * -------
441963e5b07a Initial population - based on GeSHi 1.0.7.20
Dan
parents:
diff changeset
     5
 * Author: Nigel McNie (nigel@geshi.org)
441963e5b07a Initial population - based on GeSHi 1.0.7.20
Dan
parents:
diff changeset
     6
 * Copyright: (c) 2004 Nigel McNie (http://qbnz.com/highlighter/)
441963e5b07a Initial population - based on GeSHi 1.0.7.20
Dan
parents:
diff changeset
     7
 * Release Version: 1.0.7.20
441963e5b07a Initial population - based on GeSHi 1.0.7.20
Dan
parents:
diff changeset
     8
 * Date Started: 2004/09/01
441963e5b07a Initial population - based on GeSHi 1.0.7.20
Dan
parents:
diff changeset
     9
 *
441963e5b07a Initial population - based on GeSHi 1.0.7.20
Dan
parents:
diff changeset
    10
 * XML language file for GeSHi. Based on the idea/file by Christian Weiske
441963e5b07a Initial population - based on GeSHi 1.0.7.20
Dan
parents:
diff changeset
    11
 *
441963e5b07a Initial population - based on GeSHi 1.0.7.20
Dan
parents:
diff changeset
    12
 * CHANGES
441963e5b07a Initial population - based on GeSHi 1.0.7.20
Dan
parents:
diff changeset
    13
 * -------
441963e5b07a Initial population - based on GeSHi 1.0.7.20
Dan
parents:
diff changeset
    14
 * 2005/12/28 (1.0.2)
441963e5b07a Initial population - based on GeSHi 1.0.7.20
Dan
parents:
diff changeset
    15
 *   -  Removed escape character for strings
441963e5b07a Initial population - based on GeSHi 1.0.7.20
Dan
parents:
diff changeset
    16
 * 2004/11/27 (1.0.1)
441963e5b07a Initial population - based on GeSHi 1.0.7.20
Dan
parents:
diff changeset
    17
 *   -  Added support for multiple object splitters
441963e5b07a Initial population - based on GeSHi 1.0.7.20
Dan
parents:
diff changeset
    18
 * 2004/10/27 (1.0.0)
441963e5b07a Initial population - based on GeSHi 1.0.7.20
Dan
parents:
diff changeset
    19
 *   -  First Release
441963e5b07a Initial population - based on GeSHi 1.0.7.20
Dan
parents:
diff changeset
    20
 *
441963e5b07a Initial population - based on GeSHi 1.0.7.20
Dan
parents:
diff changeset
    21
 * TODO (updated 2004/11/27)
441963e5b07a Initial population - based on GeSHi 1.0.7.20
Dan
parents:
diff changeset
    22
 * -------------------------
441963e5b07a Initial population - based on GeSHi 1.0.7.20
Dan
parents:
diff changeset
    23
 * * Check regexps work and correctly highlight XML stuff and nothing else
441963e5b07a Initial population - based on GeSHi 1.0.7.20
Dan
parents:
diff changeset
    24
 *
441963e5b07a Initial population - based on GeSHi 1.0.7.20
Dan
parents:
diff changeset
    25
 *************************************************************************************
441963e5b07a Initial population - based on GeSHi 1.0.7.20
Dan
parents:
diff changeset
    26
 *
441963e5b07a Initial population - based on GeSHi 1.0.7.20
Dan
parents:
diff changeset
    27
 *     This file is part of GeSHi.
441963e5b07a Initial population - based on GeSHi 1.0.7.20
Dan
parents:
diff changeset
    28
 *
441963e5b07a Initial population - based on GeSHi 1.0.7.20
Dan
parents:
diff changeset
    29
 *   GeSHi is free software; you can redistribute it and/or modify
441963e5b07a Initial population - based on GeSHi 1.0.7.20
Dan
parents:
diff changeset
    30
 *   it under the terms of the GNU General Public License as published by
441963e5b07a Initial population - based on GeSHi 1.0.7.20
Dan
parents:
diff changeset
    31
 *   the Free Software Foundation; either version 2 of the License, or
441963e5b07a Initial population - based on GeSHi 1.0.7.20
Dan
parents:
diff changeset
    32
 *   (at your option) any later version.
441963e5b07a Initial population - based on GeSHi 1.0.7.20
Dan
parents:
diff changeset
    33
 *
441963e5b07a Initial population - based on GeSHi 1.0.7.20
Dan
parents:
diff changeset
    34
 *   GeSHi is distributed in the hope that it will be useful,
441963e5b07a Initial population - based on GeSHi 1.0.7.20
Dan
parents:
diff changeset
    35
 *   but WITHOUT ANY WARRANTY; without even the implied warranty of
441963e5b07a Initial population - based on GeSHi 1.0.7.20
Dan
parents:
diff changeset
    36
 *   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
441963e5b07a Initial population - based on GeSHi 1.0.7.20
Dan
parents:
diff changeset
    37
 *   GNU General Public License for more details.
441963e5b07a Initial population - based on GeSHi 1.0.7.20
Dan
parents:
diff changeset
    38
 *
441963e5b07a Initial population - based on GeSHi 1.0.7.20
Dan
parents:
diff changeset
    39
 *   You should have received a copy of the GNU General Public License
441963e5b07a Initial population - based on GeSHi 1.0.7.20
Dan
parents:
diff changeset
    40
 *   along with GeSHi; if not, write to the Free Software
441963e5b07a Initial population - based on GeSHi 1.0.7.20
Dan
parents:
diff changeset
    41
 *   Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
441963e5b07a Initial population - based on GeSHi 1.0.7.20
Dan
parents:
diff changeset
    42
 *
441963e5b07a Initial population - based on GeSHi 1.0.7.20
Dan
parents:
diff changeset
    43
 ************************************************************************************/
441963e5b07a Initial population - based on GeSHi 1.0.7.20
Dan
parents:
diff changeset
    44
441963e5b07a Initial population - based on GeSHi 1.0.7.20
Dan
parents:
diff changeset
    45
$language_data = array (
441963e5b07a Initial population - based on GeSHi 1.0.7.20
Dan
parents:
diff changeset
    46
	'LANG_NAME' => 'XML',
441963e5b07a Initial population - based on GeSHi 1.0.7.20
Dan
parents:
diff changeset
    47
	'COMMENT_SINGLE' => array(),
441963e5b07a Initial population - based on GeSHi 1.0.7.20
Dan
parents:
diff changeset
    48
	'COMMENT_MULTI' => array('<!--' => '-->'),
441963e5b07a Initial population - based on GeSHi 1.0.7.20
Dan
parents:
diff changeset
    49
	'CASE_KEYWORDS' => GESHI_CAPS_NO_CHANGE,
441963e5b07a Initial population - based on GeSHi 1.0.7.20
Dan
parents:
diff changeset
    50
	'QUOTEMARKS' => array("'", '"'),
441963e5b07a Initial population - based on GeSHi 1.0.7.20
Dan
parents:
diff changeset
    51
	'ESCAPE_CHAR' => '',
441963e5b07a Initial population - based on GeSHi 1.0.7.20
Dan
parents:
diff changeset
    52
	'KEYWORDS' => array(
441963e5b07a Initial population - based on GeSHi 1.0.7.20
Dan
parents:
diff changeset
    53
		),
441963e5b07a Initial population - based on GeSHi 1.0.7.20
Dan
parents:
diff changeset
    54
	'SYMBOLS' => array(
441963e5b07a Initial population - based on GeSHi 1.0.7.20
Dan
parents:
diff changeset
    55
		),
441963e5b07a Initial population - based on GeSHi 1.0.7.20
Dan
parents:
diff changeset
    56
	'CASE_SENSITIVE' => array(
441963e5b07a Initial population - based on GeSHi 1.0.7.20
Dan
parents:
diff changeset
    57
		GESHI_COMMENTS => false,
441963e5b07a Initial population - based on GeSHi 1.0.7.20
Dan
parents:
diff changeset
    58
		),
441963e5b07a Initial population - based on GeSHi 1.0.7.20
Dan
parents:
diff changeset
    59
	'STYLES' => array(
441963e5b07a Initial population - based on GeSHi 1.0.7.20
Dan
parents:
diff changeset
    60
		'KEYWORDS' => array(
441963e5b07a Initial population - based on GeSHi 1.0.7.20
Dan
parents:
diff changeset
    61
			),
441963e5b07a Initial population - based on GeSHi 1.0.7.20
Dan
parents:
diff changeset
    62
		'COMMENTS' => array(
441963e5b07a Initial population - based on GeSHi 1.0.7.20
Dan
parents:
diff changeset
    63
			'MULTI' => 'color: #808080; font-style: italic;'
441963e5b07a Initial population - based on GeSHi 1.0.7.20
Dan
parents:
diff changeset
    64
			),
441963e5b07a Initial population - based on GeSHi 1.0.7.20
Dan
parents:
diff changeset
    65
		'ESCAPE_CHAR' => array(
441963e5b07a Initial population - based on GeSHi 1.0.7.20
Dan
parents:
diff changeset
    66
			0 => 'color: #000099; font-weight: bold;'
441963e5b07a Initial population - based on GeSHi 1.0.7.20
Dan
parents:
diff changeset
    67
			),
441963e5b07a Initial population - based on GeSHi 1.0.7.20
Dan
parents:
diff changeset
    68
		'BRACKETS' => array(
441963e5b07a Initial population - based on GeSHi 1.0.7.20
Dan
parents:
diff changeset
    69
			0 => 'color: #66cc66;'
441963e5b07a Initial population - based on GeSHi 1.0.7.20
Dan
parents:
diff changeset
    70
			),
441963e5b07a Initial population - based on GeSHi 1.0.7.20
Dan
parents:
diff changeset
    71
		'STRINGS' => array(
441963e5b07a Initial population - based on GeSHi 1.0.7.20
Dan
parents:
diff changeset
    72
			0 => 'color: #ff0000;'
441963e5b07a Initial population - based on GeSHi 1.0.7.20
Dan
parents:
diff changeset
    73
			),
441963e5b07a Initial population - based on GeSHi 1.0.7.20
Dan
parents:
diff changeset
    74
		'NUMBERS' => array(
441963e5b07a Initial population - based on GeSHi 1.0.7.20
Dan
parents:
diff changeset
    75
			0 => 'color: #cc66cc;'
441963e5b07a Initial population - based on GeSHi 1.0.7.20
Dan
parents:
diff changeset
    76
			),
441963e5b07a Initial population - based on GeSHi 1.0.7.20
Dan
parents:
diff changeset
    77
		'METHODS' => array(
441963e5b07a Initial population - based on GeSHi 1.0.7.20
Dan
parents:
diff changeset
    78
			),
441963e5b07a Initial population - based on GeSHi 1.0.7.20
Dan
parents:
diff changeset
    79
		'SYMBOLS' => array(
441963e5b07a Initial population - based on GeSHi 1.0.7.20
Dan
parents:
diff changeset
    80
			0 => 'color: #66cc66;'
441963e5b07a Initial population - based on GeSHi 1.0.7.20
Dan
parents:
diff changeset
    81
			),
441963e5b07a Initial population - based on GeSHi 1.0.7.20
Dan
parents:
diff changeset
    82
		'SCRIPT' => array(
441963e5b07a Initial population - based on GeSHi 1.0.7.20
Dan
parents:
diff changeset
    83
			0 => 'color: #00bbdd;',
441963e5b07a Initial population - based on GeSHi 1.0.7.20
Dan
parents:
diff changeset
    84
			1 => 'color: #ddbb00;',
441963e5b07a Initial population - based on GeSHi 1.0.7.20
Dan
parents:
diff changeset
    85
			2 => 'color: #339933;',
441963e5b07a Initial population - based on GeSHi 1.0.7.20
Dan
parents:
diff changeset
    86
			3 => 'color: #009900;'
441963e5b07a Initial population - based on GeSHi 1.0.7.20
Dan
parents:
diff changeset
    87
			),
441963e5b07a Initial population - based on GeSHi 1.0.7.20
Dan
parents:
diff changeset
    88
		'REGEXPS' => array(
441963e5b07a Initial population - based on GeSHi 1.0.7.20
Dan
parents:
diff changeset
    89
			0 => 'color: #000066;',
441963e5b07a Initial population - based on GeSHi 1.0.7.20
Dan
parents:
diff changeset
    90
			1 => 'font-weight: bold; color: black;',
441963e5b07a Initial population - based on GeSHi 1.0.7.20
Dan
parents:
diff changeset
    91
			2 => 'font-weight: bold; color: black;',
441963e5b07a Initial population - based on GeSHi 1.0.7.20
Dan
parents:
diff changeset
    92
			)
441963e5b07a Initial population - based on GeSHi 1.0.7.20
Dan
parents:
diff changeset
    93
		),
441963e5b07a Initial population - based on GeSHi 1.0.7.20
Dan
parents:
diff changeset
    94
	'URLS' => array(
441963e5b07a Initial population - based on GeSHi 1.0.7.20
Dan
parents:
diff changeset
    95
		),
441963e5b07a Initial population - based on GeSHi 1.0.7.20
Dan
parents:
diff changeset
    96
	'OOLANG' => false,
441963e5b07a Initial population - based on GeSHi 1.0.7.20
Dan
parents:
diff changeset
    97
	'OBJECT_SPLITTERS' => array(
441963e5b07a Initial population - based on GeSHi 1.0.7.20
Dan
parents:
diff changeset
    98
		),
441963e5b07a Initial population - based on GeSHi 1.0.7.20
Dan
parents:
diff changeset
    99
	'REGEXPS' => array(
441963e5b07a Initial population - based on GeSHi 1.0.7.20
Dan
parents:
diff changeset
   100
		0 => array(
441963e5b07a Initial population - based on GeSHi 1.0.7.20
Dan
parents:
diff changeset
   101
			GESHI_SEARCH => '([a-z_\-:]+)(=)',
441963e5b07a Initial population - based on GeSHi 1.0.7.20
Dan
parents:
diff changeset
   102
			GESHI_REPLACE => '\\1',
441963e5b07a Initial population - based on GeSHi 1.0.7.20
Dan
parents:
diff changeset
   103
			GESHI_MODIFIERS => 'i',
441963e5b07a Initial population - based on GeSHi 1.0.7.20
Dan
parents:
diff changeset
   104
			GESHI_BEFORE => '',
441963e5b07a Initial population - based on GeSHi 1.0.7.20
Dan
parents:
diff changeset
   105
			GESHI_AFTER => '\\2'
441963e5b07a Initial population - based on GeSHi 1.0.7.20
Dan
parents:
diff changeset
   106
			),
441963e5b07a Initial population - based on GeSHi 1.0.7.20
Dan
parents:
diff changeset
   107
		1 => array(
441963e5b07a Initial population - based on GeSHi 1.0.7.20
Dan
parents:
diff changeset
   108
			GESHI_SEARCH => '(&lt;[/?|(\?xml)]?[a-z0-9_\-:]*(\??&gt;)?)',
441963e5b07a Initial population - based on GeSHi 1.0.7.20
Dan
parents:
diff changeset
   109
			GESHI_REPLACE => '\\1',
441963e5b07a Initial population - based on GeSHi 1.0.7.20
Dan
parents:
diff changeset
   110
			GESHI_MODIFIERS => 'i',
441963e5b07a Initial population - based on GeSHi 1.0.7.20
Dan
parents:
diff changeset
   111
			GESHI_BEFORE => '',
441963e5b07a Initial population - based on GeSHi 1.0.7.20
Dan
parents:
diff changeset
   112
			GESHI_AFTER => ''
441963e5b07a Initial population - based on GeSHi 1.0.7.20
Dan
parents:
diff changeset
   113
			),
441963e5b07a Initial population - based on GeSHi 1.0.7.20
Dan
parents:
diff changeset
   114
		2 => array(
441963e5b07a Initial population - based on GeSHi 1.0.7.20
Dan
parents:
diff changeset
   115
			GESHI_SEARCH => '(([/|\?])?&gt;)',
441963e5b07a Initial population - based on GeSHi 1.0.7.20
Dan
parents:
diff changeset
   116
			GESHI_REPLACE => '\\1',
441963e5b07a Initial population - based on GeSHi 1.0.7.20
Dan
parents:
diff changeset
   117
			GESHI_MODIFIERS => 'i',
441963e5b07a Initial population - based on GeSHi 1.0.7.20
Dan
parents:
diff changeset
   118
			GESHI_BEFORE => '',
441963e5b07a Initial population - based on GeSHi 1.0.7.20
Dan
parents:
diff changeset
   119
			GESHI_AFTER => ''
441963e5b07a Initial population - based on GeSHi 1.0.7.20
Dan
parents:
diff changeset
   120
			)
441963e5b07a Initial population - based on GeSHi 1.0.7.20
Dan
parents:
diff changeset
   121
		),
441963e5b07a Initial population - based on GeSHi 1.0.7.20
Dan
parents:
diff changeset
   122
	'STRICT_MODE_APPLIES' => GESHI_ALWAYS,
441963e5b07a Initial population - based on GeSHi 1.0.7.20
Dan
parents:
diff changeset
   123
	'SCRIPT_DELIMITERS' => array(
441963e5b07a Initial population - based on GeSHi 1.0.7.20
Dan
parents:
diff changeset
   124
		0 => array(
441963e5b07a Initial population - based on GeSHi 1.0.7.20
Dan
parents:
diff changeset
   125
			'<!DOCTYPE' => '>'
441963e5b07a Initial population - based on GeSHi 1.0.7.20
Dan
parents:
diff changeset
   126
			),
441963e5b07a Initial population - based on GeSHi 1.0.7.20
Dan
parents:
diff changeset
   127
		1 => array(
441963e5b07a Initial population - based on GeSHi 1.0.7.20
Dan
parents:
diff changeset
   128
			'&' => ';'
441963e5b07a Initial population - based on GeSHi 1.0.7.20
Dan
parents:
diff changeset
   129
			),
441963e5b07a Initial population - based on GeSHi 1.0.7.20
Dan
parents:
diff changeset
   130
		2 => array(
441963e5b07a Initial population - based on GeSHi 1.0.7.20
Dan
parents:
diff changeset
   131
			'<![CDATA[' => ']]>'
441963e5b07a Initial population - based on GeSHi 1.0.7.20
Dan
parents:
diff changeset
   132
			),
441963e5b07a Initial population - based on GeSHi 1.0.7.20
Dan
parents:
diff changeset
   133
		3 => array(
441963e5b07a Initial population - based on GeSHi 1.0.7.20
Dan
parents:
diff changeset
   134
			'<' => '>'
441963e5b07a Initial population - based on GeSHi 1.0.7.20
Dan
parents:
diff changeset
   135
			)
441963e5b07a Initial population - based on GeSHi 1.0.7.20
Dan
parents:
diff changeset
   136
	),
441963e5b07a Initial population - based on GeSHi 1.0.7.20
Dan
parents:
diff changeset
   137
	'HIGHLIGHT_STRICT_BLOCK' => array(
441963e5b07a Initial population - based on GeSHi 1.0.7.20
Dan
parents:
diff changeset
   138
		0 => false,
441963e5b07a Initial population - based on GeSHi 1.0.7.20
Dan
parents:
diff changeset
   139
		1 => false,
441963e5b07a Initial population - based on GeSHi 1.0.7.20
Dan
parents:
diff changeset
   140
		2 => false,
441963e5b07a Initial population - based on GeSHi 1.0.7.20
Dan
parents:
diff changeset
   141
		3 => true
441963e5b07a Initial population - based on GeSHi 1.0.7.20
Dan
parents:
diff changeset
   142
        ),
441963e5b07a Initial population - based on GeSHi 1.0.7.20
Dan
parents:
diff changeset
   143
    'TAB_WIDTH' => 4
441963e5b07a Initial population - based on GeSHi 1.0.7.20
Dan
parents:
diff changeset
   144
);
441963e5b07a Initial population - based on GeSHi 1.0.7.20
Dan
parents:
diff changeset
   145
441963e5b07a Initial population - based on GeSHi 1.0.7.20
Dan
parents:
diff changeset
   146
?>