Validation against 2 schemas through .nvdl

Post here issues about NVDL, not specifically linked to the oNVDL implementation.
Alex18
Posts: 1
Joined: Thu Jul 19, 2018 3:22 pm

Validation against 2 schemas through .nvdl

Post by Alex18 » Thu Jul 19, 2018 4:10 pm

Good afternoon,
I'm pretty new to xml schemas. What I've done is to validate my xml file (TEI compliant) against, at the same time, an xs schema I wrote (named Sigidoc) and the Epidoc rng schema, through a small .nvdl schema, as follows:

Code: Select all

<?xml version="1.0" encoding="UTF-8"?>
<rules xmlns="http://purl.oclc.org/dsdl/nvdl/ns/structure/1.0"
xmlns:a="http://relaxng.org/ns/compatibility/annotations/1.0">
<namespace ns="http://schemas.com/SigiDoc_schema_LATEST">
<validate schema="SigiDoc_schema_LATEST.xsd"/>
</namespace>
<namespace ns="http://schemas.com/tei-epidoc">
<validate schema="tei-epidoc.rng"/>
</namespace>
<namespace ns="http://www.tei-c.org/ns/1.0">
<validate schema="tei-epidoc.rng"/>
</namespace>
</rules>
It generally works (I had to add the last namespace, otherwise the

Code: Select all

<TEI xmlns="http://www.tei-c.org/ns/1.0" xml:lang="en">
TEI namespace in my .xml file wasn't accepted), but it seems that TEI and the Epidoc schema take the upper hand on my own schema (SigiDoc), esp. where I wrote some restrictions (using them as a kind of controlled vocabulary): the restrictions concerning the attributes' values work without problem, but those concerning some elements to be filled in not. For ex.:

Code: Select all

<material xml:lang="en">Lead</material>
'Lead' is included in my xs schema along with 'Gold' and 'Silver': if I write another word (e.g. copper), it is rightly highlighted as an error after validation with SigiDoc schema, but nothing happens after validation with .nvdl.
Is there a mean to amend that?

Many thanks for your help. Kind regards,

Alex.

Radu
Posts: 6437
Joined: Fri Jul 09, 2004 5:18 pm

Re: Validation against 2 schemas through .nvdl

Post by Radu » Fri Jul 20, 2018 8:30 am

Hi Alex,

It's hard to tell what's wrong. Maybe you can email us (support@oxygenxml.com) a sample project containing a small test XML document and all required schemas and we can take a look at it.

Regards,
Radu
Radu Coravu
<oXygen/> XML Editor
http://www.oxygenxml.com

Post Reply