xml editor

Products

Features

  EPUB
Supported platforms

Supports Windows 7 & Mac OS X Lion

Ready for XML Editor data server software
W3C Member

enabling id/idref validation for relaxng schemas

Issues related with the oNVDL implementation of NVDL.

enabling id/idref validation for relaxng schemas

Postby mgarrish » 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
}
mgarrish
 
Posts: 3
Joined: Thu Sep 04, 2008 8:31 pm

Re: enabling id/idref validation for relaxng schemas

Postby george » Tue Nov 04, 2008 2:06 pm

Thanks for reporting this. It seems indeed an issue that even the option is enabled by default as you noted when the Relax NG schema is referred from NVDL that option is not honored. I logged it and as we will have progress on it I will let you now.
Ideally I believe that should be an option for the validate action in the NVDL script.

Best Regards,
George
George Cristian Bina
george
Site Admin
 
Posts: 2028
Joined: Thu Jan 09, 2003 2:58 pm

Re: enabling id/idref validation for relaxng schemas

Postby george » Tue Jun 01, 2010 2:48 pm

While starting to work on this I see that it is possible to enable the ID/IDREF checking with an option. The NVDL script needs to be modified as below:

Code: Select all
<?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/relax-ng-compact-syntax">
        <option name="http://www.thaiopensource.com/validate/check-id-idref"/>
      </validate>
    </namespace>
  </mode>

</rules>


That makes the issue invalid.
There is also an issue logged on Jing to turn off by default the ID/IDREF checking so the NVDL validation will be consistent with that
http://code.google.com/p/jing-trang/issues/detail?id=36

Best Regards,
George
George Cristian Bina
george
Site Admin
 
Posts: 2028
Joined: Thu Jan 09, 2003 2:58 pm


Return to oNVDL Related Issues

Who is online

Users browsing this forum: No registered users and 0 guests

cron
XML Editor | XML Author | WYSIWYG Editors | Schema Editor | XSD Documentation | XSL/XSLT Editor | XQuery | XML Databases | SVN Client
© 2002-2011 SyncRO Soft Ltd. All rights reserved. | Sitemap | Privacy Policy | This website was created & generated with <oXygen/>® XML Editor