ino:etc and doc type problem

Tamino 4.1.1.1
Trying to store an XML-document to ino:etc (no schema available, any XML document has to be storeable).

Sample code is:

TaminoConnection connection = new
TaminoConnection(http://localhost/tamino/myDB);
connection.Open(TaminoConnectionMode.AutoCommit);
TaminoCommand command = connection.CreateCommand(“ino:etc”);

XmlDocument doc = new XmlDocument();
doc.Load(“test.xml”);

TaminoDocument tdoc = new TaminoDocument(doc);
tdoc.DocName = “HELLO”;
//tdoc.DocType = “ino:nonXML”;
TaminoResponse response = command.Insert(tdoc);

The insert command produces the error “INOXRE8811:Collection name not found:Collection name = ino:etc”.

The insert works if I set tdoc.DocType to “ino:nonXML”, but then my document will be stored as blob (is this correct?).

If the collection ino:etc already has a document of the same type (e.g. imported with the interactive interface) the insert command does not produce the problem.

Any hints.

Thanks in advance,
erwin

It is possible that storing documents into ino:etc had problems with earlier versions of Tamino.

If you use ino:nonXML then the document will be stored as a non-XML document.

Does the problem go away with only documents of that form stored via the interactive interface or ANY document stored via the interactive interface? I suspect the latter.

By the way - it is not recommended to use ino:etc for anything other than test/experimental purposes. You should invariably use a dedicated collection.

Loaded documents of different type to ino:etc using the interactive interface: No problems at all!

With our software solution we have to accept XML-documents of unspecified type (we do not know about the format of the XML data and we do not have a schema). From my experience “ino:etc” is the only collection accepting such documents?!

How can I work around “ino:etc”? Is there a way to store NON XML data to a collection other than “ino:etc”?

erwin

What I was trying to say was that I think that as long as ino:etc has one document of any type in you should not get the INOXRE8811 error. This means that doing an HTTP POST to the URL http://localhost/tamino/mydb/ino:etc?_process=
should give you a document in ino:etc and a non-empty ino:etc. This problem is fixed in Tamino 4.1.4 (the latest released version).

I include a basic binary schema that I use for simple testing.
bin-schema.tsd (460 Bytes)

If “ino:etc” holds a single document of a type other than the one I try to insert into the DB, the response error is:

“INOXDE7935: Schema not found. : Element name = book.”

Your recommendation is to use something like “bin-schema.tsd” for storage of binary data to a collection != ino:etc. Correct?

Would you then recommend to dynamically define an open schema for XML data with unknown type, whenever trying to insert such documents?

Correct - bin-schema allows you to specify a collection other than ino:etc for non-XML (binary) documents.

I don’t think that you can specify a schema that allows ALL XML doc types (root elements) other than using ino:etc.

A colleague (Stuart) suggested that you could emulate what ino:etc does. This probably only makes sense if you have a small number of possible doctypes. When you receive a document check if it is defined (has a schema) in the collection you wish to use - if it is just insert - if it isn’t then define a schema that takes ANY contents and then insert the document.

OK, thank you for the hints.

Next week, I will be able to test with a 4.1.4.x Tamino version.

Will this also fix the “INOXDE7935: Schema not found” problem I mentioned in the previous posting?

I’m fairly certain that it will. We have test suites that use ino:etc and don’t have problems with Tamino 4.1.4.