Share via


スキーマ マップ (AppPartConfigDefinition)

適用対象: SharePoint アドイン |SharePoint Foundation 2013 |SharePoint Server 2013

このトピックでは、 AppPartConfigDefinition のスキーマ定義を示します。

注:

SharePoint アドインはもともと "SharePoint 用アプリ" と呼ばれたため、文字列 app は要素、属性、およびファイル名の一部またはすべてとして表示されます。下位互換性を確保するために、スキーマは変更されていません。

    <?xml version="1.0" encoding="utf-8"?>
    <xs:schema targetNamespace="http://schemas.microsoft.com/sharepoint/2012/app/partconfiguration"
        elementFormDefault="qualified"
        xmlns="http://schemas.microsoft.com/sharepoint/2012/app/partconfiguration"
        xmlns:xs="http://www.w3.org/2001/XMLSchema">

      <!-- AppPartConfig Element-->
      <xs:element name="AppPartConfig" type="AppPartConfigDefinition">
        <xs:annotation>
          <xs:documentation>The top level node of an app part configuration file.</xs:documentation>
        </xs:annotation>
      </xs:element>

      <xs:complexType name="AppPartConfigDefinition">
        <xs:all>
          <xs:element name="Id" type="GUID" minOccurs="1" maxOccurs="1">
            <xs:annotation>
              <xs:documentation>The unique identifier of the app part.</xs:documentation>
            </xs:annotation>
          </xs:element>
          <xs:element name="Settings"  type="SettingsDefinition" minOccurs="0" maxOccurs="1">
            <xs:annotation>
              <xs:documentation>Contains app part specific settings.</xs:documentation>
            </xs:annotation>
            <xs:unique name="unique-name">
              <xs:selector xpath="*"/>
              <xs:field xpath="@Name"/>
            </xs:unique>
          </xs:element>
        </xs:all>
      </xs:complexType>

      <xs:complexType name="SettingsDefinition">
        <xs:sequence>
          <xs:element name="Setting" type="SettingDefinition" minOccurs="1" maxOccurs="25">
            <xs:annotation>
              <xs:documentation>An app part setting.</xs:documentation>
            </xs:annotation>
          </xs:element>
        </xs:sequence>
      </xs:complexType>

      <xs:complexType name="SettingDefinition">
        <xs:attribute name="Name" type="NameDefinition" use="required">
          <xs:annotation>
            <xs:documentation>The name of the app part setting.</xs:documentation>
          </xs:annotation>
        </xs:attribute>
        <xs:attribute name="Value" type="ValueDefinition" use="required">
          <xs:annotation>
            <xs:documentation>The value of the app part setting.</xs:documentation>
          </xs:annotation>
        </xs:attribute>
      </xs:complexType>

      <xs:simpleType name="NameDefinition">
        <xs:restriction base="xs:string">
          <xs:minLength value="1"/>
          <xs:maxLength value="64"/>
        </xs:restriction>
      </xs:simpleType>

      <xs:simpleType name="ValueDefinition">
        <xs:restriction base="xs:string">
          <xs:minLength value="1"/>
          <xs:maxLength value="256"/>
        </xs:restriction>
      </xs:simpleType>

      <xs:simpleType name="GUID">
        <xs:restriction base="xs:string">
          <xs: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}\})|([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})"/>
        </xs:restriction>
      </xs:simpleType>

    </xs:schema>