Back to LanguageTool Homepage - Privacy - Imprint

Parse Rule XML does not find incorrect XML

(Mike Unwalla) #1

I used Parse Rule XML from on this syntactically incorrect rule:

        <rule id="RULE_EDITOR_TEST" name="Rule Editor Test">
                <token regexp="yes">bucket|flower pot|spade|</token>
            <message>Did you mean <suggestion>equipment</suggestion>?</message>
            <example correction="Michael">Put the <marker>bucket</marker> in the shed.</example>
            <example>This <marker>equipment</marker> is dirty.</example>

The Rule Editor did not give a warning about the incorrect syntax.

[en] New Rule (beware about/of)
[en] Need help to create rules (English)
[en] New Rule (beware about/of)
(Daniel Naber) #2

Just parsing won’t run the full checks, to do that you need to switch to expert mode and click “Check XML”.

(Mike Unwalla) #3

Expert mode does not give a warning for this incorrect token:
<token regexp="yes">bucket|flower pot|spade|</token>

(Daniel Naber) #4

I’ve added a test for that, tests will fail if there’s a whitespace.

(Daniel Naber) #5

Sorry, had to take it out again, that that didn’t work properly yet.