7.4 CMTX File Schema

CMTX Schema Element (parent)

Description and Attributes

policyComments

Root element for a CMTX file.

revision: Revision number of the schema.

schemaVersion: Schema version.

policyNamespaces (policyComments)

Root element for <using> elements.

using (policyNamespaces)

A reference to a namespace used in the CMTX file.

prefix: An alias string used to refer to a namespace within the CMTX file.

namespace: A namespace defined in an ADMX file.

comments (policyComments)

Root element for the <admTemplate> element.

admTemplate (comments)

Root element for <comment> elements.

comment (admTemplate)

A comment.

policyRef: A reference to the policy setting defined in an ADMX file associated with this comment.

commentText: Comment text that can be a reference to a language-specific string resource.

resources (policyComments)

Root element for string resources. Provides a container element for comments stored as <string> elements in the <stringTable>. If a language-specific CMTL file is found, comments are loaded from the <resources> element located in the CMTL file, and resources in the CMTX file are ignored.

minRequiredVersion: Minimum required version, defined with major.minor components (for example, "1.0"). For standalone CMTX files with no localized content, the minRequiredVersion attribute is compared to the revision attribute of the CMTX <policyComments> root element. Both have equal major components, and the minor component of the revision attribute is greater than or equal to the minor component of the minRequiredVersion attribute. For CMTX files with language-specific CMTL files, the minRequiredVersion attribute is compared to the revision attribute of the CMTL <commentDefinitionResources> root element. Both have equal major components, and the minor component of the revision attribute is greater than or equal to the minor component of the minRequiredVersion attribute.

stringTable (resources)

(optional) Root element for the <string> elements.

string (stringTable)

Language-specific string indexed by the "id" attribute.

id: A reference unique to all id values in this CMTX file, used as a lookup value.

 CMTX.xsd:          

 <?xml version="1.0" encoding="utf-8"?>
 <xsd:schema xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xs="http://www.w3.org/2001/XMLSchema" xmlns:xsd="http://www.w3.org/2001/XMLSchema" attributeFormDefault="unqualified" elementFormDefault="qualified" targetNamespace="http://www.microsoft.com/GroupPolicy/CommentDefinitions">
   <xs:element name="policyComments">
     <xs:complexType>
       <xs:sequence>
         <xs:element name="policyNamespaces">
           <xs:complexType>
             <xs:sequence>
               <xs:element name="using">
                 <xs:complexType>
                   <xs:attribute name="prefix" type="xs:string" use="required" />
                   <xs:attribute name="namespace" type="xs:string" use="required" />
                 </xs:complexType>
               </xs:element>
             </xs:sequence>
           </xs:complexType>
         </xs:element>
         <xs:element name="comments">
           <xs:complexType>
             <xs:sequence>
               <xs:element name="admTemplate">
                 <xs:complexType>
                   <xs:sequence>
                     <xs:element name="comment" maxOccurs="unbounded">
                       <xs:complexType>
                         <xs:attribute name="policyRef" type="xs:string" use="required" />
                         <xs:attribute name="commentText" type="xs:string" use="required" />
                       </xs:complexType>
                     </xs:element>
                   </xs:sequence>
                 </xs:complexType>
               </xs:element>
             </xs:sequence>
           </xs:complexType>
         </xs:element>
         <xs:element name="resources">
           <xs:complexType>
             <xs:sequence>
               <xs:simpleContent>
                 <xs:extension base="xs:string">
                   <xs:attribute name="minRequiredRevision" type="xs:decimal" 
                       use="required" />
                 </xs:extension>
               </xs:simpleContent>
               <xs:element name="stringTable" minOccurs="0" maxOccurs="1">
                 <xs:complexType>
                   <xs:sequence>
                     <xs:element name="string" maxOccurs="unbounded">
                       <xs:complexType>
                         <xs:simpleContent>
                           <xs:extension base="xs:string">
                             <xs:attribute name="id" type="xs:string" use="required" />
                           </xs:extension>
                         </xs:simpleContent>
                       </xs:complexType>
                     </xs:element>
                   </xs:sequence>
                 </xs:complexType>
               </xs:element>
             </xs:sequence>
           </xs:complexType>
         </xs:element>
       </xs:sequence>
       <xs:attribute name="revision" type="xs:decimal" use="required" />
       <xs:attribute name="schemaVersion" type="xs:decimal" use="required" />
     </xs:complexType>
   </xs:element>
 </xsd:schema>