Closed raghnysh closed 4 years ago
The problem seems to be related to this thread on the Oxygen XML Forum. According to it, the version of jing
current in 2010 did not support ISO Schematron validation. The version of jing
packaged by my OS (Linux Mint 18.1) is able to validate the file properly:
$ jing /pkg/docbook/docbook.nvdl test.xml
/home/raghu/xml-sandbox/xproc-nvdl/test.xml:5: error: assertion failed:
annotation must not occur among the children or descendants of annotation
$ jing | grep -i 'version'
Jing version 20131210
The version in the XML Calabash lib
directory is jing-20091111.jar
. Is it possible to replace it with a more recent version?
Using jing
built from its GitHub source works better:
$ java -cp /home/raghu/Downloads/jing-trang/build/jing.jar:/pkg/xmlcalabash/xmlcalabash-1.1.22-98.jar com.xmlcalabash.drivers.Main -i source=test.xml nvdl.xpl
Warning at char 3 in xsl:param/@select on line 459 column 43
SXWN9000: The parent axis starting at a document node will never select anything
error: assertion failed:
annotation must not occur among the children or descendants of annotation
ERROR: err:XC0053:XC0053
ERROR: It is a dynamic error if the assert-valid option is true and the input document is not valid.
$ java -jar /home/raghu/Downloads/jing-trang/build/jing.jar | grep -i version
Jing version 20151127
I don't know what the SXWN9000
warning means. The response is as expected modulo that warning.
Ok. Thanks for doing the research. I noticed just this week that a recent version of jing/trang don’t seem to be in any of the common repositories. I’ll see about bundling it with the next XML Calabash release.
The one at https://github.com/relaxng/jing-trang has version 20151127 which seems recent enough for this problem.
Yes, but it's not on a public Maven repo, for example.
We now have Jing in Maven, so 1.1.23 should work. Please reopen if I'm mistaken.
Thank you very much. It works now, except for the SXWN9000 warning.
$ java -cp /pkg/xmlcalabash/xmlcalabash-1.1.23-98.jar com.xmlcalabash.drivers.Main -i source=test.xml nvdl.xpl
Warning at char 3 in xsl:param/@select on line 459 column 43
SXWN9000: The parent axis starting at a document node will never select anything
error: assertion failed:
annotation must not occur among the children or descendants of annotation
ERROR: err:XC0053:XC0053
ERROR: It is a dynamic error if the assert-valid option is true and the input document is not valid.
I don't know where the warning is coming from.
Just in case it is relevant, according to https://github.com/w3c/epubcheck/issues/859#issuecomment-437801722 the warning is coming from the jing-trang iso-schematron.xsl file. There is also a followup at w3c/epubcheck#910.
In progress, https://github.com/relaxng/jing-trang/issues/240
I am unable to validate documents with NVDL. I am working with XML Calabash 1.1.22-98, and DocBook 5.1. This is the pipeline
nvdl.xpl
that I am using:This is the test file
test.xml
that I am using:The command
produces the error
I am able to validate the document using
validate-with-relax-ng
, and am getting the expected error usingvalidate-with-schematron
.