ino namespace in schema but no namespace declaration

The ino namespace is not declared in the schema document when I save my schemas with the Tamino Schema editor.

I retrieve the schema using the Java api and get a TXMLObject back, I then use the writeTo method to output it to a StringWriter.

I use the schema in a transformation and I get an error as the ino namespace is not declared. Is there a way to ensure that the namespace is always in the document?

I’m hoping there is a setting that I can use to ensure the namespace is declared or that the ino tag is left out.

Regards,
Jean

Hello,

I have not tried exactly what you have described but I believe the ino: namespace references are for the documents (the schema) ino:id and ino:docname.

If this is correct, you can surpress this using the Tamino API and the methods provided by the API for id and name.

The doc says:
The setDocname method can also be used to completely remove the ino:docname attribute from the XML document by passing a null or an empty String as docname. This may be necessary when the XML document should not contain any ino: namespace specific elements.

Specified by:
setDocname in class TDataObject
Parameters:
docname - the ino:docname attribute. If null or an empty String, the ino:docname attribute is completely removed from the underlying XML document, e.g. in case of a DOM object model, the Node representing the ino:docname attribute is removed from the DOM tree.

(Same for setID)

Would this resolve your problem by removing the ino:id & docname?

I do not know of any way to force the document to include the ino namespace definition.

Another option is you could add the namespace to the output.

Or, you could modify the document by wrapping the writeTo().
This wrapp would be used to remove the ino:id and ino:docname from the document (schema) returned.

Thanks Rob,

it solved my problem