Validation against 2 schemas through .nvdl
Posted: 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:
It generally works (I had to add the last namespace, otherwise the 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.:
'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.
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>
Code: Select all
<TEI xmlns="http://www.tei-c.org/ns/1.0" xml:lang="en">
Code: Select all
<material xml:lang="en">Lead</material>
Is there a mean to amend that?
Many thanks for your help. Kind regards,
Alex.