From 21c2fb8ff41267334fd0469de26d493f3fe4ef3b Mon Sep 17 00:00:00 2001 From: Aron Roberts Date: Mon, 16 Mar 2009 20:12:40 +0000 Subject: [PATCH] Removed extraneous files, leaving just one set of current files - RELAX NG schema, generated W3C XML Schema, and sample XML instance document - for collectionObject, collectionObjects (a list of zero or more collectionObject(s)), and serviceErrorResponse. Added a utility script for validating W3C XML Schema documents via XMLStarlet. Made all defaultCollectionObject elements required, although their values may be blank (empty). --- .../aron/schema/collectionObject-full-ns.rng | 277 ------------------ sandbox/aron/schema/collectionObject-full.rng | 270 ----------------- .../schema/collectionObject-ns-no-prefix.xsd | 166 ----------- sandbox/aron/schema/collectionObject-ns.xml | 86 ------ sandbox/aron/schema/collectionObject-ns.xsd | 165 ----------- sandbox/aron/schema/collectionObject.rng | 239 ++++++++++++++- sandbox/aron/schema/collectionObject.xml | 18 +- sandbox/aron/schema/collectionObject.xsd | 32 +- sandbox/aron/schema/collectionObjects.rng | 5 +- .../aron/schema/defaultCollectionObject.rng | 120 -------- sandbox/aron/schema/rng-to-xsd.sh | 4 + .../aron/schema/sampleMmiCollectionObject.rng | 102 ------- sandbox/aron/schema/serviceMetadata.rng | 133 --------- sandbox/aron/schema/validate-rng.sh | 4 + sandbox/aron/schema/validate-xsd.sh | 23 ++ 15 files changed, 289 insertions(+), 1355 deletions(-) delete mode 100644 sandbox/aron/schema/collectionObject-full-ns.rng delete mode 100644 sandbox/aron/schema/collectionObject-full.rng delete mode 100644 sandbox/aron/schema/collectionObject-ns-no-prefix.xsd delete mode 100644 sandbox/aron/schema/collectionObject-ns.xml delete mode 100644 sandbox/aron/schema/collectionObject-ns.xsd delete mode 100644 sandbox/aron/schema/defaultCollectionObject.rng delete mode 100644 sandbox/aron/schema/sampleMmiCollectionObject.rng delete mode 100644 sandbox/aron/schema/serviceMetadata.rng create mode 100644 sandbox/aron/schema/validate-xsd.sh diff --git a/sandbox/aron/schema/collectionObject-full-ns.rng b/sandbox/aron/schema/collectionObject-full-ns.rng deleted file mode 100644 index 90bb33583..000000000 --- a/sandbox/aron/schema/collectionObject-full-ns.rng +++ /dev/null @@ -1,277 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - 1 - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/sandbox/aron/schema/collectionObject-full.rng b/sandbox/aron/schema/collectionObject-full.rng deleted file mode 100644 index 2c59821ab..000000000 --- a/sandbox/aron/schema/collectionObject-full.rng +++ /dev/null @@ -1,270 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - 1 - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/sandbox/aron/schema/collectionObject-ns-no-prefix.xsd b/sandbox/aron/schema/collectionObject-ns-no-prefix.xsd deleted file mode 100644 index afeeac6c2..000000000 --- a/sandbox/aron/schema/collectionObject-ns-no-prefix.xsd +++ /dev/null @@ -1,166 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/sandbox/aron/schema/collectionObject-ns.xml b/sandbox/aron/schema/collectionObject-ns.xml deleted file mode 100644 index 4fdd9d488..000000000 --- a/sandbox/aron/schema/collectionObject-ns.xml +++ /dev/null @@ -1,86 +0,0 @@ - - - - - - - - - - org.collectionspace.797220effa5fa160 - - - - - - - - - - 1984.021.0049 - - Radio News, vol. 10, no. 2, August 1928 - - - Radio News, August 1928. The cover of this issue features an -illustration of a man and woman watching an early "radio movie." Text on -the cover reads, "Radio's Greatest Magazine / Radio News / August 25 -Cents / Over 200 illustrations / Edited by Hugo Gernsback / Radio Movies -and Television for the Home / Experimenter Publishing Company, 230 Fifth -Avenue, New York." - -In addition to articles about radios and radio technology, the magazine -also contains several articles about developments in the field of -television. The issue begins with an editorial about the future of -television by the magazine's editor, Hugo Gernsback, which is followed -by an article about the radio movie receiver system invented by C. -Francis Jenkins. The article includes drawings illustrating the layout -of the sytem. - - - - - - - diff --git a/sandbox/aron/schema/collectionObject-ns.xsd b/sandbox/aron/schema/collectionObject-ns.xsd deleted file mode 100644 index 49c10ee86..000000000 --- a/sandbox/aron/schema/collectionObject-ns.xsd +++ /dev/null @@ -1,165 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/sandbox/aron/schema/collectionObject.rng b/sandbox/aron/schema/collectionObject.rng index 69491cd8c..e1d3c32ed 100644 --- a/sandbox/aron/schema/collectionObject.rng +++ b/sandbox/aron/schema/collectionObject.rng @@ -2,9 +2,24 @@ + name="collectionObject" + ns="http://collectionspace.org/hello" + xmlns="http://relaxng.org/ns/structure/1.0" + datatypeLibrary="http://www.w3.org/2001/XMLSchema-datatypes"> + + + + + - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + - + + + + + + + + + + + + 1 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + - + - - diff --git a/sandbox/aron/schema/collectionObject.xml b/sandbox/aron/schema/collectionObject.xml index 97615c0c0..4fdd9d488 100644 --- a/sandbox/aron/schema/collectionObject.xml +++ b/sandbox/aron/schema/collectionObject.xml @@ -2,10 +2,11 @@ - + @@ -27,11 +29,14 @@ @@ -60,6 +65,7 @@ of the sytem. + diff --git a/sandbox/aron/schema/collectionObject.xsd b/sandbox/aron/schema/collectionObject.xsd index 1d8bbe89b..cc8d30e17 100644 --- a/sandbox/aron/schema/collectionObject.xsd +++ b/sandbox/aron/schema/collectionObject.xsd @@ -1,21 +1,21 @@ - + - - + + - - - - - + + + + + @@ -67,14 +67,14 @@ - - - - - - - - + + + + + + + + diff --git a/sandbox/aron/schema/collectionObjects.rng b/sandbox/aron/schema/collectionObjects.rng index 4e84991b8..d0116e585 100644 --- a/sandbox/aron/schema/collectionObjects.rng +++ b/sandbox/aron/schema/collectionObjects.rng @@ -35,8 +35,9 @@ datatypeLibrary="http://www.w3.org/2001/XMLSchema-datatypes"> - - - - - - - - - - - - 1 - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/sandbox/aron/schema/rng-to-xsd.sh b/sandbox/aron/schema/rng-to-xsd.sh index 053b369bc..1d71264d7 100644 --- a/sandbox/aron/schema/rng-to-xsd.sh +++ b/sandbox/aron/schema/rng-to-xsd.sh @@ -5,6 +5,10 @@ # Simple bash shell script to generate a W3C XML Schema (XSD) document # from a RELAX NG schema document. # +# Uses James Clark's Trang utility, http://www.thaiopensource.com/relaxng/trang.html +# +# Assumes Trang's 'trang.jar' file is located in a 'tools' subdirectory of the current directory. +# # Requires two arguments: # - Filename of the RELAX NG schema document. # (Or the full path to this document, if it is not in the current directory.) diff --git a/sandbox/aron/schema/sampleMmiCollectionObject.rng b/sandbox/aron/schema/sampleMmiCollectionObject.rng deleted file mode 100644 index 383054185..000000000 --- a/sandbox/aron/schema/sampleMmiCollectionObject.rng +++ /dev/null @@ -1,102 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - in - mm - - - - - - - - - diff --git a/sandbox/aron/schema/serviceMetadata.rng b/sandbox/aron/schema/serviceMetadata.rng deleted file mode 100644 index b6f1ae85d..000000000 --- a/sandbox/aron/schema/serviceMetadata.rng +++ /dev/null @@ -1,133 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/sandbox/aron/schema/validate-rng.sh b/sandbox/aron/schema/validate-rng.sh index 5cc51a9bf..517b9d62c 100644 --- a/sandbox/aron/schema/validate-rng.sh +++ b/sandbox/aron/schema/validate-rng.sh @@ -3,6 +3,10 @@ # Simple bash shell script to validate an XML instance document # against a RELAX NG schema. # +# Uses James Clark's Jing utility, http://www.thaiopensource.com/relaxng/jing.html +# +# Assumes Jing's 'jing.jar' file is located in a 'tools' subdirectory of the current directory. +# # Requires two arguments: # - Filename of the RELAX NG schema document. # (Or the full path to this document, if it is not in the current directory.) diff --git a/sandbox/aron/schema/validate-xsd.sh b/sandbox/aron/schema/validate-xsd.sh new file mode 100644 index 000000000..3e9da9dc4 --- /dev/null +++ b/sandbox/aron/schema/validate-xsd.sh @@ -0,0 +1,23 @@ +#!/bin/sh +# +# Simple bash shell script to validate an XML instance document +# against a W3C XML Schema. +# +# Uses the XMLStarlet utility, http://xmlstar.sourceforge.net/ +# +# Assumes the 'xmlstarlet' executable is located within the shell's executable path. +# +# Note that XMLStarlet's support for XML Schema is "not yet fully supported", due to +# incomplete support in a dependency, the XML C toolkit for Gnome (http://xmlsoft.org/). +# +# Requires two arguments: +# - Filename of the W3C XML Schema document. +# (Or the full path to this document, if it is not in the current directory.) +# - Filename of the XML instance document. +# (Or the full path to this document, if it is not in the current directory.) +# +# $Author: aron $ +# $Revision: 57 $ +# $Date: 2009-03-05 16:06:06 -0800 (Thu, 05 Mar 2009) $ + +xmlstarlet val --err --xsd $1 $2 \ No newline at end of file -- 2.47.3