In the DID Module you define:
This attribute sets the name of the DID Module. This is the name that is used in the DID Document to reference to this DID Module. The name of the DID Module should start with an uppercase character and can be followed by lowercase characters, uppercase characters, digits or underscores '_'.
The connection type is an attribute of a DID Module. It is therefore possible to create a DID that connects to different Database Management Systems. For the the ODBC Connection and the Oracle Connection, it is also possible to connect to different databases within a single DBMS. This means that from within a single DID you could connect to both an ODBC data source and an AS/400 database, two different ODBC data sources but not to two AS/400's. ITP currently supports the following connection types; LOCAL, AS400, ODBC, ORACLE, XMLFILE, XMLWEB, XML MQ and MAINFRAME. You can use the ITP/SDK MultiPlatform if you want to create DIDs for the connection types.
All Entries and Functions defined in a DID Module use the same connection type. You can not define an Entry for the ODBC Connection and an Entry for the AS/400 Connection in the same DID Module.
The codepage attribute sets the default codepage for all Entries in the DID Module. In an Entry definition, you can overwrite the codepage for an individual Entry. The value of the codepage is used in Entries.
ITP uses sensible defaults for the codepage value. You should only set the codepage attribute if you experience problems.
A DID module can specify mappings for XML namespaces. These mappings are applied when data is retrived from an XML data sources.
A DID Module can contain one or more Entry definitions. Model Developers can only use an Entry if it is a Main Entry or if there is a Subentry path that starts at a Main Entry through which they can reach the Entry. You must declare which Entries can be used as Main Entries within the DID Definition.
A DID Module can contain one or more Function definitions . Before the Model Developer can use a Function in a Model you also have to declare it within the DID definition.
You can declare Aliases for Entries. You can use these Entries as subentries in the DID Module. You can not declare an alias to be a Main Entry.
You can import Entries from other DID Modules. You can use these Entries as subentries in this DID Module. You can not declare an import to be a Main Entry. You can make aliases for an imported Entry.
Grammar
did-module-definition ::=
DEFINE_DIDMODULE
NAME did-module-name
CONNECTION connection-type-name
[ did-module-attribute-sequence ]
[ entry-and-func-definition-sequence ]
END_DEFINE_DIDMODULE
did-module-attribute-sequence ::=
did-module-attribute [ did-module-attribute-sequence ]
did-module-attribute ::=
did-module-codepage
| did-module-namespaces
did-module-codepage ::=
CODEPAGE codepage
did-module-namespaces ::=
NAMESPACE namespace-list
namespace-list ::=
namespace-entry [ namespace-list ]
namespace-entry ::=
"prefix" = "URI"
entry-and-func-definition-sequence ::=
entry-and-func-definition [ entry-and-func-definition-sequence ]
entry-and-func-definition ::=
entry-definition
| did-defined-function-definition
| alias-definition
| import-definition
Example
DEFINE_DIDMODULE
NAME Example_module
CONNECTION_TYPE XMLFILE
NAMESPACE
"" = "http:////example.com//ns//default" (* Default namespace *)
"xhtml" = "http:////www.w3.org//1999//xhtml" (* xhtml: prefix *)
(* ...
Here go the Entry definitions and Function definitions
... *)
END_DEFINE_DIDMODULE