Does Tamino store binary objects as binary?

Hi there,
I would like to know if binary objects such as images are stored in its true binary format in Tamino. or does the image need to go thru some encoding. I am asking this more for the sake of getting some concepts clear. currently i am using mainly xschema and a touch of tamino tags and i know xschema allows me to store binary objects (eg,images) but they have to be encoded first using base64 encoding. now the thing is xml documents are mainly text isn’t it? so in order for a binary object to be stored as xml, it has to be encoded in some way to be in text form to be stored, which in the case of xschema, using base64 encoding to change it to its hex equivalant in text form. Please correct me if I am wrong on this. now, i also know that tamino stores binary objects using this below(just a snippet of schema)

<tsd:doctype name = “CarImage”>
tsd:nonXML</tsd:nonXML>
</tsd:doctype>

so my question is : does tamino store the binary object in its true native form or is there some underlying encoding and decoding going on during storing and retrieval?

Now I also have another burning question: Can tamino store both xml and non xml data in the same schema. I have the sneaky feeling that it is possible but the reason why I am asking this is becos when I look at the java api used to retrieve out the information such as below (snippet of code)

TXMLObjectAccessor xmlaccess=conn.newXMLObjectAccessor(…)
TXMLObject xmlobject=xmlaccess.query(…)

TNonXmlObjectAccessor nonxmlaccess=conn.newNonXMLObjectAccessor(…)
TNonXmlObject nonxmlobject=nonxmlaccess.query(…)


As you can see from the above code, the api has strictly separated for accessing the non xml data and the xml data. so the thing is , how can i combine non xml data and xml data together in the same schema using xschema or tsd or both and retrieve all these information thru the api?

I hope someone can give me a clear answer here cos these questions have been bothering me for some time now. Any help or direction rendered would be greatly appreciated. Thanks in advance!!

macy,

Question a):

Tamino stores binary data as binaries.

Your example:

<tsd:doctype name = “CarImage”>
tsd:nonXML</tsd:nonXML>
</tsd:doctype>

the data stored in this doctype will be in its binary form, not encoded or anything. Untouched. Compare it to a BLOB. Stored like a BLOB, treated as a BLOB.

You can of course, as you mentioned, do some base64 encoding. What you get is binary data encoded like character data, like strings. Now this data is not binary in the sense of XML, to Tamino and in a XML sense this data is now plain XML=string data. Any encoding has to be done outside of Tamino or using a server extension.

Question b):

No mix between binary data and XML Data in one doctype is possible. It is an either-or decision. You can use the base64 encoding mechanism to do the trick, but what you do is converting binary data to textual data prior to storing -> you do not store the binary data as it was before.

If it is binary, it is not XML. Methods like linking (URL) or encoding change the binary part to something textual which then is XML again.

regards,

Timm