Posted 20 years ago
by byperman
- Sint-Niklaas, Belgium

Hi,
I tried to extend the xml language description included with the C#-sample, to be able to recognize short tags.Unfortunately, this doesn't seem to work.
What am i doing wrong?
Thanks in advance.
I tried to extend the xml language description included with the C#-sample, to be able to recognize short tags.
<States>
<!-- Text -->
<State Key="DefaultState">
<!-- Patterns Groups -->
<PatternGroups>
<!-- Entities -->
<RegexPatternGroup Token="EntityToken" Style="EntityStyle" PatternValue="& {WordMacro}+ ;?" />
<!-- Identifier -->
<RegexPatternGroup Token="IdentifierToken" PatternValue="{AlphaMacro}({WordMacro})*" />
<!-- Whitespace -->
<RegexPatternGroup Token="WhitespaceToken" PatternValue="{WhitespaceMacro}+" IsWhitespace="True" />
</PatternGroups>
<!-- Child States -->
<ChildStates>
<ChildState Key="EndTagState" />
<ChildState Key="CommentState" />
<ChildState Key="CDATAState" />
<ChildState Key="DeclarationState" />
<ChildState Key="ProcessingInstructionState" />
<ChildState Key="StartTagState" />
<ChildState Key="ShortEndTagState" />
</ChildStates>
</State>
<State Key="ShortEndTagState" Token="ShortEndTagDefaultToken" Style="TagNameStyle">
<Scopes>
<Scope>
<ExplicitPatternGroup Type="StartScope" Token="ShortEndTagStartToken" Style="TagDelimiterStyle" PatternValue="<" />
<ExplicitPatternGroup Type="EndScope" Token="ShortEndTagEndToken" Style="TagDelimiterStyle" PatternValue="/>" />
</Scope>
</Scopes>
<ChildStates>
<ChildState Key="StartTagAttributeState" />
</ChildStates>
</State>
<!-- Start Tags -->
<State Key="StartTagState" Token="StartTagDefaultToken" Style="TagNameStyle">
<!-- Scopes -->
<Scopes>
<Scope>
<ExplicitPatternGroup Type="StartScope" Token="StartTagStartToken" Style="TagDelimiterStyle" PatternValue="<" />
<RegexPatternGroup Type="EndScope" Token="StartTagEndToken" Style="TagDelimiterStyle" PatternValue="[^/]>" />
</Scope>
</Scopes>
<!-- Child States -->
<ChildStates>
<ChildState Key="StartTagAttributeState" />
</ChildStates>
</State>
(...)
What am i doing wrong?
Thanks in advance.