Re: DocBook 5.1 Schematron schema
"N. Raghavendra" <[email protected]> Mon, 26 Nov 2018 16:58:14 +0530
| Newsgroups | gmane.text.docbook.misc |
|---|---|
| Message-ID | <[email protected]> |
At 2018-11-26T14:09:45+05:30, N. Raghavendra wrote:
> Thank you for pointing out that commit. I'll try using
> ExtractSchFromRNG.xsl.
Just to report that I couldn't get ExtractSchFromRNG.xsl to work. It
seems to generate Schematron files that are invalid with respect to the
Schematron 2006 schema, whereas the docbookxi.sch from the DocBook
distribution validates against it. However, the schematron.xsl file
from the DocBook GitHub repo does work.
--------------------
$ wget https://raw.githubusercontent.com/docbook/docbook/master/relaxng/tools/schematron.xsl
$ wget https://raw.githubusercontent.com/Schematron/schema-2006/master/schematron.rnc
$ sed -E 's!([</])(title>)!\1s:\2!g' docbookxi.rng > my-docbookxi.rng
$ java -jar /pkg/saxon/saxon9he.jar -s:my-docbookxi.rng -xsl:schematron.xsl -o:my-docbookxi.sch
$ jing -c schematron.rnc my-docbookxi.sch && echo "ok"
ok
$ grep 'Root' my-docbookxi.sch
<s:title>Root must have version</s:title>
--------------------
Regards,
Raghu.
--
N. Raghavendra <[email protected]>, http://www.retrotexts.net/
Harish-Chandra Research Institute, http://www.hri.res.in/