Page 1 of 1

Get validation warning

Posted: Wed Dec 16, 2015 5:17 pm
by Denis
Hi,

we are using eclipse oxygen author 17.1.

When I opening a dita topic, which contains a image it is yellow underlined with the message: "Validation: [REF] File not found: ...", but the image is displayed correctly.
I think the reason why I get the validation warning is the way how we set the image path to the href. The image path is not hard defined. We are using the StylesFilter to change the href attribute value dynamically. So the image is displayed after the StylesFilter alters the path, but the warning will not disappear.

Is there a way to hide the message?

Best regards
Denis

Re: Get validation warning

Posted: Thu Dec 17, 2015 2:36 pm
by Radu
Hi Denis,

If I understand this correctly, you should never modify an attribute on an element in a StylesFilter implementation. Such as implementation is meant to modify styles for a certain element and not to modify element attributes.
Again, whenever you modify an element's attributes you should do this via the AuthorDocumentController API. In this way, the application allows undoing the change and is properly notified of the change.

We have a filter which would allow you to ignore certain problems before they are displayed:

ro.sync.exml.workspace.api.editor.WSEditor.addValidationProblemsFilter(ValidationProblemsFilter)

but ideally you could tell me more about your use case and we'd find a better way to modify the image reference than the StylesFilter implementation.

Regards,
Radu