Include another schema.

Hello there.

I’m using Tamino 4.2 under Linux RedHat 2.1

From a windows box (using SAG Tamino Schema Editor) i’m trying to build (a fair simple) TSD with an include (xs:include).

Here’s how my TSD looks like :


**********************************************************

<?xml version = "1.0" encoding = "UTF-8"?>
<xs:schema elementFormDefault = “qualified” xmlns:tsd = “http://namespaces.softwareag.com/tamino/TaminoSchemaDefinition” xmlns:xs = “XML Schema”>
xs:annotation
xs:appinfo
<tsd:schemaInfo name = “Editeur”>
<tsd:collection name = “Collectors”></tsd:collection>
<tsd:doctype name = “Editeur”>
tsd:logical
tsd:contentclosed</tsd:content>
</tsd:logical>
</tsd:doctype>
</tsd:schemaInfo>
</xs:appinfo>
</xs:annotation>
<xs:include schemaLocation = “common.xsd”></xs:include>
<xs:element name = “Editeur”>
xs:annotation
xs:documentationEditeur d’une publication</xs:documentation>
</xs:annotation>
xs:complexType
xs:sequence
<xs:element name = “EditeurID” type = “xs:string”>
xs:annotation
xs:documentationIdentifiant de l’

Hi Bertrand,

To define your schema into tamino, you first need to define the schema that you are including. So in your case you first define common.xsd in tamino and then give the path of that schema in your include. That will solve your problem.

Best Regards,
Vipin Makode

Hello Vipin,

Thanks a lot for your help !
It works ok now !

As I try not to bother people with documented subject I’ve been looking for “including schemas into TSD” into Tamino’s documentation, with no luck. Could you please tell me where the steps you told me are documented ?

Thanks again !!!

Bertrand Martel
Software AG France

Hi Bertrand,

This is not directly documented for schema editor. If you see the details for “xs:include” element in the documnetion, it is mentioned.

You can find this under:
Tamino XML Schema Reference Guide > TSD4 Logical: Definitions > xs:include.

In this second statement clearly says that “In Tamino an xs:include element must resolve to a schema already defined in the same database.”


Vipin Makode

Suppose I have 100 schemata which include a schema S. If now I want to change schema S, I cannot undefine it and define it, since it is being referenced. Is there a simpler way to redefine schema S other than undefining the 101 schemata and redefining them?

Thanks for the help!

Hi

since Tamino 4.2 it is possible to update an included or imported
schema document, SI. However, the schema update must be done in a way
that documents being stored in one of the affected doctypes
remain valid to the new schema.
Affected doctypes are all those being declared in SI and any including
or importing schema document + transitive closure of including
or importing schema documents.

If Tamino cannot grant this constranit by structural comparison
of the old and new schema document, you have to use instance validation
(i.e. _mode=validate) in the schema update operation.

Cheers
Uli