Tamino XML Server Version 9.7
 —  Tamino XML Schema Reference Guide  —

tsd:refers

This element can be used in the following different contexts:

  1. For reference definition, the tsd:refers element is used in the context of tsd:standard or tsd:text as described in the following table:

    Purpose

    This element defines references for use in connection with reference indexes. The content of the tsd:refers element specifies the node that is to be used as a base for a reference.

    For more information on this topic, see also tsd:reference and tsd:which.

    Parent element tsd:text, tsd:standard
    Child elements None
    Attributes None
    Restrictions

    The following rules apply for this element:

    • The element that describes the index (in the contents of the accompanying tsd:which element) must have a parent that matches the XPath expression of the <tsd:refers> value. Otherwise an error message is issued.

      In the example below, an additional <tsd:which>/Doc/A/B/X/C</tsd:which> would also match, but a <tsd:which>/Doc/A/X/C</tsd:which> would cause an error at define time.

    • Only absolute path expressions that do not contain any wildcards are supported in this context.

    • The option for the tsd:structureIndex element may not be "none".

    As long as these conditions are fulfilled, recursive structures can also be indexed.

    Type xs:string

    Example

    This example shows how to use the tsd:refers element for index definition: The index refers to /Doc/A/B.

    <xs:element name = "C" type = "xs:string">
    ...
       <tsd:elementInfo>
         <tsd:physical>
           <tsd:which>/Doc/A/B/C</tsd:which>
           <tsd:native>
             <tsd:index>
               <tsd:text>
                 <tsd:refers>/Doc/A/B<tsd:refers>
               </tsd:text>
             </tsd:index>
           </tsd:native>
         </tsd:physical>
    ...
    </xs:element>
    
  2. For reference index definition, the tsd:refers element is used in the context of tsd:reference as described in the following table:

    Purpose

    In the context of reference indexes, one reference node may refer to another reference node. The current reference node uses the tsd:refers element to specify the reference node.

    For more information on this topic, see also tsd:reference and tsd:which.

    Parent element tsd:reference
    Child elements None
    Attributes None
    Restrictions

    The following rules apply for the contents of this element:

    • The element that describes the index (in the contents of the accompanying tsd:which element) must have a parent that matches the XPath expression of the <tsd:refers> value. Otherwise an error message is issued.

      In the example below, an additional <tsd:which>/Doc/A/B/X/C</tsd:which> would also match, but a <tsd:which>/Doc/A/X/C</tsd:which> would cause an error at define time.

    • Only absolute path expressions that do not contain any wildcards are supported in this context.

    Type xs:string

    Example

    The following excerpt from a schema describes a reference index definition for the node B, which should refer to the ancestor /Doc/A:

    <xs:element name = "B" maxOccurs = "unbounded">
      .
      .
      .
      <tsd:elementInfo>
        <tsd:physical>
          <tsd:native>
            <tsd:index>
              <tsd:reference>
                <tsd:refers>/Doc/A<tsd:refers>
              </tsd:reference>
              .
              .
              .
            </tsd:index>
          </tsd:native>
        </tsd:physical>
      </tsd:elementInfo>
      .
      .
      .
    </xs:element>
    

Top of page