How to Display Quick Fixes When Validating a Map File

This should cover W3C XML Schema, Relax NG and DTD related problems.
Eddie
Posts: 106
Joined: Wed Dec 18, 2013 3:07 am

How to Display Quick Fixes When Validating a Map File

Post by Eddie »

Hello,

Using Author 17, working in DITA.
I have a schematron that checks if image elements contain alt elements. This contains a quick fix to add the alt element if it is missing.
When I associate the schematron with an individual topic that has an image with no alt, the error is flagged and the quick fix is offered.
If I remove the individual schematron association with the topic and include the schematron in the [Additional schematron checks] then validate the map with all child topics, the error is flagged, but the quick fix is not displayed.
Is there a way to display the quick fix when validating through the map? (I don't want to have to make an association for every topic.)

Cheers,

Eddie.
Radu
Posts: 9018
Joined: Fri Jul 09, 2004 5:18 pm

Re: How to Display Quick Fixes When Validating a Map File

Post by Radu »

Hi Eddie,

I understand your use case and I will add an improvement request. When we manage to implement this improvement we'll update the forum thread.
In the meantime you would somehow need to associate the Schematron schema with all your topics for automatic validation.
You could do this in several ways:

1) By default for automatic validation of opened DITA topics this Schematron file is used:

OXYGEN_INSTALL_DIR\frameworks\dita\resources\dita-1.2-for-xslt2-mandatory.sch

so you could add additional rules to it.

2) In the Oxygen Preferences->Document Type Association page you can extend the DITA document type, edit in the extension in the Validation tab the DITA validation scenario and add a new validation stage there for using your custom Schematron file.
More about sharing a document type extension with your team mates can be read here:

http://blog.oxygenxml.com/2015/08/docum ... aring.html

3) In the Oxygen Project view link to your entire DITA project folder. Select the folders containing your DITA topics, right click, choose Validate->Configure Validation Scenario and create a new validation scenario which will be used to validate any topic opened from that folder.
The initial stage in the validation scenario usually validates the XML with the DTD associated in the content. So you would need to add a new stage for Schematron validation.

Regards,
Radu
Radu Coravu
<oXygen/> XML Editor
http://www.oxygenxml.com
Eddie
Posts: 106
Joined: Wed Dec 18, 2013 3:07 am

Re: How to Display Quick Fixes When Validating a Map File

Post by Eddie »

Thanks, Radu.

Solution 3 looks the easiest, but we are not using projects.
Anyway, I'll try them out and see.

Thanks again.
Post Reply