KXStudio Website https://kx.studio/
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

158 lines
4.6KB

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