Yes, Tamino can define both XML and Non-XML doctypes within the same schema. Simply define two (or more) tsd:doctypes within your tsd:schemaInfo (if you’re writing the code manually, otherwise you can just create two root doctypes in the schema), and define one of them as xml, and one as non-xml. For example:
<?xml version = "1.0" encoding = "UTF-8"?>
<xs:schema
xmlns:tsd = "http://namespaces.softwareag.com/tamino/TaminoSchemaDefinition"
xmlns:xs = "http://www.w3.org/2001/XMLSchema">
<xs:annotation>
<xs:appinfo>
<tsd:schemaInfo name = "my-xml-and-nonxml-schema">
<tsd:collection name = "mycollection"></tsd:collection>
<tsd:doctype name = "xml-document">
<tsd:logical>
<tsd:content>closed</tsd:content>
</tsd:logical>
</tsd:doctype>
<tsd:doctype name = "nonxml-document">
<tsd:nonXML>
<tsd:index>
<tsd:text></tsd:text>
</tsd:index>
</tsd:nonXML>
</tsd:doctype>
<tsd:adminInfo>
<tsd:server>4.1.4.1</tsd:server>
<tsd:modified>2003-10-13T11:47:37.068-05:00</tsd:modified>
<tsd:created>2003-10-13T11:47:37.068-05:00</tsd:created>
<tsd:version>TSD4</tsd:version>
</tsd:adminInfo>
</tsd:schemaInfo>
</xs:appinfo>
</xs:annotation>
<xs:element name = "xml-document" type="xs:string">
<!-- put the nitty-gritty details here -->
</xs:element>
</xs:schema></pre><BR><BR>As for accessing both in java, the xml and nonxml object accessors act independently of each other. If you use the TXMLObjectAccessor to run a query on "/xml-document[@ino:id=5]", you'll be able to access that xml-document through the response. Similarly, if you use the TNonXMLObjectAccessor to run a query on "/nonxml-document[@ino:id>2]", you'll be able to access those nonxml-documents through <I>that</I> response.<BR><BR>I'm not sure what happens if you, for example, do a search that comes up with xml documents when you're using a TNonXMLObjectAccessor. I'd guess that you just aren't able to retrieve any documents through the accessor, but someone correct me if I'm wrong.<BR><BR>I'm not sure about the native storage format for Non-XML documents. Perhaps someone with a little more experience than myself will be able to answer that.<BR><BR>I hope this helps.<BR><BR><BLOCKQUOTE class="ip-ubbcode-quote"><font size="-1">quote:</font><HR>Originally posted by macy:<BR>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)<BR><BR><pre class="ip-ubbcode-code-pre">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?
#Tamino#API-Management#webMethods