tsd:default

Purpose

Using the tsd:function child element, tsd:default can specify a server extension function whose return value is used as a default value for an element or attribute.

Parent element tsd:logical
Child elements tsd:function
Attributes None

Example

The following example shows how to use the tsd:default element:

<?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="person">
        <tsd:collection name="person"></tsd:collection>
        <tsd:doctype name="person" />
      </tsd:schemaInfo>
    </xs:appinfo>
  </xs:annotation>
  <xs:element name="person">
    <xs:complexType>
      <xs:sequence>
        <xs:element name="name" type="xs:string">
          <xs:annotation>
            <xs:appinfo>
              <tsd:elementInfo>
                <tsd:logical>
                  <tsd:default>
                    <tsd:function xmlns:company="http://www.company.com/functions"
                                  name="company:createDefaultString"/>
                  </tsd:default>
                </tsd:logical>
              </tsd:elementInfo>
            </xs:appinfo>
          </xs:annotation>
        </xs:element>
        <xs:element name="first" type="xs:string"></xs:element>
      </xs:sequence>
    </xs:complexType>
  </xs:element>
</xs:schema>