The Annotate errors workflow action takes the report from a validation action and inserts the issues it found directly into the source document, so reviewers can see and resolve them without cross-referencing a separate report. It's a follow-up step—place it right after Validate with Schematron, Validate with DTD, or Validate with XSD in your workflow, using that action's report as this action's input.
| Field | Description |
|---|---|
| Input | Choose the Content XML (CXML) or XML document that was validated. |
| Report | Choose the report produced by a validation action—a Schematron Validation Report Language (SVRL) report from Validate with Schematron, or a DTD or XSD validation report from Validate with DTD or Validate with XSD. |
| Output | Choose a file for the annotated document. Required—if left blank, the job fails with a configuration error. |
| Severity filter |
Choose which findings get an inline annotation:
The summary stamp always counts everything in the report, even when the filter leaves some findings out of the document. For example, it might read: "5 error and 3 info: 5 annotated inline, 3 below severity filter." Because DTD and XSD reports never include info-level findings, All (including info) and Errors and warnings annotate the same set of findings for those reports. |
What it produces
Annotate errors detects the type of source document and report you've provided, and produces one of the following:
| Source document + report | Result |
|---|---|
| Content XML (CXML) + Schematron Validation Report Language (SVRL) report | Review comments at each flagged location—visible as editorial comments in Word after Export to DOCX. |
| Plain XML + SVRL report | A processing instruction before each flagged element. |
| Plain XML + DTD validation report | A processing instruction before each offending element. Your document's DOCTYPE declaration is preserved. However, if your document defines its own custom entities (reusable text shortcuts) directly inline, rather than only in the external DTD, those definitions won't carry over to the annotated document. |
| Plain XML + XSD validation report | A processing instruction before each offending element. |
A summary line is also added at the very top of the document, showing which validator ran, the schema or DTD used, how many issues were found at each severity, and when. For Schematron, the schema name is left out, since the underlying report doesn't include one.
FAQ
Can I use a DTD or XSD validation report with a Content XML (CXML) document?
No. Neither a DTD nor an XSD validation report can be used with a CXML source document—DTD and XSD validation don't apply to CXML. Use Validate with Schematron for CXML documents instead.
What happens if I run Annotate errors more than once on the same document?
Running Annotate errors again on an already-annotated document replaces the previous run's annotations rather than adding to them, so re-running doesn't leave duplicates behind. Whether the annotations land in the same place on a second run depends on the source document:
- CXML document: a second run lands annotations in the same places as the first.
- Plain XML annotated from a DTD or XSD report: those annotations are placed at specific line and column positions. The first run changes those positions throughout the document, so a report generated against the original file no longer matches it once annotated. Re-run from the original document and a fresh report, not from the already-annotated file.
Comments
0 comments
Article is closed for comments.