summaryrefslogtreecommitdiffstats
path: root/JLanguageTool/src/resource/api-output.dtd
diff options
context:
space:
mode:
Diffstat (limited to 'JLanguageTool/src/resource/api-output.dtd')
-rw-r--r--JLanguageTool/src/resource/api-output.dtd61
1 files changed, 61 insertions, 0 deletions
diff --git a/JLanguageTool/src/resource/api-output.dtd b/JLanguageTool/src/resource/api-output.dtd
new file mode 100644
index 0000000..33c9541
--- /dev/null
+++ b/JLanguageTool/src/resource/api-output.dtd
@@ -0,0 +1,61 @@
+<!--
+Simple XML output format for the 'api' option and the HTTP
+interface of LanguageTool. Version 1.0.
+Daniel Naber (http://www.danielnaber.de), 2007-01-30
+-->
+
+<!ELEMENT matches (error)*>
+
+<!-- A (potential) error. The output is simplified XML to
+make parsing easier for those that do not use an XML parser.
+This means:
+* the error element does not contain line breaks
+* each 'error' element starts on a new line
+* the attributes always appear in this order: fromy, fromx,
+ toy, tox, ruleId, msg, replacements, context, contextoffset, errorlength
+-->
+<!ELEMENT error EMPTY>
+
+<!-- The line in which the error starts. Counting starts at 0. -->
+<!ATTLIST error fromy CDATA #REQUIRED>
+<!-- The column in which the error starts. Counting starts at 0. -->
+<!ATTLIST error fromx CDATA #REQUIRED>
+
+<!-- The line in which the error ends: -->
+<!ATTLIST error toy CDATA #REQUIRED>
+<!-- The column in which the error ends: -->
+<!ATTLIST error tox CDATA #REQUIRED>
+
+<!-- An internal ID that refers to the error rule: -->
+<!ATTLIST error ruleId CDATA #REQUIRED>
+
+<!-- An internal ID that refers to the sub error rule id: -->
+<!ATTLIST error subId CDATA #IMPLIED>
+
+<!-- The message describing the error that will be displayed to the user. -->
+<!ATTLIST error msg CDATA #REQUIRED>
+
+<!--
+One or more suggestions to fix the error. If there is more than one
+suggestion, the strings are separated by a "#" character:
+-->
+<!ATTLIST error replacements CDATA #IMPLIED>
+
+<!--
+The context or sentence in which the error occurs.
+-->
+<!ATTLIST error context CDATA #REQUIRED>
+
+<!-- The position of the start of the error in the 'context'
+attribute. Counting starts at 0.
+-->
+<!ATTLIST error contextoffset CDATA #REQUIRED>
+
+<!-- The length in characters of the error in the 'context'
+attribute, starting at 'contextoffset'.
+-->
+<!ATTLIST error errorlength CDATA #REQUIRED>
+
+<!-- Note that the XML output may contain XML comments with
+additional information like timing and debugging information.
+These can be ignored. -->