| <?xml version="1.0" encoding="UTF-8"?> |
| <!-- |
| DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER. |
| |
| Copyright 1997-2007 Sun Microsystems, Inc. All rights reserved. |
| |
| |
| The contents of this file are subject to the terms of either the GNU |
| General Public License Version 2 only ("GPL") or the Common |
| Development and Distribution License("CDDL") (collectively, the |
| "License"). You may not use this file except in compliance with the |
| License. You can obtain a copy of the License at |
| https://netbeans.org/cddl-gplv2.html |
| or nbbuild/licenses/CDDL-GPL-2-CP. See the License for the |
| specific language governing permissions and limitations under the |
| License. When distributing the software, include this License Header |
| Notice in each file and include the License file at |
| nbbuild/licenses/CDDL-GPL-2-CP. Sun designates this |
| particular file as subject to the "Classpath" exception as provided |
| by Sun in the GPL Version 2 section of the License file that |
| accompanied this code. If applicable, add the following below the |
| License Header, with the fields enclosed by brackets [] replaced by |
| your own identifying information: |
| "Portions Copyrighted [year] [name of copyright owner]" |
| |
| Contributor(s): |
| |
| The Original Software is NetBeans. The Initial Developer of the Original |
| Software is Sun Microsystems, Inc. Portions Copyright 1997-2006 Sun |
| Microsystems, Inc. All Rights Reserved. |
| |
| If you wish your version of this file to be governed by only the CDDL |
| or only the GPL Version 2, indicate your decision by adding |
| "[Contributor] elects to include this software in this distribution |
| under the [CDDL or GPL Version 2] license." If you do not indicate a |
| single choice of license, a recipient has the option to distribute |
| your version of this file under either the CDDL, the GPL Version 2 or |
| to extend the choice of license to its licensees as provided above. |
| However, if you add GPL Version 2 code and therefore, elected the GPL |
| Version 2 license, then the option applies only if the new code is |
| made subject to such option by the copyright holder. |
| --> |
| |
| <!-- |
| XML Schema to define the main parts of project.xml for a freeform project. |
| Cf. http://projects.netbeans.org/buildsys/design.html#freeform |
| --> |
| |
| <!-- XXX go over all uses of XSD primitive types and review (e.g. NMTOKEN vs. token vs. string) --> |
| |
| <xsd:schema xmlns:xsd="http://www.w3.org/2001/XMLSchema" |
| targetNamespace="https://netbeans.org/ns/freeform-project/2" |
| xmlns="https://netbeans.org/ns/freeform-project/2" |
| elementFormDefault="qualified"> |
| |
| <xsd:element name="general-data"> |
| <xsd:complexType> |
| <xsd:sequence> |
| <!-- Display name of project. --> |
| <xsd:element name="name" type="xsd:token"/> |
| <!-- Declaration of properties. --> |
| <xsd:element name="properties" minOccurs="0" type="properties"/> |
| <!-- List of sources. Default: just project directory. --> |
| <xsd:element name="folders" minOccurs="0" type="folders"/> |
| <!-- List of actions to run. --> |
| <xsd:element name="ide-actions" minOccurs="0" type="bound-actions"/> |
| <!-- List of exported build products. --> |
| <xsd:element name="export" minOccurs="0" maxOccurs="unbounded" type="export"/> |
| <!-- Appearance of logical view: --> |
| <xsd:element name="view" minOccurs="0"> |
| <xsd:complexType> |
| <xsd:sequence> |
| <xsd:element name="items" type="view-items"/> |
| <xsd:element name="context-menu" minOccurs="0" type="context-menu"/> |
| </xsd:sequence> |
| </xsd:complexType> |
| </xsd:element> |
| <xsd:element name="subprojects" minOccurs="0" type="subprojects"/> |
| <xsd:element name="project-license" minOccurs="0" maxOccurs="1" type="substitutable-text"/> |
| </xsd:sequence> |
| </xsd:complexType> |
| </xsd:element> |
| |
| <!-- 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="properties"> |
| <xsd:sequence> |
| <xsd:choice minOccurs="0" maxOccurs="unbounded"> |
| <xsd:element name="property" type="property-definition"/> |
| <xsd:element name="property-file" type="substitutable-text"/> |
| </xsd:choice> |
| </xsd:sequence> |
| </xsd:complexType> |
| |
| <xsd:complexType name="property-definition"> |
| <xsd:simpleContent> |
| <xsd:extension base="substitutable-text"> |
| <xsd:attribute name="name" type="xsd:NMTOKEN"/> |
| </xsd:extension> |
| </xsd:simpleContent> |
| </xsd:complexType> |
| |
| <xsd:complexType name="folders"> |
| <xsd:sequence> |
| <xsd:choice minOccurs="0" maxOccurs="unbounded"> |
| <!-- Generic and typed source roots (default: just project directory). --> |
| <xsd:element name="source-folder" type="maybe-typed-source-root"/> |
| <!-- Other roots of build files (internal or external). --> |
| <xsd:element name="build-folder" type="root"/> |
| <xsd:element name="build-file" type="root"/> |
| </xsd:choice> |
| </xsd:sequence> |
| </xsd:complexType> |
| |
| <!-- A root of files. Has a location. --> |
| <xsd:complexType name="root"> |
| <xsd:sequence> |
| <xsd:element name="location" type="substitutable-text"/> |
| </xsd:sequence> |
| </xsd:complexType> |
| |
| <!-- A typed or generic source root. Also has a display name and maybe a type parameter (e.g. 'java'). --> |
| <xsd:complexType name="maybe-typed-source-root"> |
| <xsd:sequence> |
| <xsd:element name="label" type="xsd:token"/> |
| <xsd:element name="type" type="xsd:NMTOKEN" minOccurs="0"/> |
| <xsd:element name="location" type="substitutable-text"/> |
| <xsd:element name="includes" type="substitutable-text" minOccurs="0"/> |
| <xsd:element name="excludes" type="substitutable-text" minOccurs="0"/> |
| <xsd:element name="encoding" type="substitutable-text" minOccurs="0"/> |
| </xsd:sequence> |
| </xsd:complexType> |
| |
| <xsd:complexType name="bound-actions"> |
| <xsd:sequence> |
| <xsd:element name="action" minOccurs="0" maxOccurs="unbounded"> |
| <xsd:complexType> |
| <xsd:sequence> |
| <xsd:element name="script" minOccurs="0" type="substitutable-text"/> |
| <xsd:element name="target" minOccurs="0" maxOccurs="unbounded" type="xsd:token"/> |
| <xsd:element name="property" minOccurs="0" maxOccurs="unbounded" type="property-definition"/> |
| <xsd:element name="context" minOccurs="0" type="action-context"/> |
| </xsd:sequence> |
| <xsd:attribute name="name" type="xsd:NMTOKEN" use="required"/> |
| </xsd:complexType> |
| </xsd:element> |
| </xsd:sequence> |
| </xsd:complexType> |
| |
| <xsd:complexType name="action-context"> |
| <xsd:sequence> |
| <xsd:element name="property" type="xsd:token"/> |
| <xsd:element name="folder" type="substitutable-text"/> |
| <xsd:element name="pattern" minOccurs="0" type="xsd:string"/> |
| <xsd:element name="format" type="context-format"/> |
| <xsd:element name="arity" type="context-arity"/> |
| </xsd:sequence> |
| </xsd:complexType> |
| |
| <xsd:simpleType name="context-format"> |
| <xsd:restriction base="xsd:NMTOKEN"> |
| <xsd:enumeration value="absolute-path"/> |
| <xsd:enumeration value="relative-path"/> |
| <xsd:enumeration value="absolute-path-noext"/> |
| <xsd:enumeration value="relative-path-noext"/> |
| <!-- XXX should this be factored out into java/freeform? --> |
| <xsd:enumeration value="java-name"/> |
| </xsd:restriction> |
| </xsd:simpleType> |
| |
| <xsd:complexType name="context-arity"> |
| <xsd:choice> |
| <xsd:element name="one-file-only"/> |
| <xsd:element name="separated-files" type="xsd:string"/> |
| </xsd:choice> |
| </xsd:complexType> |
| |
| <xsd:complexType name="export"> |
| <xsd:sequence> |
| <xsd:element name="type" type="xsd:NMTOKEN"/> |
| <xsd:element name="location" type="substitutable-text"/> |
| <xsd:element name="script" type="xsd:token" minOccurs="0"/> |
| <xsd:element name="build-target" type="xsd:token"/> |
| <xsd:element name="clean-target" type="xsd:token" minOccurs="0"/> |
| </xsd:sequence> |
| </xsd:complexType> |
| |
| <xsd:complexType name="view-items"> |
| <xsd:sequence> |
| <xsd:choice minOccurs="0" maxOccurs="unbounded"> |
| <xsd:element name="source-folder"> |
| <xsd:complexType> |
| <xsd:sequence> |
| <xsd:element name="label" type="xsd:token" minOccurs="0"/> |
| <xsd:element name="location" type="substitutable-text"/> |
| <xsd:element name="includes" type="substitutable-text" minOccurs="0"/> |
| <xsd:element name="excludes" type="substitutable-text" minOccurs="0"/> |
| </xsd:sequence> |
| <xsd:attribute name="style" type="source-folder-style" use="required"/> |
| </xsd:complexType> |
| </xsd:element> |
| <xsd:element name="source-file"> |
| <xsd:complexType> |
| <xsd:sequence> |
| <xsd:element name="label" type="xsd:token" minOccurs="0"/> |
| <xsd:element name="location" type="substitutable-text"/> |
| </xsd:sequence> |
| </xsd:complexType> |
| </xsd:element> |
| </xsd:choice> |
| </xsd:sequence> |
| </xsd:complexType> |
| |
| <xsd:simpleType name="source-folder-style"> |
| <xsd:restriction base="xsd:NMTOKEN"/> <!-- extended by natures --> |
| </xsd:simpleType> |
| |
| <xsd:complexType name="context-menu"> |
| <xsd:sequence> |
| <xsd:choice minOccurs="0" maxOccurs="unbounded"> |
| <xsd:element name="ide-action"> |
| <xsd:complexType> |
| <xsd:attribute name="name" type="xsd:NMTOKEN" use="required"/> |
| </xsd:complexType> |
| </xsd:element> |
| <xsd:element name="action"> |
| <xsd:complexType> |
| <xsd:sequence> |
| <xsd:element name="script" minOccurs="0" type="substitutable-text"/> |
| <xsd:element name="label" type="xsd:token"/> |
| <xsd:element name="target" minOccurs="0" maxOccurs="unbounded" type="xsd:token"/> |
| <xsd:element name="property" minOccurs="0" maxOccurs="unbounded" type="property-definition"/> |
| </xsd:sequence> |
| </xsd:complexType> |
| </xsd:element> |
| <xsd:element name="separator"/> |
| </xsd:choice> |
| </xsd:sequence> |
| </xsd:complexType> |
| |
| <xsd:complexType name="subprojects"> |
| <xsd:sequence> |
| <xsd:element name="project" type="substitutable-text" minOccurs="0" maxOccurs="unbounded"/> |
| </xsd:sequence> |
| </xsd:complexType> |
| |
| </xsd:schema> |