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 DLP Account Import XML data format Version 2
This version is used to validate the
hierarchical XML.
Copyright 2009 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' - manadatory, one instance only
'fullname' - optional, one instance only
'role' - mandatory, one instance only
'mgmtgroups' - optional, one instance only
'attributes' - optional, one instance only
</xsd:documentation>
</xsd:annotation>
<!-- the 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="mgmtgroups" type="MgmtGroups" minOccurs="0" />
<xsd:element name="attributes" type="Attributes" minOccurs="0" />
</xsd:all>
</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 'HierarchyUser' are expected as follows
'name' - manadatory, one instance only
'fullname' - optional, one instance only
'role' - mandatory, one instance only
'mgmtgroups' - optional, one instance only
'attributes' - 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="mgmtgroups" type="MgmtGroups" minOccurs="0" />
<xsd:element name="attributes" type="Attributes" minOccurs="0" />
</xsd:all>
</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>
Restricted to the following values
User
Manager
Administrator
PolicyAdministrator
Reviewer
UserRole1
UserRole2
</xsd:documentation>
</xsd:annotation>
<xsd:restriction base="xsd:string">
<xsd:enumeration value="User" />
<xsd:enumeration value="Manager" />
<xsd:enumeration value="Administrator" />
<xsd:enumeration value="PolicyAdministrator" />
<xsd:enumeration value="Reviewer" />
<xsd:enumeration value="UserRole1" />
<xsd:enumeration value="UserRole2" />
</xsd:restriction>
</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 will be 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 DLP property value names and converted to the
appropriate index.
Any attribute with a name that does not match
an CA DLP 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 DLP 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 DLP 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:schema>
| Copyright © 2011 CA. All rights reserved. | Email CA Technologies about this topic |