enabling id/idref validation for relaxng schemas
Posted: Tue Oct 07, 2008 3:58 pm
It appears that the -i option for jing has been enabled by default when validating relaxng schemas through onvdl (referencing errors are not reported, but id and idref values are checked for conformance). The only way I can get bad references to be reported is to call jing directly.
If I'm not wrong about something that should be obvious (which is always a good chance), is there any way to enable the validation? I can mimic the checks by adding a schematron schema, but it's a painfully slow option.
Copying below a minimal set of files that can be used to exhibit the issue:
====test.xml====
<?xml version="1.0" encoding="utf-8"?>
<master xmlns="http://test/master">
<noteref ref="en999">1</noteref>
<note id="en1">1. Central Intelligence Agency, Kubark Counterintelligence Interrogation, July 1963, 49-50, 76-77.</note>
</master>
====idref.nvdl====
<?xml version="1.0" encoding="utf-8"?>
<rules xmlns="http://purl.oclc.org/dsdl/nvdl/ns/structure/1.0"
startMode="doc">
<mode name="doc">
<namespace ns="http://test/master">
<validate schema="master.rnc" schemaType="application/x-rnc"/>
</namespace>
</mode>
</rules>
====master.rnc===
default namespace = "http://test/master"
namespace xml = "http://www.w3.org/XML/1998/namespace"
datatypes xsd = "http://www.w3.org/2001/XMLSchema-datatypes"
start = element master {
(noteref, note)+
}
note = element note {
attribute id { xsd:ID },
text
}
noteref = element noteref {
attribute ref { xsd:IDREF },
text
}
If I'm not wrong about something that should be obvious (which is always a good chance), is there any way to enable the validation? I can mimic the checks by adding a schematron schema, but it's a painfully slow option.
Copying below a minimal set of files that can be used to exhibit the issue:
====test.xml====
<?xml version="1.0" encoding="utf-8"?>
<master xmlns="http://test/master">
<noteref ref="en999">1</noteref>
<note id="en1">1. Central Intelligence Agency, Kubark Counterintelligence Interrogation, July 1963, 49-50, 76-77.</note>
</master>
====idref.nvdl====
<?xml version="1.0" encoding="utf-8"?>
<rules xmlns="http://purl.oclc.org/dsdl/nvdl/ns/structure/1.0"
startMode="doc">
<mode name="doc">
<namespace ns="http://test/master">
<validate schema="master.rnc" schemaType="application/x-rnc"/>
</namespace>
</mode>
</rules>
====master.rnc===
default namespace = "http://test/master"
namespace xml = "http://www.w3.org/XML/1998/namespace"
datatypes xsd = "http://www.w3.org/2001/XMLSchema-datatypes"
start = element master {
(noteref, note)+
}
note = element note {
attribute id { xsd:ID },
text
}
noteref = element noteref {
attribute ref { xsd:IDREF },
text
}