| <?xml version="1.0" encoding="UTF-8"?> |
| <!-- |
| Sun Public License Notice |
| |
| The contents of this file are subject to the Sun Public License |
| Version 1.0 (the "License"). You may not use this file except in |
| compliance with the License. A copy of the License is available at |
| http://www.sun.com/ |
| |
| The Original Code is NetBeans. The Initial Developer of the Original |
| Code is Sun Microsystems, Inc. Portions Copyright 1997-2004 Sun |
| Microsystems, Inc. All Rights Reserved. |
| --> |
| |
| <!-- |
| 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/1" |
| xmlns="https://netbeans.org/ns/freeform-project/1" |
| 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: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: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: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"/> |
| <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: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"> |
| <xsd:enumeration value="tree"/> |
| <xsd:enumeration value="packages"/> |
| </xsd:restriction> |
| </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> |