AdvMemo and AdvXMLMemoStyler with VCL Styles


I've added VCL styles to one of my apps and AdvMemo together with AdvXMLMemoStyler goes wild.

1) AdvXMLMemoStyler: Syntax-Parsing breaks when multiple http URLs in KML xsi:schemaLocation
    <kml xmlns="" xmlns:gx="" xmlns:kml="" xmlns:atom="" xmlns:xsi="" xsi:schemaLocation="" version="2.2" creator="TrackTool v3.1.0.287" name="Auf-Hulb_Ab-Herrenberg.fsp" time="2019-02-05T15:42:30.797Z">
All subsequent XML is not parsed correctly.

2) AdvXMLMemoStyler: Highlighting of URLs does not work reliably in XML
   - Works only if not in "": xsi:schemaLocation=""
   - Works only if surrounded by SPACES: <href></href>

3) AdvXMLMemoStyler: Marks URL as comment due to // in http://...

4) The VCL style colors are not used automatically by AdvXMLMemoStyler. See white background color using a dark VCL style.

I have a simple demo project which exposes all this issues, that I will upload.



I cannot see how the use of the VCL Styles would have any impact on the processing of the XML itself.

If you do not want that the styler background colors are used for the TAdvMemo, set the background colors in this styler to clNone. 
A demo project could be downloaded here:

The parsing issues are not related to the use of styles.

4) OK, this issue could be solved with clNone:

  with AdvXMLMemoStyler1 do
    CommentStyle.BkColor := clNone;
    NumberStyle.BkColor  := clNone;
    AllStyles[0].BGColor := clNone;
    AllStyles[1].BGColor := clNone;
    AllStyles[2].BGColor := clNone;
    AllStyles[3].BGColor := clNone;

I see you have  an attribute with multiple URLs separated by a space.
I'm not sure this is the right notation. By replacing the space with %20, this renders correct here.

All examples and definitions I find for KML and GPX has the URLs in attributes separated by a simple SPACE, not the HTML equivalent %20.

We have applied an improvement to address this. The next update will have this improvement.

Great, thanks for listening.
Have you solved all parsing issues 1), 2) and 3) from my first post?

Set AdvMemo.URLDelimiters := #32+'"'+'''';
Bruno Fierens2019-02-09 16:06:12

That's much better with this setting!
Just issue 3) remains.
In the following node the http is interpreted as comment due to the //:

OK. solved the last issue as well:

  with AdvMemo1 do
    URLDelimiters    := #32 + '"' + '''' + '>' + '<';
    UrlStyle.BkColor := clNone;

  with AdvXMLMemoStyler1 do
    LineComment := '';

Thanks for informing.