Purpose |
This element is used to make additional definitions from included schema for the same namespace visible in the including schema. In Tamino, an For example, to include a schema
IncludedSchema.tsd, specify an ../<collection name>/IncludedSchema.tsd where <collection name> is the name of the collection containing the referenced schema. Notes:
|
Parent element | xs:schema |
Child elements | None |
Attributes |
schemaLocation |
Restrictions | Tamino does not import the chameleon include (see http://www.w3.org/2001/05/xmlschema-rec-comments.html#pfiIdConstInclude. Chameleon include means that a schema "S2" without a target namespace is included into a schema "S1" with a target namespace, whereby the included schema "S2" inherits the target namespace of "S1". |
Name | Type | Description |
---|---|---|
schemaLocation |
xs:anyURI |
To locate a schema stored in the same database the structure of the
Note: |
The following schema, entitled "master", uses
an xs:include
element to include the schema entitled
"slave".
<?xml version="1.0" encoding="utf-8"?> <xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema" xmlns:tsd="http://namespaces.softwareag.com/tamino/TaminoSchemaDefinition"> <xs:annotation> <xs:appinfo> <tsd:schemaInfo name="master"> <tsd:collection name="include"/> <tsd:doctype name="types"> <tsd:logical> <tsd:content>closed</tsd:content> </tsd:logical> </tsd:doctype> </tsd:schemaInfo> </xs:appinfo> </xs:annotation> <xs:include schemaLocation="slave"/> </xs:schema>
The following schema is the "slave" schema, which is included by the "master" schema shown above.
<?xml version="1.0" encoding="utf-8"?> <xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema" xmlns:tsd="http://namespaces.softwareag.com/tamino/TaminoSchemaDefinition"> <xs:annotation> <xs:appinfo> <tsd:schemaInfo name="slave"> <tsd:collection name="include"/> </tsd:schemaInfo> </xs:appinfo> </xs:annotation> <xs:element name="types"> <xs:complexType> <xs:choice minOccurs="1" maxOccurs="unbounded"> <xs:element name="decimal" type="xs:decimal"> <xs:annotation> <xs:appinfo> <tsd:elementInfo> <tsd:physical> <tsd:native> <tsd:index> <tsd:standard/> </tsd:index> </tsd:native> </tsd:physical> </tsd:elementInfo> </xs:appinfo> </xs:annotation> </xs:element> </xs:choice> </xs:complexType> </xs:element> </xs:schema>