This is the XML schema that can be used to validate the format of XML files you want to import.
<?xml version="1.0" ?> <!DOCTYPE xsd:schema> <xsd:schema xmlns:xsd="http://www.w3.org/2001/XMLSchema" elementFormDefault="qualified" xml:lang="en"> <xsd:annotation> <xsd:documentation> CA DataMinder Account Import XML data format Version 2 This version is used to validate the hierarchical XML. Copyright 2012 CA. All rights reserved. </xsd:documentation> </xsd:annotation> <!-- Main element - accountimport --> <xsd:element name="accountimport"> <xsd:annotation> <xsd:documentation> Main element of the document. Mandatory One instance only Contains 'root' and/or 'hierarchy' and/or 'users' elements </xsd:documentation> </xsd:annotation> <xsd:complexType> <xsd:choice minOccurs="1" maxOccurs="unbounded"> <!-- First level sub-element - root --> <xsd:element name="root" type="root" minOccurs="0" maxOccurs="1" /> <!-- First level sub-element - users --> <xsd:element name="users" type="users" minOccurs="0" maxOccurs="unbounded" /> <!-- First level sub-element - hierarchy --> <xsd:element name="hierarchy" type="hierarchy" minOccurs="0" maxOccurs="unbounded" /> </xsd:choice> <!-- Version attribute --> <!-- Currently only permits 4.0 and 4.7 --> <xsd:attribute name="version" use="required"> <xsd:simpleType> <xsd:restriction base="xsd:double"> <xsd:enumeration value="4.0" /> <xsd:enumeration value="4.7" /> </xsd:restriction> </xsd:simpleType> </xsd:attribute> <!-- Currently only permits "hierarchical" --> <xsd:attribute name="format" use="required"> <xsd:simpleType> <xsd:restriction base="xsd:string"> <xsd:enumeration value="hierarchical" /> </xsd:restriction> </xsd:simpleType> </xsd:attribute> <!-- Add_db attribute --> <xsd:attribute name="add_db" type="xsd:boolean" default="false" /> </xsd:complexType> </xsd:element> <!-- Types within first level of accountimport --> <xsd:complexType name="root"> <xsd:choice minOccurs="0" maxOccurs="unbounded"> <xsd:element name="user" type="HierarchyUser" minOccurs="0" maxOccurs="unbounded" /> <xsd:element name="group" type="HierarchyGroup" minOccurs="0" maxOccurs="unbounded" /> </xsd:choice> </xsd:complexType> <xsd:complexType name="users"> <xsd:sequence> <xsd:element name="user" type="FlatUser" minOccurs="0" maxOccurs="unbounded" /> </xsd:sequence> </xsd:complexType> <!-- Hierarchy type --> <xsd:complexType name="hierarchy"> <xsd:choice minOccurs="1" maxOccurs="unbounded"> <xsd:element name="user" type="HierarchyUser" minOccurs="0" maxOccurs="unbounded" /> <xsd:element name="group" type="HierarchyGroup" minOccurs="0" maxOccurs="unbounded" /> </xsd:choice> <!-- relativeTo attribute --> <xsd:attribute name="relativeTo" type="xsd:string" /> </xsd:complexType> <!-- HierarchyUser type --> <xsd:complexType name="HierarchyUser"> <xsd:annotation> <xsd:documentation> User sub-element that may be found in 'root' or 'hierarchy' elements Zero or more instances allowed. Sub-elements described below </xsd:documentation> </xsd:annotation> <xsd:all> <xsd:annotation> <xsd:documentation> Sub-elements of 'HierarchyUser' are expected as follows 'name' - mandatory, one instance only 'fullname' - optional, one instance only 'role' - mandatory, one instance only 'reportname' - optional, one instance only 'mgmtgroups' - optional, one instance only 'attributes' - optional, one instance only 'securitymodel' - optional, one instance only 'policyroles' - optional, one instance only </xsd:documentation> </xsd:annotation> <!-- user's name, full name, role, management groups and attributes --> <xsd:element name="name" type="xsd:string" /> <xsd:element name="fullname" type="xsd:string" minOccurs="0" /> <xsd:element name="role" type="Role" default="User" /> <xsd:element name="reportname" type="xsd:string" minOccurs="0" /> <xsd:element name="mgmtgroups" type="MgmtGroups" minOccurs="0" /> <xsd:element name="attributes" type="Attributes" minOccurs="0" /> <xsd:element name="securitymodel" type="SecurityModel" minOccurs="0" /> <xsd:element name="policyroles" type="PolicyRoles" minOccurs="0" /> </xsd:all> <xsd:attribute name="policyexempt" type="xsd:boolean" default="false"/> </xsd:complexType> <!-- FlatUser type --> <xsd:complexType name="FlatUser"> <xsd:annotation> <xsd:documentation> User sub-element that may be found in 'users' elements. Zero or more instances allowed. Sub-elements described below. </xsd:documentation> </xsd:annotation> <xsd:all> <xsd:annotation> <xsd:documentation> Sub-elements of 'FlatUser' are expected as follows 'name' - manadatory, one instance only 'fullname' - optional, one instance only 'group' - mandatory, one instance only 'role' - mandatory, one instance only 'reportname' - optional, one instance only 'mgmtgroups' - optional, one instance only 'attributes' - optional, one instance only 'securitymodel' - optional, one instance only 'policyroles' - optional, one instance only </xsd:documentation> </xsd:annotation> <!-- the user's name, full name, group, role, management groups and attributes --> <xsd:element name="name" type="xsd:string" /> <xsd:element name="fullname" type="xsd:string" minOccurs="0" /> <xsd:element name="group" type="FlatGroup" /> <xsd:element name="role" type="Role" default="User"/> <xsd:element name="reportname" type="xsd:string" minOccurs="0" /> <xsd:element name="mgmtgroups" type="MgmtGroups" minOccurs="0" /> <xsd:element name="attributes" type="Attributes" minOccurs="0" /> <xsd:element name="securitymodel" type="SecurityModel" minOccurs="0" /> <xsd:element name="policyroles" type="PolicyRoles" minOccurs="0" /> </xsd:all> <xsd:attribute name="policyexempt" type="xsd:boolean" default="false"/> </xsd:complexType> <!-- AbsoluteHierarchyGroup type --> <xsd:complexType name="AbsoluteHierarchyGroup"> <xsd:choice minOccurs="0" maxOccurs="unbounded"> <xsd:element name="user" type="HierarchyUser" minOccurs="0" maxOccurs="unbounded" /> <xsd:element name="group" type="AbsoluteHierarchyGroup" minOccurs="0" maxOccurs="unbounded" /> </xsd:choice> <xsd:attribute name="name" type="xsd:string" /> </xsd:complexType> <!-- HierarchyGroup type --> <xsd:complexType name="HierarchyGroup"> <xsd:complexContent> <xsd:extension base="AbsoluteHierarchyGroup"> <xsd:attribute name="isRelative" type="xsd:boolean" default="false" /> </xsd:extension> </xsd:complexContent> </xsd:complexType> <!-- Role type --> <xsd:simpleType name="Role"> <xsd:annotation> <xsd:documentation> The role that a user has, e.g. Manager, Policy Reviewer Values are configurable and cannot be validated by this schema </xsd:documentation> </xsd:annotation> <xsd:restriction base="xsd:string" /> </xsd:simpleType> <!-- MgmtGroups type --> <xsd:complexType name="MgmtGroups"> <xsd:annotation> <xsd:documentation> Contains one or more 'group' subelements </xsd:documentation> </xsd:annotation> <xsd:sequence> <xsd:element name="group" type="FlatGroup" minOccurs="0" maxOccurs="unbounded" /> </xsd:sequence> </xsd:complexType> <!-- Attributes type --> <xsd:complexType name="Attributes"> <xsd:annotation> <xsd:documentation> Contains one or more 'attr' subelements 'attr' elements can be one of three formats. See below for description. 'BaseAttribute' is the base format. The other formats extend it. If no value is specified, the value of the attribute is deleted. </xsd:documentation> </xsd:annotation> <xsd:sequence> <xsd:element name="attr" type="BaseAttribute" maxOccurs="unbounded" /> </xsd:sequence> </xsd:complexType> <!-- BaseAttribute type --> <xsd:complexType name="BaseAttribute" abstract="true" > <xsd:annotation> <xsd:documentation> The basic 'attr' element No attributes One or more 'value' elements Abstract, so cannot be used directly in an XML instance. </xsd:documentation> </xsd:annotation> <xsd:sequence> <xsd:element name="value" type="xsd:string" minOccurs="0" maxOccurs="unbounded"/> </xsd:sequence> </xsd:complexType> <!-- EmailAttribute type --> <xsd:complexType name="EmailAttribute"> <xsd:annotation> <xsd:documentation> The e-mail 'attr' element Used to represent e-mail addresses associated with the user. Identical to the base attribute type No attributes One or more 'value' elements, each containing an e-mail address </xsd:documentation> </xsd:annotation> <xsd:complexContent> <xsd:extension base="BaseAttribute"/> </xsd:complexContent> </xsd:complexType> <!-- NamedAttribute type --> <xsd:complexType name="NamedAttribute"> <xsd:annotation> <xsd:documentation> A named 'attr' element The name will be matched against the list of CA DataMinder property value names and converted to the appropriate index. Any attribute with a name that does not match an CA DataMinder property value name will be ignored. One mandatory attribute (name), contains the name of the attribute. One or more 'value' elements, each containing a value for the attribute </xsd:documentation> </xsd:annotation> <xsd:complexContent> <xsd:extension base="BaseAttribute"> <xsd:attribute name="name" type="xsd:string" use="required" /> </xsd:extension> </xsd:complexContent> </xsd:complexType> <!-- IndexedAttribute type --> <xsd:complexType name="IndexedAttribute"> <xsd:annotation> <xsd:documentation> An indexed 'attr' element The index corresponds to one of the internal CA DataMinder attributes. One mandatory attribute (index), contains a value greater than or equal to 1 One optional element (displayname), the value of which will be the name of the corresponding internal CA DataMinder attribute. There purely to make the XML more 'user friendly' to human readers. One or more 'value' elements, each containing a value for the attribute. </xsd:documentation> </xsd:annotation> <xsd:complexContent> <xsd:extension base="BaseAttribute"> <xsd:attribute name="index" use="required"> <xsd:simpleType> <xsd:restriction base="xsd:integer"> <xsd:minInclusive value="1" /> </xsd:restriction> </xsd:simpleType> </xsd:attribute> <xsd:attribute name="displayname" type="xsd:string" /> </xsd:extension> </xsd:complexContent> </xsd:complexType> <!-- FlatGroup type --> <xsd:complexType name="FlatGroup"> <xsd:annotation> <xsd:documentation> Zero or more instances allowed. Contains zero or more 'element' elements, each representing a segment of the path. If there are no 'element' elements, the root path is being represented. Optional 'isRelative' attribute, indicates if group is a subgroup of another group in the XML file Used in FlatUser and MgmtGroups types </xsd:documentation> </xsd:annotation> <xsd:sequence> <xsd:element name="element" type="xsd:string" minOccurs="0" maxOccurs="unbounded" /> </xsd:sequence> <!-- isRelative attribute --> <xsd:attribute name="isRelative" type="xsd:boolean" default="false" /> </xsd:complexType> <xsd:complexType name="SecurityModel"> <xsd:annotation> <xsd:documentation> Zero or one instance allowed. Contains details of the security model assigned to a user. 'description' attribute contains full description of the security model. The tag's value is the short code representation of the security model. </xsd:documentation> </xsd:annotation> <xsd:simpleContent> <xsd:extension base="xsd:string"> <xsd:attribute name="description" type="xsd:string" /> </xsd:extension> </xsd:simpleContent> </xsd:complexType> <xsd:complexType name="PolicyRoles"> <xsd:annotation> <xsd:documentation> Zero or one instance allowed. Contains one mandatory 'policyrole' subelement. The XML is configured this way because, although a user is currently allowed only one policy role, this may be changed in future to allow multiple policy roles. </xsd:documentation> </xsd:annotation> <xsd:sequence> <xsd:annotation> <xsd:documentation> One instance allowed. The policy role applied to the user. </xsd:documentation> </xsd:annotation> <xsd:element name="policyrole" type="xsd:string" /> </xsd:sequence> </xsd:complexType> </xsd:schema>
Copyright © 2014 CA.
All rights reserved.
|
|