[XML-DEV Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message] Re: 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 http://nvdl.org/ In addition to those listed there you can also use Jing from http://code.google.com/p/jing-trang/ 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" startMode="match"> <mode name="match"> <namespace ns="http://www.example.com/namespaceA"> <validate schema="a.xsd" useMode="attach"/> </namespace> <namespace ns="http://www.example.com/namespaceB"> <validate schema="b.xsd" useMode="attach"/> </namespace> </mode> <mode name="attach"> <anyNamespace><attach/></anyNamespace> </mode> </rules> 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"/> </namespace> 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"/> </namespace> [1] http://code.google.com/p/jing-trang/source/checkout [2] http://code.google.com/p/jing-trang/wiki/HowToBuildFromSource Best Regards, George -- George Cristian Bina <oXygen/> XML Editor, Schema Editor and XSLT Editor/Debugger http://www.oxygenxml.com 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@s...] >> Sent: Friday, March 06, 2009 4:28 AM >> To: Johnson, Matthew C. (LNG-HBE) >> Cc: xml-dev@l... >> Subject: Re: 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@l... > subscribe: xml-dev-subscribe@l... > 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] |
PURCHASE STYLUS STUDIO ONLINE TODAY!Purchasing Stylus Studio from our online shop is Easy, Secure and Value Priced! Download The World's Best XML IDE!Accelerate XML development with our award-winning XML IDE - Download a free trial today! Subscribe in XML format
|