If you have two or more doctypes/collection, is there possible to get a list with their names using the TaminoAPI4J?
Maybe using an accessor object because the accessor is created on a collection, so should have access to the whole collection.
You could query the ino:collection collection looking for xs:schema documents.
and extract the values of tsd:collection/@name and tsd:doctype/@name
Hope this helps.
Software AG (UK) Ltd.
In addition to Stuart’s suggestion, there is an Accessor in the Tamino API for Java called “TSchemaDefinition3Accessor”. (One can be instantiated from a TConnection object using the newSchemaDefinition3Accessor method.)
The TSchemaDefinition3Accessor has the following two methods:
public java.util.Iterator getSchemaNames(java.lang.String collection) public java.util.Iterator getDoctypeNames(java.lang.String collection, java.lang.String schema)
One or both of these methods will probably be helpful. For example: the Iterator returned from getSchemaNames() contains String objects, the values of which are the names of the schemas.
(So there is no need to handle any DOM objects - just Java Strings.)
I understand that is posible to use TS2 schemas also with Tamino v3.x.
I guess I won’t be able to use the TSchemaDefinition3Accessor with thoose schemas.
But I see that in the javadoc that I have a TSchemaDefinition2Accessor.
So my problem is reduced now only at how to detect which schema TS2 or TS3 is used! Can I?