supplemental-ui/ns/nb-module-project/3.xsd (122 lines of code) (raw):

<?xml version="1.0" encoding="UTF-8"?> <!-- 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. --> <xsd:schema xmlns:xsd="http://www.w3.org/2001/XMLSchema" targetNamespace="http://www.netbeans.org/ns/nb-module-project/3" xmlns="http://www.netbeans.org/ns/nb-module-project/3" elementFormDefault="qualified"> <xsd:element name="data"> <xsd:complexType> <xsd:sequence> <xsd:element name="code-name-base" type="javaPackageType"/> <xsd:choice minOccurs="0"> <xsd:element name="suite-component"/> <xsd:element name="standalone"/> </xsd:choice> <xsd:element name="module-dependencies" type="moduleDependenciesType"/> <xsd:element name="test-dependencies" type="testDependenciesType" minOccurs="0"/> <xsd:choice> <xsd:element name="public-packages" type="publicPackagesType"/> <xsd:element name="friend-packages" type="friendPackagesType"/> </xsd:choice> <xsd:element name="class-path-extension" minOccurs="0" maxOccurs="unbounded" type="classPathExtensionType"/> <xsd:element name="extra-compilation-unit" minOccurs="0" maxOccurs="unbounded" type="compilation-unit"/> </xsd:sequence> </xsd:complexType> </xsd:element> <xsd:complexType name="moduleDependenciesType"> <xsd:sequence> <xsd:element name="dependency" type="moduleDependencyType" minOccurs="0" maxOccurs="unbounded"/> </xsd:sequence> </xsd:complexType> <xsd:complexType name="moduleDependencyType"> <xsd:sequence> <xsd:element name="code-name-base" type="javaPackageType"/> <!-- location in source tree is derived from code-name-base --> <!-- It is senseless to have *none* of the following. --> <!-- compile-dependency implies build-prerequisite. --> <xsd:element name="build-prerequisite" minOccurs="0"/> <xsd:element name="compile-dependency" minOccurs="0"/> <xsd:element name="run-dependency" minOccurs="0" type="runDependencyType"/> </xsd:sequence> </xsd:complexType> <xsd:complexType name="runDependencyType"> <xsd:sequence> <xsd:element name="release-version" type="releaseVersionType" minOccurs="0"/> <xsd:choice minOccurs="0"> <xsd:element name="specification-version" type="specificationVersionType"/> <xsd:element name="implementation-version"> <!-- Empty; actual impl version to use determined during the build --> <xsd:complexType/> </xsd:element> </xsd:choice> </xsd:sequence> </xsd:complexType> <xsd:simpleType name="javaPackageType"> <xsd:restriction base="xsd:NCName"> <!-- XXX should also handle Unicode I suppose --> <xsd:pattern value="[a-zA-Z][a-zA-Z0-9_]*(\.[a-zA-Z][a-zA-Z0-9_]*)*"/> </xsd:restriction> </xsd:simpleType> <xsd:simpleType name="releaseVersionType"> <xsd:union memberTypes="xsd:nonNegativeInteger"> <xsd:simpleType> <xsd:restriction base="xsd:NMTOKEN"> <xsd:pattern value="(0|[1-9][0-9]*)-[1-9][0-9]*"/> </xsd:restriction> </xsd:simpleType> </xsd:union> </xsd:simpleType> <xsd:simpleType name="specificationVersionType"> <xsd:restriction base="xsd:NMTOKEN"> <xsd:pattern value="(0|[1-9][0-9]*)(\.(0|[1-9][0-9]*))*"/> </xsd:restriction> </xsd:simpleType> <xsd:complexType name="publicPackagesType"> <xsd:sequence> <xsd:choice minOccurs="0" maxOccurs="unbounded"> <xsd:element name="package" type="javaPackageType"/> <xsd:element name="subpackages" type="javaPackageType"/> </xsd:choice> </xsd:sequence> </xsd:complexType> <xsd:complexType name="friendPackagesType"> <xsd:sequence> <xsd:choice minOccurs="1" maxOccurs="unbounded"> <xsd:element name="friend" type="javaPackageType"/> </xsd:choice> <xsd:choice minOccurs="1" maxOccurs="unbounded"> <xsd:element name="package" type="javaPackageType"/> </xsd:choice> </xsd:sequence> </xsd:complexType> <!-- Loosely borrowed from ant/freeform: --> <!-- Some text that might be substituted with Ant property references. --> <xsd:simpleType name="substitutable-text"> <xsd:restriction base="xsd:string"> <!-- XXX limit by regexp, perhaps --> </xsd:restriction> </xsd:simpleType> <xsd:complexType name="compilation-unit"> <xsd:sequence> <xsd:element name="package-root" type="substitutable-text"/> <xsd:element name="classpath" type="substitutable-text"/> <xsd:element name="built-to" minOccurs="0" maxOccurs="unbounded" type="substitutable-text"/> </xsd:sequence> </xsd:complexType> <xsd:complexType name="classPathExtensionType"> <xsd:sequence> <xsd:element name="runtime-relative-path" type="xsd:string"/> <xsd:element name="binary-origin" minOccurs="0" type="substitutable-text"/> </xsd:sequence> </xsd:complexType> <!-- Test Dependencies --> <xsd:complexType name="testDependenciesType"> <xsd:sequence> <xsd:element name="test-type" type="testTypeType" minOccurs="0" maxOccurs="unbounded"/> </xsd:sequence> </xsd:complexType> <xsd:complexType name="testTypeType"> <xsd:sequence> <xsd:element name="name" type="xsd:string"/> <xsd:element name="test-dependency" type="testDependencyType" minOccurs="0" maxOccurs="unbounded"/> </xsd:sequence> </xsd:complexType> <xsd:complexType name="testDependencyType"> <xsd:sequence> <xsd:element name="code-name-base" type="javaPackageType"/> <xsd:element name="recursive" minOccurs="0"/> <xsd:element name="compile-dependency" minOccurs="0"/> <xsd:element name="test" minOccurs="0"/> </xsd:sequence> </xsd:complexType> </xsd:schema>