xsd/SchemaObr.xsd (70 lines of code) (raw):

<?xml version="1.0" encoding="ISO-8859-1" ?> <!-- Licensed to the Apache Software Foundation (ASF) under one or more contributor license agreements. See the NOTICE file distributed with this work for additional information regarding copyright ownership. The ASF licenses this file to you under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License. --> <xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema"> <!-- definition of simple elements --> <!-- definition of attribute --> <xs:attribute name="name" type="xs:string"/> <xs:attribute name="filter" type="xs:string"/> <xs:attribute name="extend" type="xs:boolean"/> <xs:attribute name="multiple" type="xs:boolean"/> <xs:attribute name="optional" type="xs:boolean"/> <xs:attribute name="id" type="xs:string"/> <xs:attribute name="n" type="xs:string"/> <xs:attribute name="v" type="xs:string"/> <xs:attribute name="t" type="xs:string"/> <xs:element name="require"> <xs:complexType mixed="true"> <xs:attribute ref="name" use="required"/> <xs:attribute ref="filter" use="required"/> <xs:attribute ref="extend" use="required"/> <xs:attribute ref="multiple" use="required"/> <xs:attribute ref="optional" use="required"/> </xs:complexType> </xs:element> <xs:element name="category"> <xs:complexType> <xs:attribute ref="id" use="required"/> </xs:complexType> </xs:element> <xs:element name="p"> <xs:complexType> <xs:attribute ref="n" use="required"/> <xs:attribute ref="v" use="required"/> <xs:attribute ref="t" /> </xs:complexType> </xs:element> <xs:element name="capability"> <xs:complexType> <xs:sequence> <xs:element ref="p" minOccurs="0" maxOccurs="unbounded"/> </xs:sequence> <xs:attribute name="name" type="xs:string" use="required"/> </xs:complexType> </xs:element> <xs:element name="resource"> <xs:complexType> <xs:sequence> <xs:element name="description" type="xs:string" minOccurs="0" maxOccurs="1"/> <xs:element name="size" type="xs:long" minOccurs="0" maxOccurs="1"/> <xs:element name="documentation" type="xs:string" minOccurs="0" maxOccurs="1"/> <xs:element name="source" type="xs:string" minOccurs="0" maxOccurs="1"/> <xs:element name="javadoc" type="xs:string" minOccurs="0" maxOccurs="1"/> <xs:element name="license" type="xs:string" minOccurs="0" maxOccurs="1"/> <xs:element ref="category" minOccurs="0" maxOccurs="unbounded"/> <xs:element ref="capability" minOccurs="0" maxOccurs="unbounded"/> <xs:element ref="require" minOccurs="0" maxOccurs="unbounded"/> </xs:sequence> <xs:attribute ref="id" use="required"/> <xs:attribute name="presentationname" type="xs:string" use="optional"/> <xs:attribute name="symbolicname" type="xs:string" use="optional"/> <xs:attribute name="uri" type="xs:string" use="optional"/> <xs:attribute name="version" type="xs:string" use="optional"/> </xs:complexType> </xs:element> <xs:element name="repository"> <xs:complexType> <xs:sequence> <xs:element ref="resource" minOccurs="0" maxOccurs="unbounded"/> </xs:sequence> <xs:attribute name="name" type="xs:string" use="required"/> <xs:attribute name="lastmodified" type="xs:string" use="optional"/> </xs:complexType> </xs:element> </xs:schema>