Page 1 of 1

File not found warning for <xref scope=external>

Posted: Tue Jan 12, 2016 12:12 pm
by dita-u1
In a DITA document, I have <xref href=".././test.html" scope="external" format="html">Here</xref>

I get a warning on validation : W [REF] File not found C:\test\test.html


How do I turn off this validation error for scope="external"

Re: File not found warning for <xref scope=external>

Posted: Tue Jan 12, 2016 6:11 pm
by alex_jitianu
Hello,

For a DITA topic, the automatic validation performs a number of specific DITA-related checks but unfortunately these checks are not configurable. What you can do is remove this specific validation altogether (don't worry, you will still have the schema-based validation). Here is what you must do:
1. go to Options->Preferences... on page Document Type Associations and edit the DITA framework (or, if you are using another customized framework, edit that one instead).
2. in the Document Type edit dialog go to the Validation tab and edit the DITA scenario.
3. in the scenario edit dialog look at the Validation engine column and identify the entry which says DITA Validation. Remove it.

If you haven't yet changed in any way the default DITA framework shipped with Oxygen, you may want to Extend it instead of editing.

To compensate for the checks you lost, you can use from time to time the Validate and check for completeness action from the DITA Map Manager view. This action is configurable and you can tell it whether or not to check the existence of non-DITA references resources. As a matter of fact, I will add an issue to provide the same level of configuration for the DITA Validation performed automatically on a topic.

Best regards,
Alex

Re: File not found warning for <xref scope=external>

Posted: Wed Jan 13, 2016 12:15 am
by sanGeoff
You could also use ValidationProblemsFilter class in a plug-in right? If contains "File not found" and ends with ".html", remove. The vertical scroll area will still show the marks but they wont appear in the validation results.

Is it correct behaviour that the vertical area next to the right scroll bar and the file status area above the Text/Grid/Author buttons shows excluded validation problems? Seems like a small bug to me.

Re: File not found warning for <xref scope=external>

Posted: Wed Jan 13, 2016 11:10 am
by alex_jitianu
Hello,

Good point, a ValidationProblemsFilter can remove unwanted error messages.
Is it correct behavior that the vertical area next to the right scroll bar and the file status area above the Text/Grid/Author buttons shows excluded validation problems?
The filter receives an ValidationProblems object which on the getValidationType() call return whether the validation is a manual one or an automatically triggered one. Perhaps you are looking at this flag and filtering only for the manual validation?

Best regards,
Alex

Re: File not found warning for <xref scope=external>

Posted: Wed Jan 13, 2016 11:23 pm
by sanGeoff
Thanks for pointing out the getValidationType().
For some reason I was only checking NORMAL validation problems.
Works fine if I remove that condition from my plug-in.