The schema to be imported in the database is usually split into four files:
GN4Fixed.xsd
Contains all of the built-in standard definitions (i.e. those that are compulsory and that should not be changed)
GN4Base.xsd
Contains all the basic definitions (i.e. those that are compulsory but that can be extended by the user) and includes GN4Fixed.xsd. The definition includes a reference to a group and an attribute group for each of the ‘standard’ object types, called<typename>Extra - e.g. folderExtra, folderObjectExtra. This file is part of the Tera definition, and should not be modified.
GN4XXXExtra.xsd
Each of the "core" object types, i.e., folders, users, groups, etc., can have additional attributes. Use this file to add extra attributes to all the 'base' types without modifying GN4Base.xsd. The distribution includes a file GN4BaseExtra.xsd that contains an ‘empty’ definition for the extra attributes for each of the standard groups, - e.g. folderExtra, folderObjectExtra. Copy this file and modify as needed.
GN4XXX.xsd
This is the main file that contains all of the custom definitions. This file must include GN4Base.xsd. A sample main file GN4.xsd is part of the distribution. GN4Fixed.xsd and GN4Base.xsd do not declare any target namespace, they use the one of the main file.
IMPORTANT NOTES:
1.The files GN4Base.xsd and GN4Fixed.xsd must be in the same directory as your main schema when it loads
2.The main schema file must include the xxxxExtra.xsd file before GN4Base.xsd:
<xs:annotation>
<xs:documentation>Standard Tera schema</xs:documentation>
</xs:annotation>
<xs:include schemaLocation="GN4TeraExtra.xsd">
<xs:annotation>
<xs:documentation>
Include the extensions to the standard types and some
general-purpose simple and complex types.
</xs:documentation>
</xs:annotation>
</xs:include>
<xs:include schemaLocation="GN4Base.xsd">
<xs:annotation>
<xs:documentation>
Include the standard part: types and definitions that
must always be present
</xs:documentation>
</xs:annotation>
</xs:include>
3. Besides describing the database structure, the schema also specifies a normal XML schema (being an XSD) – i.e., the structure of an XML file. This is the structure of the default XML import/export format for GN4 data. Each object or group of objects in the database can be exported to or imported from an XML file in this format.