# Source

Full commit
Blame Embed Raw

- Default File Viewer

      1
      2
      3
      4
      5
      6
      7
      8
      9
     10
     11
     12
     13
     14
     15
     16
     17
     18
     19
     20
     21
     22
     23
     24
     25
     26
     27
     28
     29
     30
     31
     32
     33
     34
     35
     36
     37
     38
     39
     40
     41
     42
     43
     44
     45
     46
     47
     48
     49
     50
     51
     52
     53
     54
     55
     56
     57
     58
     59
     60
     61
     62
     63
     64
     65
     66
     67
     68
     69
     70
     71
     72
     73
     74
     75
     76
     77
     78
     79
     80
     81
     82
     83
     84
     85
     86
     87
     88
     89
     90
     91
     92
     93
     94
     95
     96
     97
     98
     99
    100
    101
    102
    103
    104
    105
    106
    107
    108
    109
    110
    111
    112
    113
    114
    115
    116
    117
    118
    119
    120
    121
    122
    123
    124
    125
    126
    127
    128
    129
    130
    131
    132
    133
    134
    135
    136
    137
    138
    139
    140
    141
    142
    143
    144
    145
    146
    147
    148
    149
    150
    151
    152
    153
    154
    155
    156
    <?xml version="1.0" encoding="utf-8"?>
    <!-- This very small subset of "http://schemas.microsoft.com/developer/msbuild/2003".
         Normally that namespace is defined in Microsoft.Build.xsd/Microsoft.Build.Core.xsd/Microsoft.Build.Commontypes.xsd.

         Actually this subset is not a trimmed down version of the original, but started from scracth to
         only contains types used by Delphi/RAD Studio/C++ Builder.

         In the future, I might add some better restrictions here and there, but so far it is sufficient engough to
         - validate .groupproj documents
         - use the Delphi XML Data Binding Wizard to generate a Delphi unit that allows generation and reading of .groupproj files.

         The default values for `minOccurs` and `maxOccurs` are 1, so make `maxOccurs` larger to allow `repeating` in the Delphi XML Data Binding Wizard.

    { Copyright (c) 2007-2013 Jeroen Wiert Pluimers for BeSharp.net and better office benelux.
    Full BSD License is available at http://besharp.codeplex.com/license and http://bo.codeplex.com/license }

    -->
    <xsd:schema attributeFormDefault="unqualified" elementFormDefault="qualified" version="1.0"
      targetNamespace="http://schemas.microsoft.com/developer/msbuild/2003"
      xmlns="http://schemas.microsoft.com/developer/msbuild/2003"
      xmlns:xsd="http://www.w3.org/2001/XMLSchema">
      <xsd:element name="Project" type="ProjectType"/>
      <xsd:complexType name="ProjectType">
        <xsd:sequence>
          <xsd:element name="PropertyGroup" type="PropertyGroupType"/>
          <!-- Delphi XE2 sometimes has an empty `ItemGroup` element -->
          <xsd:element name="ItemGroup" type="ItemGroupType" minOccurs="0" maxOccurs="unbounded"/>
          <xsd:element name="ProjectExtensions" type="ProjectExtensionsType"/>
          <xsd:element name="Target" type="TargetType" maxOccurs="unbounded"/>
          <!-- Delphi <= 2010 not always has the `Import` element -->
          <xsd:element name="Import" type="ImportType" minOccurs="0"/>
          <!-- ...\Spring\Packages\DelphiXE\Spring4D.groupproj -->
          <xsd:element name="ItemGroup" type="ItemGroupType" minOccurs="0"/>
        </xsd:sequence>
      </xsd:complexType>
      <xsd:complexType name="ImportType">
        <xsd:attribute name="Project" type="ProjectImportType"/>
        <xsd:attribute name="Condition" type="ProjectConditionType"/>
      </xsd:complexType>
      <xsd:complexType name="TargetType">
        <xsd:sequence>
          <xsd:choice>
            <xsd:element name="MSBuild" type="MSBuildType"/>
            <xsd:element name="CallTarget" type="CallTargetType"/>
          </xsd:choice>
        </xsd:sequence>
        <xsd:attribute name="DependsOnTargets" type="xsd:string" use="optional"/>
        <xsd:attribute name="Name" type="xsd:string"/>
      </xsd:complexType>
      <xsd:complexType name="MSBuildType">
        <xsd:attribute name="Projects" type="xsd:string"/>
        <!-- http://www.infopathdev.com/blogs/greg/archive/2004/09/16/The-Difference-Between-Optional-and-Not-Required.aspx -->
        <xsd:attribute name="Targets" type="MSBuildTargetsType" use="optional"/>
      </xsd:complexType>
      <xsd:complexType name="CallTargetType">
        <xsd:attribute name="Targets" type="xsd:string"/>
      </xsd:complexType>
      <xsd:complexType name="ProjectExtensionsType">
        <xsd:sequence>
          <xsd:element name="Borland.Personality" type="Borland.PersonalityType"/>
          <xsd:element name="Borland.ProjectType" type="xsd:string"/>
          <xsd:element name="BorlandProject" type="BorlandProjectType"/>
        </xsd:sequence>
      </xsd:complexType>
      <xsd:complexType name="BorlandProjectType">
        <xsd:choice>
          <xsd:sequence>
            <xsd:element name="Default.Personality" type="xsd:string"/>
          </xsd:sequence>
          <!-- Delphi <= 2010 can have a nested `BorlandProject` element, sometimes unqualified (with xmlns=""), sometimes qualified -->
          <xsd:choice>
            <xsd:element name="BorlandProject" form="unqualified" type="BorlandProjectTypeUnqualified"/>
            <xsd:element name="BorlandProject" type="BorlandProjectTypeQualified"/>
          </xsd:choice>
        </xsd:choice>
      </xsd:complexType>
      <xsd:complexType name="BorlandProjectTypeUnqualified">
        <xsd:sequence>
          <xsd:element name="Default.Personality" form="unqualified" type="xsd:string"/>
        </xsd:sequence>
      </xsd:complexType>
      <xsd:complexType name="BorlandProjectTypeQualified">
        <xsd:sequence>
          <xsd:element name="Default.Personality" type="xsd:string"/>
        </xsd:sequence>
      </xsd:complexType>
      <xsd:complexType name="ItemGroupType">
        <xsd:sequence>
          <xsd:element name="BuildGroupProject" type="BuildGroupProjectType" minOccurs="0" maxOccurs="unbounded"/>
          <xsd:element name="Projects" type="ProjectsType" minOccurs="0" maxOccurs="unbounded"/>
        </xsd:sequence>
        <xsd:attribute name="Condition" type="xsd:string" use="optional" />
      </xsd:complexType>
      <xsd:complexType name="BuildGroupProjectType">
        <xsd:sequence>
          <xsd:element name="ProjectGuid" type="xsd:string" />
          <xsd:element name="Configurations" type="xsd:string" />
          <xsd:element name="Platforms" type="xsd:string" />
          <xsd:element name="Enabled" type="xsd:string" />
        </xsd:sequence>
        <xsd:attribute name="Include" type="xsd:string" use="required" />
      </xsd:complexType>
      <xsd:complexType name="ProjectsType">
        <xsd:sequence>
          <!-- Delphi XE2: `Dependencies` element is optional -->
          <xsd:element name="Dependencies" type="xsd:string" minOccurs="0"/>
        </xsd:sequence>
        <xsd:attribute name="Include" type="xsd:string"/>
      </xsd:complexType>
      <xsd:complexType name="PropertyGroupType">
        <xsd:sequence>
          <xsd:element name="ProjectGuid" type="guid"/>
        </xsd:sequence>
      </xsd:complexType>
      <xsd:simpleType name="guid">
        <xsd:annotation>
          <xsd:documentation xml:lang="en">
            The representation of a GUID, generally the id of an element.
          </xsd:documentation>
        </xsd:annotation>
        <xsd:restriction base="xsd:string">
          <xsd:pattern value="\{[a-fA-F0-9]{8}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{12}\}"/>
        </xsd:restriction>
      </xsd:simpleType>
      <xsd:simpleType name="ProjectImportType">
        <xsd:restriction base="xsd:string">
          <!-- $(MSBuildBinPath)\Borland.Group.Targets -->
          <xsd:pattern value="\$\(MSBuildBinPath\)\\Borland\.Group\.Targets"/>
          <!-- $(BDS)\Bin\CodeGear.Group.Targets -->
          <xsd:pattern value="\$\(BDS\)\\Bin\\CodeGear\.Group\.Targets"/>
        </xsd:restriction>
      </xsd:simpleType>
      <xsd:simpleType name="ProjectConditionType">
        <xsd:restriction base="xsd:string">
          <!-- Exists('$(MSBuildBinPath)\Borland.Group.Targets') -->
          <xsd:pattern value="Exists\('\$\(MSBuildBinPath\)\\Borland\.Group\.Targets'\)"/>
          <!-- Exists('$(BDS)\Bin\CodeGear.Group.Targets') -->
          <xsd:pattern value="Exists\('\$\(BDS\)\\Bin\\CodeGear\.Group\.Targets'\)"/>
        </xsd:restriction>
      </xsd:simpleType>
      <xsd:simpleType name="Borland.PersonalityType">
        <xsd:restriction base="xsd:string">
          <!-- Default.Personality.12 -->
          <xsd:pattern value="Default\.Personality\.12"/>
          <!-- Default.Personality -->
          <xsd:pattern value="Default\.Personality"/>
        </xsd:restriction>
      </xsd:simpleType>
      <xsd:simpleType name="MSBuildTargetsType">
        <xsd:restriction base="xsd:string">
          <xsd:pattern value=""/>
          <xsd:pattern value="Clean"/>
          <xsd:pattern value="Make"/>
        </xsd:restriction>
      </xsd:simpleType>
    </xsd:schema>