OASIS Mailing List ArchivesView the OASIS mailing list archive below
or browse/search using MarkMail.


Help: OASIS Mailing Lists Help | MarkMail Help

[Date Prev] | [Thread Prev] | [Thread Next] | [Date Next] -- [Date Index] | [Thread Index]
Re: [xml-dev] validation against xml schema (xsd)

Hi Matt,

Philippe is right, NVDL should work, I also should have suggested it.
You can find the available NVDL implementations linked from here


In addition to those listed there you can also use Jing from
because the oNVDL implementation was merged back into Jing. Note however 
that you need to check out Jing [1] and just run its build script to get 
the jars with NVDL support, for details see [2].

Basically you need to create a script that in the initial mode matches 
on each namespace you are interested in and validates with the schema 
for each namespace using a mode that attaches all the descendant 
sections to the initial one, something like below:

<?xml version="1.0" encoding="UTF-8"?>
<rules xmlns="http://purl.oclc.org/dsdl/nvdl/ns/structure/1.0"; 
     <mode name="match">
         <namespace ns="http://www.example.com/namespaceA";>
             <validate schema="a.xsd" useMode="attach"/>
         <namespace ns="http://www.example.com/namespaceB";>
             <validate schema="b.xsd" useMode="attach"/>
     <mode name="attach">

Note also that using NVDL allows you to use not only XML Schema but also 
Schematron and Relax NG and also you can validate a document against 
multiple schemas:

Relax NG:
         <namespace ns="http://www.example.com/namespaceC";>
             <validate schema="c.rng" useMode="attach"/>
Multiple validations, against XSD and Schematron:
         <namespace ns="http://www.example.com/namespaceD";>
             <validate schema="d.xsd" useMode="attach"/>
             <validate schema="d.sch" useMode="attach"/>

[1] http://code.google.com/p/jing-trang/source/checkout
[2] http://code.google.com/p/jing-trang/wiki/HowToBuildFromSource

Best Regards,
George Cristian Bina
<oXygen/> XML Editor, Schema Editor and XSLT Editor/Debugger

Johnson, Matthew C. (LNG-HBE) wrote:
> Thank you Philippe.  I had been considering NVDL (I recall a thread
> involving Roger Costello on NVDL) but have not had time to investigate
> further.  Perhaps, this will give me the proper motivation!
> Matt
>> -----Original Message-----
>> From: Philippe Poulard [mailto:philippe.poulard@sophia.inria.fr]
>> Sent: Friday, March 06, 2009 4:28 AM
>> To: Johnson, Matthew C. (LNG-HBE)
>> Cc: xml-dev@lists.xml.org
>> Subject: Re: [xml-dev] validation against xml schema (xsd)
>> Hi,
>> I think NVDL can do this for you:
>> http://nvdl.org/
>> --
>> Cordialement,
>>                ///
>>               (. .)
>>   --------ooO--(_)--Ooo--------
>> |      Philippe Poulard       |
>>   -----------------------------
>>   http://reflex.gforge.inria.fr/
>>         Have the RefleX !
> _______________________________________________________________________
> XML-DEV is a publicly archived, unmoderated list hosted by OASIS
> to support XML implementation and development. To minimize
> spam in the archives, you must subscribe before posting.
> [Un]Subscribe/change address: http://www.oasis-open.org/mlmanage/
> Or unsubscribe: xml-dev-unsubscribe@lists.xml.org
> subscribe: xml-dev-subscribe@lists.xml.org
> List archive: http://lists.xml.org/archives/xml-dev/
> List Guidelines: http://www.oasis-open.org/maillists/guidelines.php

[Date Prev] | [Thread Prev] | [Thread Next] | [Date Next] -- [Date Index] | [Thread Index]

News | XML in Industry | Calendar | XML Registry
Marketplace | Resources | MyXML.org | Sponsors | Privacy Statement

Copyright 1993-2007 XML.org. This site is hosted by OASIS