PageRenderTime 125ms CodeModel.GetById 118ms app.highlight 3ms RepoModel.GetById 1ms app.codeStats 0ms

/jEdit/tags/jedit-4-2-pre14/modes/zpt.xml

#
XML | 162 lines | 141 code | 9 blank | 12 comment | 0 complexity | 40dcb8f95dff0b45f97fcc892290a685 MD5 | raw file
  1<?xml version="1.0"?>
  2
  3<!DOCTYPE MODE SYSTEM "xmode.dtd">
  4
  5<!--
  6<MODE NAME="zpt"			FILE="zpt.xml"
  7				FILE_NAME_GLOB="*.{pt,zpt}"/>
  8-->
  9
 10<MODE>
 11	<PROPS>
 12		<PROPERTY NAME="commentStart" VALUE="&lt;!--" />
 13		<PROPERTY NAME="commentEnd" VALUE="--&gt;" />
 14	</PROPS>
 15	<RULES IGNORE_CASE="TRUE">
 16		<!-- SGML comment -->
 17		<SPAN TYPE="COMMENT1">
 18			<BEGIN>&lt;!--</BEGIN>
 19			<END>--&gt;</END>
 20		</SPAN>
 21
 22		<!-- JavaScript -->
 23		<SPAN TYPE="MARKUP" DELEGATE="JAVASCRIPT">
 24			<BEGIN>&lt;SCRIPT</BEGIN>
 25			<END>&lt;/SCRIPT&gt;</END>
 26		</SPAN>
 27
 28		<!-- stylesheet -->
 29		<SPAN TYPE="MARKUP" DELEGATE="CSS">
 30			<BEGIN>&lt;STYLE</BEGIN>
 31			<END>&lt;/STYLE&gt;</END>
 32		</SPAN>
 33
 34		<!-- DTD instructions -->
 35		<SPAN TYPE="KEYWORD2" DELEGATE="xml::DTD-TAGS">
 36			<BEGIN>&lt;!</BEGIN>
 37			<END>&gt;</END>
 38		</SPAN>
 39
 40		<!-- markup tags -->
 41		<SPAN TYPE="MARKUP" DELEGATE="TAGS">
 42			<BEGIN>&lt;</BEGIN>
 43			<END>&gt;</END>
 44		</SPAN>
 45
 46		<!-- SGML entities -->
 47		<SPAN TYPE="LITERAL2" NO_WORD_BREAK="TRUE">
 48			<BEGIN>&amp;</BEGIN>
 49			<END>;</END>
 50		</SPAN>
 51	</RULES>
 52
 53	<!-- ESCAPE is not exactly right but it is needed to correctly
 54	     handle JavaScript in on* parameters -->
 55	<RULES SET="TAGS" DEFAULT="MARKUP" ESCAPE="\">
 56		<SPAN TYPE="LITERAL1" DELEGATE="ATTRIBUTE">
 57			<BEGIN>"</BEGIN>
 58			<END>"</END>
 59		</SPAN>
 60
 61		<SPAN TYPE="LITERAL1" DELEGATE="ATTRIBUTE">
 62			<BEGIN>'</BEGIN>
 63			<END>'</END>
 64		</SPAN>
 65
 66		<SEQ TYPE="OPERATOR">=</SEQ>
 67
 68		<KEYWORDS>
 69			<!-- TAL -->
 70			<KEYWORD1>tal</KEYWORD1>
 71			<KEYWORD3>attributes</KEYWORD3>
 72			<KEYWORD3>define</KEYWORD3>
 73			<KEYWORD3>condition</KEYWORD3>
 74			<KEYWORD3>content</KEYWORD3>
 75			<KEYWORD3>omit-tag</KEYWORD3>
 76			<KEYWORD3>on-error</KEYWORD3>
 77			<KEYWORD3>repeat</KEYWORD3>
 78			<KEYWORD3>replace</KEYWORD3>
 79
 80			<!-- METAL -->
 81			<KEYWORD1>metal</KEYWORD1>
 82			<KEYWORD3>define-macro</KEYWORD3>
 83			<KEYWORD3>define-slot</KEYWORD3>
 84			<KEYWORD3>fill-slot</KEYWORD3>
 85			<KEYWORD3>use-macro</KEYWORD3>
 86		</KEYWORDS>
 87	</RULES>
 88
 89	<RULES SET="ATTRIBUTE" DEFAULT="LITERAL1">
 90		<SEQ TYPE="OPERATOR">:</SEQ>
 91		<SEQ TYPE="OPERATOR">;</SEQ>
 92		<SEQ TYPE="OPERATOR">?</SEQ>
 93		<SEQ TYPE="OPERATOR">|</SEQ>
 94		<SEQ TYPE="LITERAL2">$$</SEQ>
 95
 96		<SPAN TYPE="KEYWORD2" NO_LINE_BREAK="TRUE">
 97			<BEGIN>${</BEGIN>
 98			<END>}</END>
 99		</SPAN>
100		<MARK_FOLLOWING TYPE="KEYWORD2">$</MARK_FOLLOWING>
101		<!-- highligh python expressions -->
102		<!--
103		<SEQ TYPE="LITERAL2" DELEGATE="python::MAIN"
104			AT_LINE_START="FALSE">python:</SEQ>
105		-->
106		<KEYWORDS>
107			<!-- TALES expression types -->
108			<KEYWORD4>exists</KEYWORD4>
109			<KEYWORD4>nocall</KEYWORD4>
110			<KEYWORD4>not</KEYWORD4>
111			<KEYWORD4>path</KEYWORD4>
112			<KEYWORD4>python</KEYWORD4>
113			<KEYWORD4>string</KEYWORD4>
114
115			<!-- built-in TALES variables -->
116			<!-- NOTE: root, here, container, template, 
117			     request, user, and modules are optional -->
118			<LITERAL3>CONTEXTS</LITERAL3>
119			<LITERAL3>attrs</LITERAL3>
120			<LITERAL3>container</LITERAL3>
121			<LITERAL3>default</LITERAL3>
122			<LITERAL3>here</LITERAL3>
123			<LITERAL3>modules</LITERAL3>
124			<LITERAL3>nothing</LITERAL3>
125			<LITERAL3>options</LITERAL3>
126			<LITERAL3>repeat</LITERAL3>
127			<LITERAL3>request</LITERAL3>
128			<LITERAL3>root</LITERAL3>
129			<LITERAL3>template</LITERAL3>
130			<LITERAL3>user</LITERAL3>
131
132			<!-- repeat variable attributes -->
133			<LITERAL3>index</LITERAL3>
134			<LITERAL3>number</LITERAL3>
135			<LITERAL3>even</LITERAL3>
136			<LITERAL3>odd</LITERAL3>
137			<LITERAL3>start</LITERAL3>
138			<LITERAL3>end</LITERAL3>
139			<LITERAL3>first</LITERAL3>
140			<LITERAL3>last</LITERAL3>
141			<LITERAL3>length</LITERAL3>
142			<LITERAL3>letter</LITERAL3>
143			<LITERAL3>Letter</LITERAL3>
144			<LITERAL3>roman</LITERAL3>
145			<LITERAL3>Roman</LITERAL3>
146		</KEYWORDS>
147	</RULES>
148
149	<RULES SET="JAVASCRIPT" DEFAULT="MARKUP" IGNORE_CASE="TRUE">
150		<SEQ TYPE="MARKUP" DELEGATE="javascript::MAIN">&gt;</SEQ>
151		<SEQ TYPE="MARKUP" DELEGATE="BACK_TO_HTML">SRC=</SEQ>
152	</RULES>
153
154	<RULES SET="BACK_TO_HTML" DEFAULT="MARKUP">
155		<SEQ TYPE="MARKUP" DELEGATE="zpt::MAIN">&gt;</SEQ>
156	</RULES>
157
158	<RULES SET="CSS" DEFAULT="MARKUP">
159		<SEQ TYPE="MARKUP" DELEGATE="css::MAIN">&gt;</SEQ>
160	</RULES>
161</MODE>
162