From 04ac0ea4fabe3fd688fe8af337157a057d96cf14 Mon Sep 17 00:00:00 2001
From: Pete Peterson <petersonpf@ornl.gov>
Date: Mon, 9 Jul 2018 10:51:05 -0400
Subject: [PATCH] Modify schema to work with xmllint

---
 .../Facilities/1.0/FacilitiesSchema.xsd       | 66 ++++++++++---------
 1 file changed, 36 insertions(+), 30 deletions(-)

diff --git a/instrument/Schema/Facilities/1.0/FacilitiesSchema.xsd b/instrument/Schema/Facilities/1.0/FacilitiesSchema.xsd
index ae7f344680f..5a0ace1f0e8 100644
--- a/instrument/Schema/Facilities/1.0/FacilitiesSchema.xsd
+++ b/instrument/Schema/Facilities/1.0/FacilitiesSchema.xsd
@@ -1,5 +1,5 @@
-<?xml version="1.0" encoding="utf-8"?>
-<xs:schema xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" attributeFormDefault="unqualified" elementFormDefault="qualified" 
+<?xml version="1.0" encoding="utf-8"?>
+<xs:schema xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" attributeFormDefault="unqualified" elementFormDefault="qualified"
            xmlns:xs="http://www.w3.org/2001/XMLSchema" version="1.0">
   <xs:element name="facilities">
     <xs:complexType>
@@ -32,6 +32,7 @@
               </xs:element>
               <xs:element name="catalog">
                 <xs:complexType>
+                  <xs:sequence>
                   <xs:element name="soapendpoint">
                     <xs:complexType>
                       <xs:attribute name="url" type="xs:string"/>
@@ -44,31 +45,34 @@
                   </xs:element>
                   <xs:element name="filelocation">
                     <xs:complexType>
-                      <xs:element name="prefix">
-                        <xs:complexType>
-                          <xs:attribute name="regex" type="xs:string"/>
-                        </xs:complexType>
-                      </xs:element>
-                      <xs:element name="windows">
-                        <xs:complexType>
-                          <xs:attribute name="replacement" type="xs:string"/>
-                        </xs:complexType>
-                      </xs:element>
-                      <xs:element name="linux">
-                        <xs:complexType>
-                          <xs:attribute name="replacement" type="xs:string"/>
-                        </xs:complexType>
-                      </xs:element>
-                      <xs:element name="mac">
-                        <xs:complexType>
-                          <xs:attribute name="replacement" type="xs:string"/>
-                        </xs:complexType>
-                      </xs:element>
+                      <xs:sequence>
+                        <xs:element name="prefix">
+                          <xs:complexType>
+                            <xs:attribute name="regex" type="xs:string"/>
+                          </xs:complexType>
+                        </xs:element>
+                        <xs:element name="windows">
+                          <xs:complexType>
+                            <xs:attribute name="replacement" type="xs:string"/>
+                          </xs:complexType>
+                        </xs:element>
+                        <xs:element name="linux">
+                          <xs:complexType>
+                            <xs:attribute name="replacement" type="xs:string"/>
+                          </xs:complexType>
+                        </xs:element>
+                        <xs:element name="mac">
+                          <xs:complexType>
+                            <xs:attribute name="replacement" type="xs:string"/>
+                          </xs:complexType>
+                        </xs:element>
+                      </xs:sequence>
                     </xs:complexType>
                   </xs:element>
+                  </xs:sequence>
                   <xs:attribute name="name" type="xs:string"/>
                 </xs:complexType>
-              </xs:element> 
+              </xs:element>
               <xs:element name="instrument" maxOccurs="unbounded">
                 <xs:complexType>
                   <xs:choice maxOccurs="unbounded">
@@ -82,14 +86,16 @@
                     <xs:element name="technique" maxOccurs="unbounded" type="xs:string"/>
                     <xs:element name="livedata">
                       <xs:complexType>
+                        <xs:choice>
+                          <xs:element name="connection" minOccurs="1" maxOccurs="unbounded">
+                            <xs:complexType>
+                              <xs:attribute name="name" type="xs:string" use="required"/>
+                              <xs:attribute name="address" type="xs:string" use="required"/>
+                              <xs:attribute name="listener" type="xs:string" use="required"/>
+                            </xs:complexType>
+                          </xs:element>
+                        </xs:choice>
                         <xs:attribute name="default" type="xs:string" use="optional"/>
-                        <xs:element name="connection" minOccurs="1" maxOccurs="unbounded">
-                          <xs:complexType>
-                            <xs:attribute name="name" type="xs:string" use="required"/>
-                            <xs:attribute name="address" type="xs:string" use="required"/>
-                            <xs:attribute name="listener" type="xs:string" use="required"/>
-                          </xs:complexType>
-                        </xs:element>
                       </xs:complexType>
                     </xs:element>
                   </xs:choice>
-- 
GitLab