The Jing task for ant is documented here: http://www.thaiopensource.com/relaxng/jing-ant.html I believe (although I haven't tested it) that you can set the required param like this: <target name="validaterng"> <echo level="info">Validate ${testfile} against RELAXNG ${outputname}.rng</echo> <runjing rngfile="${outputname}.rng" file="${testfile}" checkid="false"/> </target> i.e. by adding @checkid="false" to the runjing task call on line 134. Hope this helps, Martin On 15-10-02 10:38 AM, Syd Bauman wrote:
So, here's the deal as far as I can figure out rapidly.
Basically, James Clark and MURATA Makoto did not intend us to use DTD compatibility mode to check our ID/IDREFs. They had expected there to be a part 6 to DSDL which would specify a specialized little language just for the purpose. But that never happened, there is no part 6 to DSDL. So we're kinda stuck.
I'm not sure what to do, but possibilities include:
1. Just not checking ID/IDREF on the two files that cause problems
2. Turning off ID/IDREF checking on all our RELAX NG validation, and adding a separate step to check ID/IDREF. This would be accomplished by either a) writing a Schematron rule or b) by tweaking the declaration of macro.anyXML.
3. Others?
My initial thought is that the best bet is #2a: - stop using DTD compatibility mode to check ID/IDREF -- which is what the rest of this mail is about - use Schematron to check ID/IDREFs -- which is what a future post will be about
The way you turn off ID/IDREF checking with `jing` on the commandline is to specify the '-i' switch. But I don't know how to do that in ant. The offending ant file is .../TEI/P5/Test/antruntest.xml, line 134 (defined on line 51). It causes problems twice: validating .../TEI/P5/Test/tei_svg.tei against .../TEI/P5/Test/tei_svg.rng validating .../TEI/P5/Test/testbare.xml against .../TEI/P5/Test/testbare.rng
Any thoughts?
I do not think we need a show of hands. This is a corrigible error that should never see the light of day. It is most definitely a bug, and one that needs to be squashed.
HOWEVER, it's not nearly so easy as it looks. In fact, it's a big problem. If I just do as you suggested, Lou, we run into a validation problem. Remember that there is a problem in the RELAX NG world with validating macro.anyXML when DTD compatibility mode is on. You get a conflicting ID-types for attribute "id" ... error, which indeed I get when running `make test` from both the Validate testbasic.xml against RELAXNG testbasic.rng and the Validate tei_svg.tei against RELAXNG tei_svg.rng steps.
I will be looking into this in more detail as soon. (I need to eat first.) But in the meantime, do people want me to check in the change so they can play with the error, or try to fix it first?