PageRenderTime 124ms CodeModel.GetById 121ms app.highlight 2ms RepoModel.GetById 0ms app.codeStats 0ms

/jEdit/tags/jedit-4-3-pre5/modes/zpt.xml

#
XML | 173 lines | 152 code | 9 blank | 12 comment | 0 complexity | b09b67295e7c2c99624543d28314fd6a 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="LITERAL4">
 97			<BEGIN>"</BEGIN>
 98			<END>"</END>
 99		</SPAN>
100
101		<SPAN TYPE="LITERAL4">
102			<BEGIN>'</BEGIN>
103			<END>'</END>
104		</SPAN>
105
106		<SPAN TYPE="KEYWORD2" NO_LINE_BREAK="TRUE">
107			<BEGIN>${</BEGIN>
108			<END>}</END>
109		</SPAN>
110		<MARK_FOLLOWING TYPE="KEYWORD2">$</MARK_FOLLOWING>
111		<!-- highligh python expressions -->
112		<!--
113		<SEQ TYPE="LITERAL2" DELEGATE="python::MAIN"
114			AT_LINE_START="FALSE">python:</SEQ>
115		-->
116		<KEYWORDS>
117			<!-- TALES expression types -->
118			<KEYWORD4>exists</KEYWORD4>
119			<KEYWORD4>nocall</KEYWORD4>
120			<KEYWORD4>not</KEYWORD4>
121			<KEYWORD4>path</KEYWORD4>
122			<KEYWORD4>python</KEYWORD4>
123			<KEYWORD4>string</KEYWORD4>
124			<KEYWORD4>structure</KEYWORD4>
125
126			<!-- built-in TALES variables -->
127			<!-- NOTE: root, here, container, template, 
128			     request, user, and modules are optional -->
129			<LITERAL3>CONTEXTS</LITERAL3>
130			<LITERAL3>attrs</LITERAL3>
131			<LITERAL3>container</LITERAL3>
132			<LITERAL3>default</LITERAL3>
133			<LITERAL3>here</LITERAL3>
134			<LITERAL3>modules</LITERAL3>
135			<LITERAL3>nothing</LITERAL3>
136			<LITERAL3>options</LITERAL3>
137			<LITERAL3>repeat</LITERAL3>
138			<LITERAL3>request</LITERAL3>
139			<LITERAL3>root</LITERAL3>
140			<LITERAL3>template</LITERAL3>
141			<LITERAL3>user</LITERAL3>
142
143			<!-- repeat variable attributes -->
144			<LITERAL3>index</LITERAL3>
145			<LITERAL3>number</LITERAL3>
146			<LITERAL3>even</LITERAL3>
147			<LITERAL3>odd</LITERAL3>
148			<LITERAL3>start</LITERAL3>
149			<LITERAL3>end</LITERAL3>
150			<LITERAL3>first</LITERAL3>
151			<LITERAL3>last</LITERAL3>
152			<LITERAL3>length</LITERAL3>
153			<LITERAL3>letter</LITERAL3>
154			<LITERAL3>Letter</LITERAL3>
155			<LITERAL3>roman</LITERAL3>
156			<LITERAL3>Roman</LITERAL3>
157		</KEYWORDS>
158	</RULES>
159
160	<RULES SET="JAVASCRIPT" DEFAULT="MARKUP" IGNORE_CASE="TRUE">
161		<SEQ TYPE="MARKUP" DELEGATE="javascript::MAIN">&gt;</SEQ>
162		<SEQ TYPE="MARKUP" DELEGATE="BACK_TO_HTML">SRC=</SEQ>
163	</RULES>
164
165	<RULES SET="BACK_TO_HTML" DEFAULT="MARKUP">
166		<SEQ TYPE="MARKUP" DELEGATE="zpt::MAIN">&gt;</SEQ>
167	</RULES>
168
169	<RULES SET="CSS" DEFAULT="MARKUP">
170		<SEQ TYPE="MARKUP" DELEGATE="css::MAIN">&gt;</SEQ>
171	</RULES>
172</MODE>
173