Posted 15 years ago by Martin Lundberg - Sweden
Avatar
Hello again!

I'm trying to figure out the xml language defenitions. I am looking at the HTML defenition and I've come as far as to the <states>.

If someone could ezplain what the EntityToken is for/does or anything I would be glad because it's confusing me =)

<RegexPatternGroup Token="EntityToken" Style="EntityStyle" PatternValue="& {WordMacro}+ ;?" />
If you have any other tips/comments for me that you think helps me understand the <states>/patterngroups and scopes part of the XML language defenition, please share it! =)

Thanks in advance!

Martin Lundberg
Student, Sweden

Comments (4)

Posted 15 years ago by Actipro Software Support - Cleveland, OH, USA
Avatar
Hi Martin,

The EntityToken defines HTML entities, things like "&" or ">".

The documentation has a lot of information on the language definitions but another good way to learn them is to look at our sample ones. Pattern groups are either a single pattern or set of patterns that define a token. Tokens can be things like keywords so a pattern group for a keyword token in C# would have patterns like "void", "for", "while", etc.


Actipro Software Support

Posted 15 years ago by Martin Lundberg - Sweden
Avatar
First, Thanks for answering so fast, now...

Looking at the PatternValue of the EntityToken the last part is ";?" which means 1 or none ";" character. Is not all html entities ended with a ;?

Edit: One more thing so you maybe see that I'm looking at something the wrong way. This:
<RegexPatternGroup Type="EndScope" Token="StartTagEndToken" Style="TagDelimiterStyle" PatternValue="/? >" />
supposed to add /> into the StartTagEndToken, but is not all endtags in html end with a /> ?? here the "/" character seems to be optional? What am I seeing the wrong wat?

I may have alot of questions now when I'm new, is it okey to ask them all here or is there some chat or something that you can direct me to? Ofcourse I won't ask about every little thing I get stuck on without thinking and trying to figure it out but still ;P

[ 12-05-2004: Message edited by: Martin Lundberg ]

[ 12-05-2004: Message edited by: Martin Lundberg ]

Martin Lundberg
Student, Sweden

Posted 15 years ago by Actipro Software Support - Cleveland, OH, USA
Avatar
Yes you are right... the ; is required for HTML entities to be recognized by browsers.

The pattern is saying that if we are in a start tag state (which could be a start tag block tag or a single tag like <img /> ), that state ends with either a ">" or a "/>".

You can post questions here. That way our other customers can read them.


Actipro Software Support

Posted 15 years ago by Martin Lundberg - Sweden
Avatar
Yeah! that makes sence <IMG SRC="wink.gif" border="0"> Thanks!

I am starting to understand it now. First you split it by using scopes and then you split the scopes by using PatternGroups.

Martin Lundberg
Student, Sweden

The latest build of this product (v2018.1 build 0341) was released 7 months ago, which was after the last post in this thread.

Add Comment

Please log in to a validated account to post comments.