XML with JavaScipt syntax highlight

Topics: Developer Forum
Jul 28, 2010 at 3:18 PM
Edited Jul 28, 2010 at 3:22 PM

Hello, I'm struggling getting it to work, I use following xml configurations file :

 

<?xml version="1.0" encoding="utf-8"?>
<ScintillaNET>
	<Language Name="xml">
			
		<Lexer LineCommentPrefix="//" StreamCommentPrefix="&lt;!-- " StreamCommentSuffix=" --&gt;" >
		</Lexer>
			
		<Commands Inherit="True">
			<Binding Key="Q" Modifier="Control" Command="ToggleLineComment" ReplaceCurrent="True"/>
			<Binding Key="Q" Modifier="Shift Control" Command="StreamComment" ReplaceCurrent="True"/>
		</Commands>

		<Styles Inherit="True">
		

			<Style Name="DOUBLESTRING" ForeColor="Blue" />
			<Style Name="SINGLESTRING" ForeColor="Blue" />

			<Style Name="ATTRIBUTE" ForeColor="Red" />
			<Style Name="KEYWORD" ForeColor="Green" />
			<Style Name="TAG" ForeColor="DarkRed" />
			<Style Name="CONTROL" ForeColor="Green" />
			<Style Name="TAGUNKNOWN" ForeColor="DarkRed" />
			<Style Name="ATTRIBUTEUNKNOWN" ForeColor="Red" />


			<SubLanguage Name="HTML">
				<Style Name="ATTRIBUTE" ForeColor="Red" />
				<Style Name="KEYWORD" ForeColor="Green" />
				<Style Name="TAG" ForeColor="DarkRed" />
				<Style Name="CONTROL" ForeColor="Green" />
				<Style Name="TAGUNKNOWN" ForeColor="DarkRed" />		
				<Style Name="ATTRIBUTEUNKNOWN" ForeColor="Red" />
				<Style Name="DEFAULT" />
				<Style Name="NUMBER" />
				<Style Name="DOUBLESTRING"  />
				<Style Name="SINGLESTRING"  />
				<Style Name="OTHER" />
				<Style Name="COMMENT" />
				<Style Name="ENTITY" />
				<Style Name="TAGEND" />
				<Style Name="XMLSTART" />
				<Style Name="XMLEND" />
				<Style Name="SCRIPT" />
				<Style Name="ASP" />
				<Style Name="ASPAT" />
				<Style Name="CDATA" />
				<Style Name="QUESTION" />
				<Style Name="VALUE" />
				<Style Name="XCCOMMENT" />
			</SubLanguage>


			<SubLanguage Name="JavaScript">

				<Style Name="KEYWORD" ForeColor="Blue" />
				<Style Name="SCRIPT" />
				<Style Name="DOUBLESTRING"  />
				<Style Name="SINGLESTRING"  />
				
			</SubLanguage>
			
		</Styles>
	</Language>
</ScintillaNET>

 When I try to add following javascript keywords to the lexer, syntax highlighting break...

<Keywords List="0" Inherit="False"> abstract boolean break byte case catch char class const continue debugger default delete do double else enum export extends false final finally float for function goto if implements import in instanceof int interface long native new null package private protected public return static super switch synchronized this throw throws transient true try typeof var void volatile while with </Keywords>

 What am I missing here? Could someone post proper configuration for XML+Javascript?

 Best regards