Page 1 of 1

is there a way to call schematron rules from plugin

Posted: Fri Jul 24, 2020 10:57 am
by vishwavaranasi
hello team ,

is there a way to call our own schematron rules from a workspace plugin API ro.sync.exml.workspace.api.Plugin?

from a swing component - on click of button like "Validate" - it should validate all the topics of the MAP and want to give the errors or warnings in a swing window back to the user.


Thanks,
vishwa

Re: is there a way to call schematron rules from plugin

Posted: Fri Jul 24, 2020 11:15 am
by Radu
Hi,

The "Validate and check for completeness" action from the DITA Maps Manager view already allows you to choose an extra Schematron schema to be used to validate every referenced map and topic.
You also have batch validate actions in the Oxygen Project view when you right click a folder.
If you want to implement your own Schematron validation, schematron validation works by applying a sequence of XSLT stylesheets over the Schematron document to produce an XSLT stylesheet and then applying this XSLT stylesheet over the XML document:

https://www.xml.com/news/2018-11-initia ... f-schxslt/
because we do not have specific Java API like "validateWithSchematron(String xmlContents, String schematronContents)".

Regards,
Radu