<SyntaxLanguage Key="HTML" LanguageDefinitionVersion="4.0" Secure="True" 
				SyntaxLanguageTypeName="CodeHighlighterTest.HtmlDynamicSyntaxLanguage, CodeHighlighterTest" 
				xmlns="http://ActiproSoftware/SyntaxEditor/4.0/LanguageDefinition">

	<!-- String Properties -->
	<Properties>
		<Property Key="Creator" Value="Actipro Software LLC" />
		<Property Key="Copyright" Value="Copyright (c) 2001-2006 Actipro Software LLC.  All rights reserved." />
	</Properties>

	<!-- Triggers -->
	<Triggers>
		<KeyPressTrigger Key="TagListTrigger" Character="&lt;">
			<KeyPressTriggerValidStates>
				<KeyPressTriggerValidState State="DefaultState" />
			</KeyPressTriggerValidStates>
		</KeyPressTrigger>
		<KeyPressTrigger Key="TagAutoCompleteTrigger" Character="&gt;">
			<KeyPressTriggerValidStates>
				<KeyPressTriggerValidState State="StartTagState" />
				<KeyPressTriggerValidState State="StartTagAttributeState" />
				<KeyPressTriggerValidState State="StartTagAttributeValueState" />
			</KeyPressTriggerValidStates>
		</KeyPressTrigger>
		<KeyPressTrigger Key="TagAttributeListTrigger" Character=" ">
			<KeyPressTriggerValidStates>
				<KeyPressTriggerValidState State="StartTagState" />
				<KeyPressTriggerValidState State="StartTagAttributeState" />				
				<KeyPressTriggerValidState State="StartTagAttributeValueState" />				
			</KeyPressTriggerValidStates>
		</KeyPressTrigger>
		<KeyPressTrigger Key="TagAttributeValueListTrigger" Character="=">
			<KeyPressTriggerValidStates>
				<KeyPressTriggerValidState State="StartTagAttributeState" />
			</KeyPressTriggerValidStates>
		</KeyPressTrigger>
	</Triggers>

	<!-- Highlighting Styles -->	
	<Styles>
		<Style Key="DefaultStyle" ForeColor="Black" />
		<Style Key="EntityStyle" ForeColor="Red" />
		<Style Key="TagDelimiterStyle" ForeColor="Blue" />
		<Style Key="TagNameStyle" ForeColor="Maroon" />
		<Style Key="TagAttributeStyle" ForeColor="Red" />
		<Style Key="TagAttributeValueStyle" ForeColor="Blue" />
		<Style Key="CommentDelimiterStyle" ForeColor="Green" />
		<Style Key="CommentDefaultStyle" ForeColor="Green" />
		<Style Key="ProcessingInstructionDelimiterStyle" ForeColor="Blue" />
		<Style Key="ProcessingInstructionDefaultStyle" ForeColor="Magenta" />
		<Style Key="DeclarationDelimiterStyle" ForeColor="Blue" />
		<Style Key="DeclarationDefaultStyle" ForeColor="Magenta" />
		<Style Key="ASPDelimiterStyle" ForeColor="Black" BackColor="Yellow" />
	</Styles>

	<!-- Macros -->	
	<Macros>
		<!-- Redefine word macros to include hyphens -->
		<Macro Key="WordMacro" Value="[a-zA-Z_0-9\-]" />
		<Macro Key="NonWordMacro" Value="[^a-zA-Z_0-9\-]" />
		<!-- Tag name macro to include hyphens and colons -->
		<Macro Key="TagNameMacro" Value="[a-zA-Z_0-9\-:]" />
	</Macros>
	
	<!-- States -->
	<States>
		<!-- Text -->
		<State Key="DefaultState">
			<!-- Patterns Groups -->
			<PatternGroups>
				<!-- Entities -->
				<RegexPatternGroup TokenKey="EntityToken" Style="EntityStyle" PatternValue="&amp; {WordMacro}+ ;?" />
				<!-- Identifier -->
				<RegexPatternGroup TokenKey="IdentifierToken" PatternValue="{AlphaMacro}({WordMacro})*" />
				<!-- Whitespace -->
				<RegexPatternGroup TokenKey="WhitespaceToken" PatternValue="{WhitespaceMacro}+" IsWhitespace="True" />
			</PatternGroups>
			<!-- Child States -->
			<ChildStates>
				<ChildState Key="EndTagState" />
				<ChildState Key="CommentState" />
				<ChildState Key="DeclarationState" />
				<ChildState Key="ProcessingInstructionState" />
				<ChildState Key="ASPDirectiveResponseWriteState" />
				<ChildState Key="ASPDirectiveCodeState" />
				<ChildState Key="StyleStartTagState" />
				<ChildState Key="VBScriptStartTagState" />
				<ChildState Key="JScriptStartTagState" />
				<ChildState Key="StartTagState" />
			</ChildStates>
		</State>
		
		<!-- Start Tags -->
		<State Key="StartTagState" TokenKey="StartTagDefaultToken" Style="TagNameStyle">
			<!-- Scopes -->
			<Scopes>
				<Scope>
					<ExplicitPatternGroup Type="StartScope" TokenKey="StartTagStartToken" Style="TagDelimiterStyle" PatternValue="&lt;" />
					<RegexPatternGroup Type="EndScope" TokenKey="StartTagEndToken" Style="TagDelimiterStyle" PatternValue="/? &gt;" />	
				</Scope>
			</Scopes>
			<!-- Child States -->
			<ChildStates>
				<ChildState Key="StartTagAttributeState" />
			</ChildStates>
		</State>
		
		<!-- Start Tag Attributes -->
		<State Key="StartTagAttributeState" TokenKey="StartTagDefaultToken" Style="TagAttributeStyle">
			<!-- Scopes -->
			<Scopes>
				<Scope>
					<RegexPatternGroup Type="StartScope" TokenKey="StartTagNameToken" Style="TagNameStyle" PatternValue="{LineTerminatorWhitespaceMacro}* {TagNameMacro}+ {LineTerminatorWhitespaceMacro}*" />
				</Scope>
			</Scopes>
			<!-- Patterns Groups -->
			<PatternGroups>
				<!-- Brackets -->
				<RegexPatternGroup TokenKey="StartTagAttributeToken" Style="TagAttributeStyle" LookAhead="{NonWordMacro}|\z" PatternValue="{WordMacro}+" />
			</PatternGroups>
			<!-- Child States -->
			<ChildStates>
				<ChildState Key="StartTagAttributeStringValueState" />
				<ChildState Key="StartTagAttributeValueState" />
			</ChildStates>
		</State>
		
		<!-- Start Tag Attribute Values -->
		<State Key="StartTagAttributeValueState" TokenKey="StartTagAttributeValueDefaultToken" Style="TagAttributeValueStyle">
			<!-- Scopes -->
			<Scopes>
				<Scope>
					<RegexPatternGroup Type="StartScope" TokenKey="StartTagAttributeValueStartToken" Style="TagAttributeValueStyle" PatternValue="= {LineTerminatorWhitespaceMacro}*" />
					<RegexPatternGroup Type="EndScope" TokenKey="StartTagAttributeValueEndToken" Style="TagAttributeValueStyle" PatternValue="{LineTerminatorWhitespaceMacro}+" />	
				</Scope>
			</Scopes>
			<!-- Patterns Groups -->
			<PatternGroups>
				<RegexPatternGroup TokenKey="StartTagAttributeValueDefaultToken" PatternValue="{WordMacro}+" />
			</PatternGroups>
		</State>
		
		<!-- Start Tag Attribute String Values -->
		<State Key="StartTagAttributeStringValueState" TokenKey="StartTagAttributeStringValueDefaultToken" Style="TagAttributeValueStyle">
			<!-- Scopes -->
			<Scopes>
				<Scope>
					<RegexPatternGroup Type="StartScope" TokenKey="StartTagAttributeStringValueStartToken" Style="TagAttributeValueStyle" PatternValue="= {LineTerminatorWhitespaceMacro}* \&quot;" />
					<RegexPatternGroup Type="EndScope" TokenKey="StartTagAttributeStringValueEndToken" Style="TagAttributeValueStyle" PatternValue="\&quot;" />	
				</Scope>
			</Scopes>
			<!-- Patterns Groups -->
			<PatternGroups>
				<RegexPatternGroup TokenKey="StartTagAttributeStringValueDefaultToken" PatternValue="[^&quot;]+" />
			</PatternGroups>
		</State>
		
		<!-- End Tags -->
		<State Key="EndTagState" TokenKey="EndTagDefaultToken" Style="TagNameStyle">
			<!-- Scopes -->
			<Scopes>
				<Scope>
					<ExplicitPatternGroup Type="StartScope" TokenKey="EndTagStartToken" Style="TagDelimiterStyle" PatternValue="&lt;/" />
					<ExplicitPatternGroup Type="EndScope" TokenKey="EndTagEndToken" Style="TagDelimiterStyle" PatternValue="&gt;" />	
				</Scope>
			</Scopes>
			<!-- Patterns Groups -->
			<PatternGroups>
				<RegexPatternGroup TokenKey="EndTagDefaultToken" PatternValue="[^&gt;]+" />
			</PatternGroups>
		</State>
		
		<!-- ASP Response.Write Block -->
		<State Key="ASPDirectiveResponseWriteState" Filename="ActiproSoftware.VBScript.xml" ChildLanguageBackColor="WhiteSmoke">
			<!-- Scopes -->
			<Scopes>
				<Scope>
					<ExplicitPatternGroup Type="StartScope" TokenKey="ASPDirectiveStartToken" Style="ASPDelimiterStyle" PatternValue="&lt;%" LookAhead="=" />
					<ExplicitPatternGroup Type="EndScope" TokenKey="ASPDirectiveEndToken" Style="ASPDelimiterStyle" PatternValue="%&gt;" />
				</Scope>
			</Scopes>
		</State>
		
		<!-- ASP Code Block -->
		<State Key="ASPDirectiveCodeState" Filename="ActiproSoftware.VBScript.xml" ChildLanguageBackColor="WhiteSmoke">
			<!-- Scopes -->
			<Scopes>
				<Scope>
					<ExplicitPatternGroup Type="StartScope" TokenKey="ASPDirectiveStartToken" Style="ASPDelimiterStyle" PatternValue="&lt;%" />
					<ExplicitPatternGroup Type="EndScope" TokenKey="ASPDirectiveEndToken" Style="ASPDelimiterStyle" PatternValue="%&gt;" />
				</Scope>
			</Scopes>
		</State>
		
		<!-- Style Start Tags -->
		<State Key="StyleStartTagState" TokenKey="StyleStartTagDefaultToken" Style="TagNameStyle">
			<!-- Scopes -->
			<Scopes>
				<Scope>
					<ExplicitPatternGroup Type="StartScope" TokenKey="StartTagStartToken" Style="TagDelimiterStyle" PatternValue="&lt;" LookAhead="style" />
					<RegexPatternGroup Type="EndScope" TokenKey="StartTagEndToken" Style="TagDelimiterStyle" PatternValue="/? &gt;"/>
					<StateTransition Filename="ActiproSoftware.CSS.xml" ChildLanguageBackColor="WhiteSmoke">
						<ExplicitPatternGroup TokenKey="EndTagStartToken" Style="TagDelimiterStyle" PatternValue="&lt;/" LookAhead="style" />
					</StateTransition>
				</Scope>
			</Scopes>
			<!-- Child States -->
			<ChildStates>
				<ChildState Key="StartTagAttributeState" />
			</ChildStates>
		</State>
		
		<!-- JScript Start Tags -->
		<State Key="JScriptStartTagState" TokenKey="JScriptStartTagDefaultToken" Style="TagNameStyle">
			<!-- Scopes -->
			<Scopes>
				<Scope>
					<ExplicitPatternGroup Type="StartScope" TokenKey="StartTagStartToken" Style="TagDelimiterStyle" PatternValue="&lt;" LookAhead="script" />
					<RegexPatternGroup Type="EndScope" TokenKey="StartTagEndToken" Style="TagDelimiterStyle" PatternValue="/? &gt;" />
					<StateTransition Filename="ActiproSoftware.JScript.xml" ChildLanguageBackColor="WhiteSmoke">
						<ExplicitPatternGroup TokenKey="EndTagStartToken" Style="TagDelimiterStyle" PatternValue="&lt;/" LookAhead="script" />
					</StateTransition>
				</Scope>
			</Scopes>
			<!-- Child States -->
			<ChildStates>
				<ChildState Key="StartTagAttributeState" />
			</ChildStates>
		</State>
		
		<!-- VBScript Start Tags -->
		<State Key="VBScriptStartTagState" TokenKey="StartTagDefaultToken" Style="TagNameStyle">
			<!-- Scopes -->
			<Scopes>
				<Scope>
					<ExplicitPatternGroup Type="StartScope" TokenKey="StartTagStartToken" Style="TagDelimiterStyle" PatternValue="&lt;" LookAhead="script {LineTerminatorWhitespaceMacro}* language=\&quot; (&quot;VBS&quot; | &quot;VBScript&quot;)" />
					<RegexPatternGroup Type="EndScope" TokenKey="StartTagEndToken" Style="TagDelimiterStyle" PatternValue="/? &gt;" />	
					<StateTransition Filename="ActiproSoftware.VBScript.xml" ChildLanguageBackColor="WhiteSmoke">
						<ExplicitPatternGroup TokenKey="EndTagStartToken" Style="TagDelimiterStyle" PatternValue="&lt;/" LookAhead="script" />
					</StateTransition>
				</Scope>
			</Scopes>
			<!-- Child States -->
			<ChildStates>
				<ChildState Key="StartTagAttributeState" />
			</ChildStates>
		</State>
		
		<!-- Comments -->
		<State Key="CommentState" TokenKey="CommentDefaultToken" Style="CommentDefaultStyle">
			<!-- Scopes -->
			<Scopes>
				<Scope>
					<ExplicitPatternGroup Type="StartScope" TokenKey="CommentStartToken" Style="CommentDelimiterStyle" PatternValue="&lt;!--" />
					<ExplicitPatternGroup Type="EndScope" TokenKey="CommentEndToken" Style="CommentDelimiterStyle" PatternValue="--&gt;" />	
				</Scope>
			</Scopes>
			<!-- Patterns Groups -->
			<PatternGroups>
				<RegexPatternGroup TokenKey="CommentDefaultToken" PatternValue="[^\-]+" />
			</PatternGroups>
		</State>
		
		<!-- Processing Instructions -->
		<State Key="ProcessingInstructionState" TokenKey="ProcessingInstructionDefaultToken" Style="ProcessingInstructionDefaultStyle">
			<!-- Scopes -->
			<Scopes>
				<Scope>
					<ExplicitPatternGroup Type="StartScope" TokenKey="ProcessingInstructionStartToken" Style="ProcessingInstructionDelimiterStyle" PatternValue="&lt;?" />
					<ExplicitPatternGroup Type="EndScope" TokenKey="ProcessingInstructionEndToken" Style="ProcessingInstructionDelimiterStyle" PatternValue="?&gt;" />	
				</Scope>
			</Scopes>
			<!-- Patterns Groups -->
			<PatternGroups>
				<RegexPatternGroup TokenKey="ProcessingInstructionDefaultToken" PatternValue="[^\?]+" />
			</PatternGroups>
		</State>
		
		<!-- Declarations -->
		<State Key="DeclarationState" TokenKey="DeclarationDefaultToken" Style="DeclarationDefaultStyle">
			<!-- Scopes -->
			<Scopes>
				<Scope>
					<ExplicitPatternGroup Type="StartScope" TokenKey="DeclarationStartToken" Style="DeclarationDelimiterStyle" PatternValue="&lt;!" />
					<ExplicitPatternGroup Type="EndScope" TokenKey="DeclarationEndToken" Style="DeclarationDelimiterStyle" PatternValue="&gt;" />	
				</Scope>
			</Scopes>
			<!-- Patterns Groups -->
			<PatternGroups>
				<RegexPatternGroup TokenKey="DeclarationDefaultToken" PatternValue="[^&gt;]+" />
			</PatternGroups>
		</State>
	</States>

	<!-- Example Text -->
	<ExampleText>
		<![CDATA[
<html>
<head>
	<title>This is a title.</title>
	<style>
		/* CSS Block */
		a { color: Red; }
	</style>
</head>
<body background="Background.gif" text="Black">
	<script language="JScript">
		// JScript block
		for (int i = 0; i < 3; i++)
			window.alert('This is some JScript code: ' + i);
	</script>
	<script language="VBScript">
		'VBScript block
		Dim i
		For i = 0 To 3
			window.alert("This is some VBScript code: " & CStr(i));
		Next
	</script>
	<%
	'ASP Block
	Dim i 
	For i = 1 To 100
		Response.Write("Item " & CStr(i) & vbCRLF)
	Next 
	%>
	Entity test: &amp; &gt : Test over	
	<singlevals>
		<a href="http://www.actiprosoftware.com" target="_top" />
	</singlevals>
</body>
</html>
<!-- This is a comment -->
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN" > 
<?xml version="1.0" encoding="utf-8" ?>
		]]>
	</ExampleText>
			
</SyntaxLanguage>
