OASIS Mailing List ArchivesView the OASIS mailing list archive below
or browse/search using MarkMail.


Help: OASIS Mailing Lists Help | MarkMail Help

docbook message

[Date Prev] | [Thread Prev] | [Thread Next] | [Date Next] -- [Date Index] | [Thread Index] | [List Home]

Subject: Re: [docbook] DocBook 5.1 Schematron schema

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"

$ grep 'Root' my-docbookxi.sch
      <s:title>Root must have version</s:title>


N. Raghavendra <raghu@hri.res.in>, http://www.retrotexts.net/
Harish-Chandra Research Institute, http://www.hri.res.in/

[Date Prev] | [Thread Prev] | [Thread Next] | [Date Next] -- [Date Index] | [Thread Index] | [List Home]