windows-itpro-docs/windows/client-management/mdm/applicationrestrictions-xsd.md
2019-09-09 16:19:27 -07:00

3.8 KiB

title, description, ms.assetid, ms.reviewer, manager, ms.author, ms.topic, ms.prod, ms.technology, author, ms.date
title description ms.assetid ms.reviewer manager ms.author ms.topic ms.prod ms.technology author ms.date
ApplicationRestrictions XSD Here's the XSD for the ApplicationManagement/ApplicationRestrictions policy. A5AA2B59-3736-473E-8F70-A90FD61EE426 dansimp dansimp article w10 windows lomayor 06/26/2017

ApplicationRestrictions XSD

Here's the XSD for the ApplicationManagement/ApplicationRestrictions policy.

<?xml version="1.0" encoding="utf-8"?>
<xs:schema id="AppPolicy_xsd"
           attributeFormDefault="unqualified"
           elementFormDefault="qualified"
           xmlns:xs="http://www.w3.org/2001/XMLSchema"
           targetNamespace="http://schemas.microsoft.com/phone/2013/policy"
           xmlns="http://schemas.microsoft.com/phone/2013/policy"
           xmlns:m="http://schemas.microsoft.com/phone/2013/policy"
           >

  <!-- Non-empty string must have a non-whitespace character at the beginning and end -->
  <xs:simpleType name="ST_NonEmptyString">
    <xs:restriction base="xs:string">
      <xs:minLength value="1"/>
      <xs:maxLength value="32767"/>
      <xs:pattern value="[^\s]|([^\s].*[^\s])"/>
    </xs:restriction>
  </xs:simpleType>

  <xs:simpleType name="ST_Publisher">
    <xs:restriction base="xs:string">
      <xs:maxLength value="256"/>
    </xs:restriction>
  </xs:simpleType>

  <xs:simpleType name="CT_LowerCaseGuid">
    <xs:annotation>
      <xs:documentation>GUID must use lowercase letters</xs:documentation>
    </xs:annotation>
    <xs:restriction base="ST_NonEmptyString">
      <xs:pattern value="\{[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}\}"/>
    </xs:restriction>
  </xs:simpleType>

  <xs:complexType name="CT_Application">
    <xs:attribute name="ProductId" type="CT_LowerCaseGuid" />
  </xs:complexType>

  <xs:complexType name="CT_ApplicationWithPublisher">
    <xs:attribute name="ProductId" type="CT_LowerCaseGuid" />
    <xs:attribute name="PublisherName" type="ST_Publisher" use="optional" />
  </xs:complexType>

  <xs:complexType name="CT_AllowedPublisher">
    <xs:sequence>
      <xs:element name="DenyApp" type="CT_Application" minOccurs="0" maxOccurs="unbounded" />
    </xs:sequence>
    <xs:attribute name="PublisherName" type="ST_Publisher" use="required" />
  </xs:complexType>

  <xs:complexType name="CT_DeniedPublisher">
    <xs:sequence>
      <xs:element name="AllowApp" type="CT_Application" minOccurs="0" maxOccurs="unbounded" />
    </xs:sequence>
    <xs:attribute name="PublisherName" type="ST_Publisher" use="required" />
  </xs:complexType>

  <xs:element name="Deny">
    <xs:complexType>
      <xs:sequence>
        <xs:element name="App" type="CT_Application" minOccurs="0" maxOccurs="unbounded" />
        <xs:element name="Publisher" type="CT_DeniedPublisher" minOccurs="0" maxOccurs="unbounded" />
      </xs:sequence>
    </xs:complexType>
  </xs:element>

  <xs:element name="Allow">
    <xs:complexType>
      <xs:sequence>
        <xs:element name="App" type="CT_ApplicationWithPublisher" minOccurs="0" maxOccurs="unbounded" />
        <xs:element name="Publisher" type="CT_AllowedPublisher" minOccurs="0" maxOccurs="unbounded" />
      </xs:sequence>
    </xs:complexType>
  </xs:element>

  <xs:element name="AppPolicy">
    <xs:complexType>
      <xs:choice minOccurs="0" maxOccurs="1">
        <xs:element ref="Deny" />
        <xs:element ref="Allow" />
      </xs:choice>
      <xs:attribute name="Version" use="required" type="xs:unsignedLong" />
    </xs:complexType>

    <!-- Uniqueness Checks -->
    <xs:unique name="NoDuplicateProductIDs">
      <xs:selector xpath=".//*"/>
      <xs:field xpath="@ProductId"/>
    </xs:unique>

    <!-- Uniqueness Checks -->
    <xs:unique name="NoDuplicatePublisherNames">
      <xs:selector xpath=".//*"/>
      <xs:field xpath="@PublisherName"/>
    </xs:unique>
  </xs:element>

</xs:schema>