<?xml version="1.0"?>

<!DOCTYPE MODE SYSTEM "xmode.dtd">

<MODE>
	<PROPS>
		<PROPERTY NAME="commentStart" VALUE="&lt;!--" />
		<PROPERTY NAME="commentEnd" VALUE="--&gt;" />
		<PROPERTY NAME="indentNextLines" VALUE="\s*[^#]{3,}:\s*(#.*)?" />
	</PROPS>

	<RULES IGNORE_CASE="TRUE">

		<SPAN TYPE="LITERAL4" DELEGATE="DIRECTIVE">
			<BEGIN>&lt;%@</BEGIN>
			<END>%&gt;</END>
		</SPAN>

		<!-- PSP comment -->
		<SPAN TYPE="COMMENT2">
			<BEGIN>&lt;%--</BEGIN>
			<END>--%&gt;</END>
		</SPAN>

		<!-- inline Python code -->
		<SPAN TYPE="LITERAL3" DELEGATE="python::MAIN">
			<BEGIN>&lt;%</BEGIN>
			<END>%&gt;</END>
		</SPAN>

		<!-- Client-side javascript -->
		<SPAN TYPE="MARKUP" DELEGATE="javascript::MAIN">
			<BEGIN>&lt;script language="jscript"&gt;</BEGIN>
			<END>&lt;/script&gt;</END>
		</SPAN>

		<SPAN TYPE="MARKUP" DELEGATE="javascript::MAIN">
			<BEGIN>&lt;script language="javascript"&gt;</BEGIN>
			<END>&lt;/script&gt;</END>
		</SPAN>

		<SPAN TYPE="MARKUP" DELEGATE="javascript::MAIN">
			<BEGIN>&lt;script&gt;</BEGIN>
			<END>&lt;/script&gt;</END>
		</SPAN>

		<!-- Server-Side include -->
		<SPAN TYPE="MARKUP">
			<BEGIN>&lt;!--#</BEGIN>
			<END>--&gt;</END>
		</SPAN>

		<!-- SGML comment -->
		<SPAN TYPE="COMMENT1">
			<BEGIN>&lt;!--</BEGIN>
			<END>--&gt;</END>
		</SPAN>

		<!-- stylesheet -->
		<SPAN TYPE="MARKUP" DELEGATE="css::MAIN">
			<BEGIN>&lt;STYLE&gt;</BEGIN>
			<END>&lt;/STYLE&gt;</END>
		</SPAN>

		<!-- markup tags -->
		<SPAN TYPE="MARKUP" DELEGATE="TAGS">
			<BEGIN>&lt;</BEGIN>
			<END>&gt;</END>
		</SPAN>

		<!-- SGML entities -->
		<SPAN TYPE="LITERAL2" NO_WORD_BREAK="TRUE">
			<BEGIN>&amp;</BEGIN>
			<END>;</END>
		</SPAN>

	</RULES>

	<!-- ESCAPE is not exactly right but it is needed to correctly
	     handle JavaScript in on* parameters -->
	<RULES SET="TAGS" DEFAULT="MARKUP">
		<SPAN TYPE="LITERAL1" ESCAPE="\">
			<BEGIN>"</BEGIN>
			<END>"</END>
		</SPAN>

		<SPAN TYPE="LITERAL1" ESCAPE="\">
			<BEGIN>'</BEGIN>
			<END>'</END>
		</SPAN>

		<SEQ TYPE="OPERATOR">=</SEQ>

		<!-- PSP comment -->
		<SPAN TYPE="COMMENT2">
			<BEGIN>&lt;%--</BEGIN>
			<END>--%&gt;</END>
		</SPAN>

		<SPAN TYPE="LITERAL3" DELEGATE="python::MAIN">
			<BEGIN>&lt;%</BEGIN>
			<END>%&gt;</END>
		</SPAN>
	</RULES>

	<RULES SET="DIRECTIVE" DEFAULT="LITERAL4">

		<SPAN TYPE="LITERAL1">
			<BEGIN>"</BEGIN>
			<END>"</END>
		</SPAN>

		<SPAN TYPE="LITERAL1">
			<BEGIN>'</BEGIN>
			<END>'</END>
		</SPAN>

		<SEQ TYPE="OPERATOR">=</SEQ>

		<KEYWORDS>
			<KEYWORD4>include</KEYWORD4>

			<KEYWORD4>file</KEYWORD4>
		</KEYWORDS>
	</RULES>
</MODE>
