Schematron validation advice to a complete newbie

Post here questions and problems related to editing and publishing DITA content.
ioanC
Posts: 3
Joined: Mon Aug 22, 2016 3:14 pm

Schematron validation advice to a complete newbie

Post by ioanC »

Hello,

First of all a bit of background ...

I must confess that I'm a complete newbie to the whole lot. I am currently looking in to the use of Schematron to implement our company's technical writing guide.

We're using the DITA (v4.1) plug-in for Eclipse and Oxygen XML (v17). Looking in to some of the existing validations schema's that are using Schematron I see that they're using ISO Schematron and XSLT 2.0.

I had a go with the Schematron book from O'Reilly but I found the whole book a bit confusing. Probably because I'm a newbie to this whole lot but also because there are so many exceptions from the rule. Nonetheless, the book seems to be a bit outdated as well.

Now a few questions if you can kindly guide me...

After going through the book and looking up the web it is my understanding that XSLT 2.0 is more powerful and I should use ISO Schematron as opposite to Schematron 1.5. Am I correct?

Looking at the validation engine I see that there are so many options: XSV, Saxon-EE 9.6, MSXML 4.0, MSXML.NET, LIBXML, DITA Validation? and last Xerces which also seem to be the default engine. Am I correct in my presumption that Xerces is the best? I would like to know why if possible and are the considerations going forward.

And finally, I have made some assertions in my attempt to implement our guide and I was not able to make the automatic validation work even though I enabled it by checking the box when I added my Schematron file. It only works when you manually validate it, any suggestions?

Also if you could recommend me any reading resources it will be greatly appreciated.

Thanks in advance and I'm looking forward to hearing to you.

P.S. I've also looked a bit into xPath and XSLT before jumping ahead.

Kind regards,
Ioan
Radu
Posts: 9069
Joined: Fri Jul 09, 2004 5:18 pm

Re: Schematron validation advice to a complete newbie

Post by Radu »

Salut Ioan,

Please see some answers below:
After going through the book and looking up the web it is my understanding that XSLT 2.0 is more powerful and I should use ISO Schematron as opposite to Schematron 1.5. Am I correct?
Yes, almost everyone uses ISO Schematron nowadays, 1.5 is deprecated and outdated.
Looking at the validation engine I see that there are so many options: XSV, Saxon-EE 9.6, MSXML 4.0, MSXML.NET, LIBXML, DITA Validation? and last Xerces which also seem to be the default engine. Am I correct in my presumption that Xerces is the best? I would like to know why if possible and are the considerations going forward.
If you go to the Oxygen Preferences->Document Type Association page and you edit (or extend) the DITA document type, in the Validation tab you will find the default DITA validation scenario.

DITA topics are validated by default with multiple engines. The first validation stage using the Xerces builtin parser to validate the topic using the associated DTD.
The second stage validates the topic using a Schematron schema.
The third validation stage using a custom DITA Validation engine which can detect and report additional problems that the DTD cannot enforce. For example starting with Oxygen 18.0, this DITA validation stage reports invalid tables (table with more cells on row than allowed for example).
And so on, you can add your own validation stages.
And finally, I have made some assertions in my attempt to implement our guide and I was not able to make the automatic validation work even though I enabled it by checking the box when I added my Schematron file. It only works when you manually validate it, any suggestions?
After you add a validation stage to the DITA validation scenario, there is a column in the dialog called Automatic validation which you need to check.
Or did you add the validation in another way, not using the default validation scenario? If so, please elaborate.

Regards,
Radu
Radu Coravu
<oXygen/> XML Editor
http://www.oxygenxml.com
Radu
Posts: 9069
Joined: Fri Jul 09, 2004 5:18 pm

Re: Schematron validation advice to a complete newbie

Post by Radu »

One more thing, there is an article on the Oxygen XML Blog which explores various customizations that your can make to Oxygen:

http://blog.oxygenxml.com/2016/06/guide ... rview.html

Regards,
Radu
Radu Coravu
<oXygen/> XML Editor
http://www.oxygenxml.com
ioanC
Posts: 3
Joined: Mon Aug 22, 2016 3:14 pm

Re: Schematron validation advice to a complete newbie

Post by ioanC »

Salut Radu :),

Thank you for your swift reply and for the clarifications, I found the information very useful.

Will let you know if I have any other questions.

Kind regards,
Ioan
Post Reply