As mentioned above, the default Schema Generator has a schemaManager
property that points to the /atg/repository/xml/SchemaManager
component. In addition, each of the data binding service components (described below) has an XMLSchemaManager
property that points to this SchemaManager
component. This component is of class atg.repository.xml.XMLSchemaManager
. This class, which extends atg.repository.databinding.MappingManager
, manages XML Schemas and mapping files. For example, this class has mappingFileDirectories
and XMLSchemaFileDirectory
properties that specify the directories where mapping files and Schemas are stored. Note that Schemas must have the extension .xsd
and mapping files must have the extension .xml
.
For example, suppose you want to generate an XML Schema and specify a mapping file to use. The command would look something like this:
generateXMLSchema -m DSSJ2EEDemo –repository
/atg/userprofiling/ProfileAdapterRepository -itemDescriptor user
-mappingFile profileMapping.xml
Notice that only the name of the mapping file is specified, not the entire pathname. The Schema Manager’s mappingFileDirectories
property points to the directories where the mapping file should be stored.