Importing Schemas

If I have Schema A that is to be imported into Schema B,

The Schema A is in Tamino and is located in:

"http://localhost/tamino/Quote/MandFSchemas/Comments.tsd"

Is this the “schemalocation” that I should use in Schema B?

I am having enormous problems to get this simple import to work, everything works in XML Spy, but to get it into Tamino is just an exercise in frustration!

Can someone give me a CLEAR, SIMPLE explanation of how I get this to work, and DO NOT say read the documentation, that is less than helpful!

Hello Stuart,

the “schemalocation” that needs to be specified is the location of the schema that is defined inside Tamino.

This can be a relative path, including the collection name if needs be.

So, if Schema A is defined as “Comments.tsd” in the “MandFSchemas” collection, you can specify the schema location as “…/MandFSchemas/Comments.tsd” in the xs:import element in Schema B.

Please DO NOT have a look at the following page in the documentation unless my explanation is insufficient:

   ...\Tamino 4.1.4.1\Documentation\tslref\import.htm

:wink:

I hope that helps,
Trevor.

Trevor,

My comment about the documentation was perhaps a bit out of line, but the documentation is not entirely clear, the documentation states that an imported might look as follows:
<?xml version="1.0" encoding="UTF-8"?>
<xs:schema
targetNamespace = “http://www.softwareag.com/tamino/doc/examples/models/instruments
xmlns:i = “http://www.softwareag.com/tamino/doc/examples/models/instruments
xmlns:xs = “http://www.w3.org/2001/XMLSchema
xmlns:tsd = “http://namespaces.softwareag.com/tamino/TaminoSchemaDefinition
>

This is just the top of the schema, which can be found at
…/Tamino4.1.1.1/Documentation/namespace/namespaces.htm

Of course, this is true, but what they do not tell people new to putting documents with imports into Tamino is that the line
xmlns:i = "http://www.softwareag.com/tamino/doc/examples/models/instruments"

should NOT be added, and that Tamino will create this when the importing schema is placed into Tamino. This may seem like a small issue, but it is confusing when one has done this many times with XMLSpy, and then hits this type of issue.

I suppose my comment about the documentation is more to do with the fact that an “Idiots Guide” may be informative for people who are just starting to use Tamino and its schema editor to a great degree.

I have managed to progress, and can now successfully import schemas at will, I have hit another snag, getting XML instances that conform to the schema into Tamino. I have no doubt that this is a result of my lack of knowledge, but I will post a question about it a bit later.

Thanks,

Stuart

Hello Stuart,

I don’t think that your comment about the documentation was really any more out of line than my joking little reply - don’t worry about it!

You are right - the documentation for import could be made clearer for beginners.
On the import.htm page it says “In Tamino an xs:import element must resolve to a previously defined schema”, but this is perhaps one degree too vague for someone new to Tamino.

I will provide a hint to the documentation team that this should be expanded upon.

Thanks,
Trevor.

Trevor,

What they should perhaps state clearly is what is added by Tamino, and what you need to put in yourself. Stating that the importing schema must refernce a schema that is already defined does not make it clear what should be in the schema that is already defined and what should be left out.

Stuart