tsd:shadowXML

Purpose

This element establishes a connection between a schema and a shadow function in order to improve the integration of non-XML data in Tamino. A shadow document contains an XML representation which is generated from the non-XML data by the shadow function. Therefore a shadow document can be accessed using X-Query or XQuery, just as XML data are accessed.

This technique allows efficient indexing of non-XML data.

A shadow function is just a special kind of Server Extension. Depending on whether it caters for text data or binary data, this shadow function can be defined using the tsd:onBinaryInsert or tsd:onTextInsert child elements.

For more information on shadow functions, see:

Parent element

tsd:nonXML

Child elements tsd:onBinaryInsert, tsd:onTextInsert, tsd:storeShadowOnly
Attributes None
Restrictions At least one of the child elements tsd:onBinaryInsert or tsd:onTextInsert must be present.

Example

This example illustrates the definition of an index for non-XML data using a shadow document that is maintained by the Server Extensions SXSBinaryIndexer.put and SXSTextIndexer.put in TSD:

<?xml version="1.0" encoding="windows-1252"?>
<xs:schema elementFormDefault="qualified"
           xmlns:tsd="http://namespaces.softwareag.com/tamino/TaminoSchemaDefinition"
           xmlns:xs="http://www.w3.org/2001/XMLSchema">
  <xs:annotation>
    <xs:appinfo>
      <tsd:schemaInfo name="nox">
        <tsd:collection name="nox" />
        <tsd:doctype name="nox">
          <tsd:nonXML>
            <tsd:shadowXML>
              <tsd:onBinaryInsert>SXSBinaryIndexer.put</tsd:onBinaryInsert>
              <tsd:onTextInsert>SXSTextIndexer.put</tsd:onTextInsert>
            </tsd:shadowXML>
          </tsd:nonXML>
        </tsd:doctype>
      </tsd:schemaInfo>
    </xs:appinfo>
  </xs:annotation>
  <xs:element name="blob">
    .
    .
    .
  </xs:element>
</xs:schema>