Validating XSD from Dan Scott. For use during IDL development to check legal
authormiker <miker@dcc99617-32d9-48b4-a31d-7c20da2025e4>
Mon, 28 May 2007 19:26:12 +0000 (19:26 +0000)
committermiker <miker@dcc99617-32d9-48b4-a31d-7c20da2025e4>
Mon, 28 May 2007 19:26:12 +0000 (19:26 +0000)
values in fm_IDL.xml (and like files, should any ever exist);

http://list.georgialibraries.org/pipermail/open-ils-dev/2007-May/001096.html

git-svn-id: svn://svn.open-ils.org/ILS/trunk@7367 dcc99617-32d9-48b4-a31d-7c20da2025e4

Open-ILS/examples/fm_IDL.xsd [new file with mode: 0644]
Open-ILS/examples/oils_obj.xsd [new file with mode: 0644]
Open-ILS/examples/oils_persist.xsd [new file with mode: 0644]
Open-ILS/examples/reporter.xsd [new file with mode: 0644]

diff --git a/Open-ILS/examples/fm_IDL.xsd b/Open-ILS/examples/fm_IDL.xsd
new file mode 100644 (file)
index 0000000..41f9629
--- /dev/null
@@ -0,0 +1,109 @@
+<?xml version="1.0" encoding="UTF-8" ?>
+
+<!--
+
+Copyright (C) 2007 Laurentian University
+Dan Scott <dscott@laurentian.ca>
+
+This program is free software; you can redistribute it and/or
+modify it under the terms of the GNU General Public License
+as published by the Free Software Foundation; either version 2
+of the License, or (at your option) any later version.
+
+This program is distributed in the hope that it will be useful,
+but WITHOUT ANY WARRANTY; without even the implied warranty of
+MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+GNU General Public License for more details.
+
+You should have received a copy of the GNU General Public License
+along with this program; if not, write to the Free Software
+Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA
+
+-->
+
+<xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema"
+ xmlns:idl="http://opensrf.org/spec/IDL/base/v1"
+ xmlns:oils_persist="http://open-ils.org/spec/opensrf/IDL/persistence/v1"
+ xmlns:oils_obj="http://open-ils.org/spec/opensrf/IDL/objects/v1"
+ xmlns:reporter="http://open-ils.org/spec/opensrf/IDL/reporter/v1"
+ targetNamespace="http://opensrf.org/spec/IDL/base/v1"
+ elementFormDefault="qualified"
+ attributeFormDefault="unqualified"
+>
+
+<xs:import namespace="http://open-ils.org/spec/opensrf/IDL/persistence/v1"
+ schemaLocation="oils_persist.xsd"/>
+
+<xs:import namespace="http://open-ils.org/spec/opensrf/IDL/objects/v1"
+ schemaLocation="oils_obj.xsd"/>
+
+<xs:import namespace="http://open-ils.org/spec/opensrf/IDL/reporter/v1"
+ schemaLocation="reporter.xsd"/>
+
+<!-- define simple elements -->
+<xs:element name="field" nillable="true">
+ <xs:complexType>
+  <xs:attribute name="name"/>
+  <xs:attribute ref="oils_obj:array_position"/>
+  <xs:attribute ref="oils_persist:primitive"/>
+  <xs:attribute ref="oils_persist:virtual"/>
+  <xs:attribute ref="reporter:label"/>
+  <xs:attribute ref="reporter:datatype"/>
+  <xs:attribute ref="reporter:selector"/>
+ </xs:complexType>
+</xs:element>
+
+<xs:element name="link" nillable="true">
+ <xs:complexType>
+  <xs:attribute name="field" type="xs:string" use="required"/>
+  <xs:attribute name="reltype" type="xs:string" use="required"/>
+  <xs:attribute name="key" type="xs:string" use="required"/>
+  <xs:attribute name="map" type="xs:string" use="required"/>
+  <xs:attribute name="class" type="xs:string" use="required"/>
+  <xs:attribute ref="reporter:label"/>
+ </xs:complexType>
+</xs:element>
+
+<xs:element name="fields">
+ <xs:complexType>
+  <xs:sequence>
+   <xs:element ref="idl:field" minOccurs="1" maxOccurs="unbounded"/>
+  </xs:sequence>
+  <xs:attribute ref="oils_persist:primary"/>
+  <xs:attribute ref="oils_persist:sequence"/>
+ </xs:complexType>
+</xs:element>
+
+<xs:element name="links">
+ <xs:complexType>
+  <xs:sequence>
+   <xs:element ref="idl:link" minOccurs="0" maxOccurs="unbounded"/>
+  </xs:sequence>
+ </xs:complexType>
+</xs:element>
+
+<xs:element name="class">
+ <xs:complexType>
+  <xs:sequence>
+   <xs:element ref="idl:fields"/>
+   <xs:element ref="idl:links" minOccurs="0"/>
+  </xs:sequence>
+  <xs:attribute name="id"/>
+  <xs:attribute name="controller"/>
+  <xs:attribute ref="oils_obj:fieldmapper"/>
+  <xs:attribute ref="oils_persist:tablename"/>
+  <xs:attribute ref="oils_persist:virtual"/>
+  <xs:attribute ref="reporter:core"/>
+  <xs:attribute ref="reporter:label"/>
+ </xs:complexType>
+</xs:element>
+
+<xs:element name="IDL">
+ <xs:complexType>
+  <xs:sequence>
+   <xs:element ref="idl:class" minOccurs="1" maxOccurs="unbounded"/>
+  </xs:sequence>
+ </xs:complexType>
+</xs:element>
+
+</xs:schema>
diff --git a/Open-ILS/examples/oils_obj.xsd b/Open-ILS/examples/oils_obj.xsd
new file mode 100644 (file)
index 0000000..f41ce8c
--- /dev/null
@@ -0,0 +1,34 @@
+<?xml version="1.0" encoding="UTF-8" ?>
+
+<!--
+
+Copyright (C) 2007 Laurentian University
+Dan Scott <dscott@laurentian.ca>
+
+This program is free software; you can redistribute it and/or
+modify it under the terms of the GNU General Public License
+as published by the Free Software Foundation; either version 2
+of the License, or (at your option) any later version.
+
+This program is distributed in the hope that it will be useful,
+but WITHOUT ANY WARRANTY; without even the implied warranty of
+MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+GNU General Public License for more details.
+
+You should have received a copy of the GNU General Public License
+along with this program; if not, write to the Free Software
+Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA
+
+-->
+
+<xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema"
+ xmlns="http://open-ils.org/spec/opensrf/IDL/objects/v1"
+ targetNamespace="http://open-ils.org/spec/opensrf/IDL/objects/v1"
+ elementFormDefault="unqualified"
+ attributeFormDefault="unqualified"
+>
+
+<xs:attribute name="array_position" type="xs:nonNegativeInteger"/>
+<xs:attribute name="fieldmapper"/>
+
+</xs:schema>
diff --git a/Open-ILS/examples/oils_persist.xsd b/Open-ILS/examples/oils_persist.xsd
new file mode 100644 (file)
index 0000000..6ecc310
--- /dev/null
@@ -0,0 +1,37 @@
+<?xml version="1.0" encoding="UTF-8" ?>
+
+<!--
+
+Copyright (C) 2007 Laurentian University
+Dan Scott <dscott@laurentian.ca>
+
+This program is free software; you can redistribute it and/or
+modify it under the terms of the GNU General Public License
+as published by the Free Software Foundation; either version 2
+of the License, or (at your option) any later version.
+
+This program is distributed in the hope that it will be useful,
+but WITHOUT ANY WARRANTY; without even the implied warranty of
+MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+GNU General Public License for more details.
+
+You should have received a copy of the GNU General Public License
+along with this program; if not, write to the Free Software
+Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA
+
+-->
+
+<xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema"
+ xmlns="http://open-ils.org/spec/opensrf/IDL/persistence/v1"
+ targetNamespace="http://open-ils.org/spec/opensrf/IDL/persistence/v1"
+ elementFormDefault="unqualified"
+ attributeFormDefault="unqualified"
+>
+
+<xs:attribute name="primary"/>
+<xs:attribute name="primitive"/>
+<xs:attribute name="sequence"/>
+<xs:attribute name="tablename"/>
+<xs:attribute name="virtual" type="xs:boolean"/>
+
+</xs:schema>
diff --git a/Open-ILS/examples/reporter.xsd b/Open-ILS/examples/reporter.xsd
new file mode 100644 (file)
index 0000000..4ff84be
--- /dev/null
@@ -0,0 +1,36 @@
+<?xml version="1.0" encoding="UTF-8" ?>
+
+<!--
+
+Copyright (C) 2007 Laurentian University
+Dan Scott <dscott@laurentian.ca>
+
+This program is free software; you can redistribute it and/or
+modify it under the terms of the GNU General Public License
+as published by the Free Software Foundation; either version 2
+of the License, or (at your option) any later version.
+
+This program is distributed in the hope that it will be useful,
+but WITHOUT ANY WARRANTY; without even the implied warranty of
+MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+GNU General Public License for more details.
+
+You should have received a copy of the GNU General Public License
+along with this program; if not, write to the Free Software
+Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA
+
+-->
+
+<xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema"
+ xmlns="http://open-ils.org/spec/opensrf/IDL/reporter/v1"
+ targetNamespace="http://open-ils.org/spec/opensrf/IDL/reporter/v1"
+ elementFormDefault="unqualified"
+ attributeFormDefault="unqualified"
+>
+
+<xs:attribute name="core" type="xs:boolean"/>
+<xs:attribute name="datatype"/>
+<xs:attribute name="label"/>
+<xs:attribute name="selector"/>
+
+</xs:schema>