Skip navigation.
Downloads | Product Documentation | Support

XQuery Developer's Guide

# Annotations Reference

# XML Schema for Annotations

This appendix contains the entire XML Schema definition file (XSD) that BEA AquaLogic Data Services Platform (DSP) uses for annotations. This file constitutes the complete grammer of the pragma annotations contained in data service source files.

For information about the syntax and semantics of Data Services Platform annotations in data service and XQuery function library (XFL) documents, see Understanding Data Services Platform Annotations.

Listing A-1 XML Schema for Annotations

>     <?xml version="1.0"?>

>     <xs:schema targetNamespace="urn:annotations.ld.bea.com" xmlns:tns="urn:annotations.ld.bea.com" xmlns:xs="http://www.w3.org/2001/XMLSchema" elementFormDefault="unqualified" attributeFormDefault="unqualified">

>       <!--==================-->

>       <!--  XDS annotation  -->

>       <!--==================-->

>       <xs:element name="xds">

>         <xs:complexType>

>           <xs:sequence>

>             <!-- document properties -->

>             <xs:element name="author" type="xs:string" minOccurs="0"/>

>             <xs:element name="comment" type="xs:string" minOccurs="0"/>

>             <xs:element name="creationDate" type="xs:dateTime" minOccurs="0"/>

>             <xs:element name="documentation" type="xs:string" minOccurs="0"/>

>             <xs:element name="version" type="xs:decimal" minOccurs="0"/>

>             <!-- user defined properties -->

>             <xs:sequence minOccurs="0" maxOccurs="unbounded">

>               <xs:element name="property">

>                 <xs:complexType>

>                   <xs:simpleContent>

>                     <xs:extension base="xs:string">

>                       <xs:attribute name="name" type="xs:string"/>

>                     </xs:extension>

>                   </xs:simpleContent>

>                 </xs:complexType>

>               </xs:element>

>             </xs:sequence>

>             <!-- data access properties -->

>             <xs:choice>

>               <!-- choice 1: java functions -->

>               <xs:element name="javaFunction">

>                 <xs:complexType>

>                   <xs:attribute name="class" type="xs:string" use="required"/>

>                 </xs:complexType>

>               </xs:element>

>               <!-- choice 2: web services -->

>               <xs:element name="webService">

>                 <xs:complexType>

>                   <xs:attribute name="wsdl" type="xs:anyURI" use="required"/>

>                   <xs:attribute name="targetNamespace" type="xs:anyURI" use="required"/>

>                 </xs:complexType>

>               </xs:element>

>               <!-- choice 3: relational sources -->

>               <xs:element name="relationalDB">

>                 <xs:complexType>

>                   <xs:sequence>

>                     <xs:element name="properties" minOccurs="0">

>                       <xs:complexType>

>                         <xs:attribute name="catalogSeparator" type="xs:string" use="required"/>

>                         <xs:attribute name="identifierQuote" type="xs:string" use="required"/>

>                         <xs:attribute name="catalogQuote" type="xs:string"/>

>                         <xs:attribute name="schemaQuote" type="xs:string"/>

>                         <xs:attribute name="tableQuote" type="xs:string"/>

>                         <xs:attribute name="columnQuote" type="xs:string"/>

>                         <xs:attribute name="nullSortOrder" type="tns:nullSortOrderType" use="required"/>

>                         <xs:attribute name="supportsCatalogsInDataManipulation" type="xs:boolean" use="required"/>

>                         <xs:attribute name="supportsLikeEscapeClause" type="xs:boolean" use="required"/>

>                         <xs:attribute name="supportsSchemasInDataManipulation" type="xs:boolean" use="required"/>

>                       </xs:complexType>

>                     </xs:element>

>                   </xs:sequence>

>                   <xs:attribute name="name" type="xs:string" use="required"/>

>                   <xs:attribute name="dbType" type="xs:string"/>

>                   <xs:attribute name="dbVersion" type="xs:string"/>

>                   <xs:attribute name="driver" type="xs:string"/>

>                   <xs:attribute name="uri" type="xs:string"/>

>                   <xs:attribute name="username" type="xs:string"/>

>                   <xs:attribute name="password" type="xs:string"/>

>                   <xs:attribute name="SID" type="xs:string"/>

>                   <xs:attribute name="sourceBindingProviderClassName" type="xs:string"/>

>                 </xs:complexType>

>               </xs:element>

>               <!-- choice 4: delimited files -->

>               <xs:element name="delimitedFile">

>                 <xs:complexType>

>                   <xs:attribute name="file" type="xs:anyURI"/>

>                   <xs:attribute name="schema" type="xs:anyURI"/>

>                   <xs:attribute name="inferredSchema" type="xs:boolean" default="false"/>

>                   <xs:attribute name="delimiter" type="xs:string"/>

>                   <xs:attribute name="fixedLength" type="xs:positiveInteger"/>

>                   <xs:attribute name="hasHeader" type="xs:boolean" default="false"/>

>                 </xs:complexType>

>               </xs:element>

>               <!-- choice 5: XML files -->

>               <xs:element name="xmlFile">

>                 <xs:complexType>

>                   <xs:attribute name="file" type="xs:anyURI"/>

>                   <xs:attribute name="schema" type="xs:anyURI" use="required"/>

>                 </xs:complexType>

>               </xs:element>

>               <!-- choice 6: user defined view -->

>               <xs:element name="userDefinedView" minOccurs="0"/>

>               <!-- choice 7: nothing, defaults to userDefinedView -->

>               <xs:sequence/>

>             </xs:choice>

>             <!-- field annotations -->

>             <xs:sequence minOccurs="0" maxOccurs="unbounded">

>               <xs:element name="field">

>                 <xs:complexType>

>                   <xs:sequence>

>                     <xs:element name="extension" minOccurs="0">

>                       <xs:complexType>

>                         <xs:sequence minOccurs="0">

>                           <xs:element name="autoNumber">

>                             <xs:complexType>

>                               <xs:attribute name="type" type="tns:autoNumberType" use="required"/>

>                               <xs:attribute name="sequenceObjectName" type="xs:string"/>

>                             </xs:complexType>

>                           </xs:element>

>                         </xs:sequence>

>                         <xs:attribute name="nativeXpath" type="xs:string"/>

>                         <xs:attribute name="nativeType" type="xs:string"/>

>                         <xs:attribute name="nativeTypeCode" type="xs:int"/>

>                         <xs:attribute name="nativeSize" type="xs:int"/>

>                         <xs:attribute name="nativeFractionalDigits" type="tns:scaleType"/>

>                         <!-- relational: autoNumber -->

>                         <!-- relational: native column names and types -->

>                       </xs:complexType>

>                     </xs:element>

>                     <xs:element name="properties">

>                       <xs:complexType>

>                         <xs:attribute name="immutable" type="xs:boolean" default="false"/>

>                         <xs:attribute name="nullable" type="xs:boolean" default="false"/>

>                         <xs:attribute name="transient" type="xs:boolean" default="false"/>

>                       </xs:complexType>

>                     </xs:element>

>                   </xs:sequence>

>                   <xs:attribute name="xpath" type="xs:string" use="required"/>

>                   <xs:attribute name="type" type="xs:string" use="required"/>

>                 </xs:complexType>

>               </xs:element>

>             </xs:sequence>

>             <!-- keys -->

>             <xs:sequence minOccurs="0" maxOccurs="unbounded">

>               <xs:element name="key">

>                 <xs:complexType>

>                   <xs:sequence>

>                     <xs:element name="field" maxOccurs="unbounded">

>                       <xs:complexType>

>                         <xs:sequence>

>                           <xs:element name="extension" minOccurs="0">

>                             <xs:complexType>

>                               <xs:attribute name="nativeXpath" type="xs:string" use="required"/>

>                             </xs:complexType>

>                           </xs:element>

>                         </xs:sequence>

>                         <xs:attribute name="xpath" type="xs:string" use="required"/>

>                       </xs:complexType>

>                     </xs:element>

>                   </xs:sequence>

>                   <xs:attribute name="name" type="xs:string"/>

>                 </xs:complexType>

>               </xs:element>

>             </xs:sequence>

>             <!-- relationships -->

>             <xs:sequence minOccurs="0" maxOccurs="unbounded">

>               <xs:element name="relationshipTarget">

>                 <xs:complexType>

>                   <xs:sequence>

>                     <xs:element name="relationship" minOccurs="0">

>                       <xs:complexType>

>                         <xs:sequence>

>                           <xs:element name="description" type="xs:string" minOccurs="0"/>

>                         </xs:sequence>

>                       </xs:complexType>

>                     </xs:element>

>                   </xs:sequence>

>                   <xs:attribute name="roleName" type="xs:string" use="required"/>

>                   <xs:attribute name="roleNumber" type="tns:roleType" default="1"/>

>                   <xs:attribute name="XDS" type="xs:string" use="required"/>

>                   <xs:attribute name="minOccurs" type="tns:allNNI" default="1"/>

>                   <xs:attribute name="maxOccurs" type="tns:allNNI" default="1"/>

>                   <xs:attribute name="opposite" type="xs:string"/>

>                 </xs:complexType>

>               </xs:element>

>             </xs:sequence>

>             <!-- SDO elements -->

>             <xs:element name="functionForDecomposition" minOccurs="0">

>               <xs:complexType>

>                 <xs:attribute name="name" type="xs:QName" use="required"/>

>                 <xs:attribute name="arity" type="xs:int" use="required"/>

>               </xs:complexType>

>             </xs:element>

>             <xs:element name="javaUpdateExit" minOccurs="0">

>               <xs:complexType>

>                 <xs:attribute name="className" type="xs:string" use="required"/>

>                 <xs:attribute name="classFile" type="xs:string"/>

>               </xs:complexType>

>             </xs:element>

>             <xs:element name="optimisticLockingFields" minOccurs="0">

>               <xs:complexType>

>                 <xs:choice>

>                   <xs:element name="updated">

>                     <xs:complexType/>

>                   </xs:element>

>                   <xs:element name="projected">

>                     <xs:complexType/>

>                   </xs:element>

>                   <xs:element name="field" minOccurs="0" maxOccurs="unbounded">

>                     <xs:complexType>

>                       <xs:attribute name="name" type="xs:string" use="required"/>

>                     </xs:complexType>

>                   </xs:element>

>                 </xs:choice>

>               </xs:complexType>

>             </xs:element>

>             <!-- security -->

>             <xs:element name="secureResources" minOccurs="0">

>               <xs:complexType>

>                 <xs:sequence>

>                   <xs:element name="secureResource" type="xs:string" minOccurs="0" maxOccurs="unbounded"/>

>                 </xs:sequence>

>               </xs:complexType>

>             </xs:element>

>             <xs:element name="readOnly" minOccurs="0">

>               <xs:complexType/>

>             </xs:element>

>           </xs:sequence>

>           <xs:attribute name="targetType" type="xs:QName" use="required"/>

>         </xs:complexType>

>       </xs:element>

>       <!--==================-->

>       <!--  XFL annotation  -->

>       <!--==================-->

>       <xs:element name="xfl">

>         <xs:complexType>

>           <xs:sequence>

>             <!-- document properties -->

>             <xs:element name="author" type="xs:string" minOccurs="0"/>

>             <xs:element name="comment" type="xs:string" minOccurs="0"/>

>             <xs:element name="creationDate" type="xs:dateTime" minOccurs="0"/>

>             <xs:element name="documentation" type="xs:string" minOccurs="0"/>

>             <xs:element name="version" type="xs:decimal" minOccurs="0"/>

>             <!-- user defined properties -->

>             <xs:sequence minOccurs="0" maxOccurs="unbounded">

>               <xs:element name="property">

>                 <xs:complexType>

>                   <xs:simpleContent>

>                     <xs:extension base="xs:string">

>                       <xs:attribute name="name" type="xs:string"/>

>                     </xs:extension>

>                   </xs:simpleContent>

>                 </xs:complexType>

>               </xs:element>

>             </xs:sequence>

>             <!-- data access properties -->

>             <xs:choice>

>               <!-- choice 1: java functions -->

>               <xs:element name="javaFunction">

>                 <xs:complexType>

>                   <xs:attribute name="class" type="xs:string" use="required"/>

>                 </xs:complexType>

>               </xs:element>

>               <!-- choice 2: web services -->

>               <xs:element name="webService">

>                 <xs:complexType>

>                   <xs:attribute name="wsdl" type="xs:anyURI" use="required"/>

>                   <xs:attribute name="targetNamespace" type="xs:anyURI" use="required"/>

>                 </xs:complexType>

>               </xs:element>

>               <!-- choice 3: relational sources -->

>               <xs:element name="relationalDB">

>                 <xs:complexType>

>                   <xs:sequence>

>                     <xs:element name="properties" minOccurs="0">

>                       <xs:complexType>

>                         <xs:attribute name="catalogSeparator" type="xs:string" use="required"/>

>                         <xs:attribute name="identifierQuote" type="xs:string" use="required"/>

>                         <xs:attribute name="catalogQuote" type="xs:string"/>

>                         <xs:attribute name="schemaQuote" type="xs:string"/>

>                         <xs:attribute name="tableQuote" type="xs:string"/>

>                         <xs:attribute name="columnQuote" type="xs:string"/>

>                         <xs:attribute name="nullSortOrder" type="tns:nullSortOrderType" use="required"/>

>                         <xs:attribute name="supportsCatalogsInDataManipulation" type="xs:boolean" use="required"/>

>                         <xs:attribute name="supportsLikeEscapeClause" type="xs:boolean" use="required"/>

>                         <xs:attribute name="supportsSchemasInDataManipulation" type="xs:boolean" use="required"/>

>                       </xs:complexType>

>                     </xs:element>

>                   </xs:sequence>

>                   <xs:attribute name="name" type="xs:string" use="required"/>

>                   <xs:attribute name="dbType" type="xs:string"/>

>                   <xs:attribute name="dbVersion" type="xs:string"/>

>                   <xs:attribute name="driver" type="xs:string"/>

>                   <xs:attribute name="uri" type="xs:string"/>

>                   <xs:attribute name="username" type="xs:string"/>

>                   <xs:attribute name="password" type="xs:string"/>

>                   <xs:attribute name="SID" type="xs:string"/>

>                   <xs:attribute name="sourceBindingProviderClassName" type="xs:string"/>

>                 </xs:complexType>

>               </xs:element>

>               <!-- choice 6: user defined view -->

>               <xs:element name="userDefinedView" minOccurs="0"/>

>               <!-- choice 7: nothing, defaults to userDefinedView -->

>               <xs:sequence/>

>             </xs:choice>

>           </xs:sequence>

>         </xs:complexType>

>       </xs:element>

>       <!--=======================-->

>       <!--  function annotation  -->

>       <!--=======================-->

>       <xs:element name="function">

>         <xs:complexType>

>           <xs:sequence>

>             <!-- standard properties -->

>             <xs:element name="author" type="xs:string" minOccurs="0"/>

>             <xs:element name="comment" type="xs:string" minOccurs="0"/>

>             <xs:element name="version" type="xs:decimal" minOccurs="0"/>

>             <xs:element name="documentation" type="xs:string" minOccurs="0"/>

>             <!-- user defined properties -->

>             <xs:sequence minOccurs="0" maxOccurs="unbounded">

>               <xs:element name="property">

>                 <xs:complexType>

>                   <xs:simpleContent>

>                     <xs:extension base="xs:string">

>                       <xs:attribute name="name" type="xs:string"/>

>                     </xs:extension>

>                   </xs:simpleContent>

>                 </xs:complexType>

>               </xs:element>

>             </xs:sequence>

>             <!-- UI properties -->

>             <xs:element name="uiProperties" minOccurs="0">

>               <xs:complexType>

>                 <xs:sequence maxOccurs="unbounded">

>                   <xs:element name="component">

>                     <xs:complexType>

>                       <xs:sequence>

>                         <xs:element name="treeInfo" minOccurs="0" maxOccurs="unbounded">

>                           <xs:complexType>

>                             <xs:sequence>

>     	                        <xs:element name="collapsedNodes" minOccurs="0">

>                                 <xs:complexType>

>                                   <xs:sequence>

>     		                            <xs:element name="collapsedNode" type="xs:string" minOccurs="0" maxOccurs="unbounded"/>

>                                   </xs:sequence>

>                                 </xs:complexType>

>                               </xs:element>

>                             </xs:sequence>

>                             <xs:attribute name="id" type="xs:string"/>

>                           </xs:complexType>

>                         </xs:element>

>                       </xs:sequence>

>                       <xs:attribute name="identifier" type="xs:string"/>

>                       <xs:attribute name="minimized" type="xs:boolean" default="false"/>

>                       <xs:attribute name="x" type="xs:int"/>

>                       <xs:attribute name="y" type="xs:int"/>

>                       <xs:attribute name="w" type="xs:int"/>

>                       <xs:attribute name="h" type="xs:int"/>

>                       <xs:attribute name="viewPosX" type="xs:int"/>

>                       <xs:attribute name="viewPosY" type="xs:int"/>

>                     </xs:complexType>

>                   </xs:element>

>                 </xs:sequence>

>               </xs:complexType>

>             </xs:element>

>             <!-- sql statement -->

>             <xs:element name="sql" minOccurs="0">

>               <xs:complexType>

>                 <xs:simpleContent>

>                   <xs:extension base="xs:string">

>                     <xs:attribute name="isSubquery" type="xs:boolean" default="true"/>

>                   </xs:extension>

>                 </xs:simpleContent>

>               </xs:complexType>

>             </xs:element>

>             <!-- cache -->

>             <xs:element name="nonCacheable" minOccurs="0">

>               <xs:complexType/>

>             </xs:element>

>             <!-- optimization -->

>             <xs:element name="outputIsOrderedBy" minOccurs="0">

>               <xs:complexType>

>                 <xs:sequence>

>                   <!-- absent for parameters whose order in the function signature

>                        coincides with their order in the order by list -->

>                   <xs:element name="parameter" minOccurs="0" maxOccurs="unbounded">

>                     <xs:complexType>

>                       <!-- 1, 2, ... -->

>                       <xs:attribute name="index" type="xs:int" use="required"/>

>                       <!-- overrides default -->

>                       <xs:attribute name="mode" type="tns:orderingModeType"/>

>                     </xs:complexType>

>                   </xs:element>

>                 </xs:sequence>

>                 <xs:attribute name="mode" type="tns:orderingModeType" use="required"/>

>               </xs:complexType>

>             </xs:element>

>             <xs:element name="inverseFunctions" minOccurs="0">

>               <xs:complexType>

>                 <xs:sequence>

>                   <xs:element name="inverseFunction" minOccurs="1" maxOccurs="unbounded">

>                     <xs:complexType>

>                       <!-- 1, 2, ... -->

>                       <xs:attribute name="parameterIndex" type="xs:int"/>

>                       <xs:attribute name="name" type="xs:QName" use="required"/>

>                     </xs:complexType>

>                   </xs:element>

>                 </xs:sequence>

>               </xs:complexType>

>             </xs:element>

>             <xs:element name="equivalentTransforms" minOccurs="0">

>               <xs:complexType>

>                 <xs:sequence>

>                   <xs:element name="pair" minOccurs="1" maxOccurs="unbounded">

>                     <xs:complexType>

>                       <xs:attribute name="source" type="xs:QName" use="required"/>

>                       <xs:attribute name="target" type="xs:QName" use="required"/>

>                       <xs:attribute name="arity"  type="xs:int"   use="required"/>

>                     </xs:complexType>

>                   </xs:element>

>                 </xs:sequence>

>               </xs:complexType>

>             </xs:element>

>             <!-- signature: used by java functions and stored procedures -->

>             <xs:element name="params" minOccurs="0">

>               <xs:complexType>

>                 <xs:sequence maxOccurs="unbounded">

>                   <xs:element name="param">

>                     <xs:complexType>

>                       <xs:attribute name="name" type="xs:string"/>

>                       <xs:attribute name="nativeType" type="xs:string"/>

>                       <xs:attribute name="nativeTypeCode" type="xs:int"/>

>                       <xs:attribute name="xqueryType" type="xs:QName"/>

>                       <xs:attribute name="kind" type="tns:paramKindType"/>

>                     </xs:complexType>

>                   </xs:element>

>                 </xs:sequence>

>               </xs:complexType>

>             </xs:element>

>             <!-- interceptor configuration: used by webservice SOAP interceptors -->

>             <xs:element name="interceptorConfiguration" minOccurs="0">

>               <xs:complexType>

>                 <xs:attribute name="aliasName" type="xs:string" use="required"/>

>                 <xs:attribute name="fileName" type="xs:string" use="required"/>

>               </xs:complexType>

>             </xs:element>

>           </xs:sequence>

>           <xs:attribute name="kind" type="tns:functionKindType"/>

>           <xs:attribute name="roleName" type="xs:string"/>

>           <xs:attribute name="nativeName" type="xs:string"/>

>           <xs:attribute name="nativeLevel1Container" type="xs:string"/>

>           <xs:attribute name="nativeLevel2Container" type="xs:string"/>

>           <xs:attribute name="nativeLevel3Container" type="xs:string"/>

>           <xs:attribute name="style" type="tns:functionStyleType"/>

>         </xs:complexType>

>       </xs:element>

>       <!--================-->

>       <!--  common types  -->

>       <!--================-->

>       <xs:simpleType name="functionKindType">

>         <xs:restriction base="xs:string">

>           <xs:enumeration value="read"/>

>           <xs:enumeration value="navigate"/>

>           <xs:enumeration value="private"/>

>           <xs:enumeration value="library"/>

>           <xs:enumeration value="hasSideEffects"/>

>         </xs:restriction>

>       </xs:simpleType>

>       <xs:simpleType name="functionStyleType">

>         <xs:restriction base="xs:string">

>           <xs:enumeration value="table"/>

>           <xs:enumeration value="view"/>

>           <xs:enumeration value="storedProcedure"/>

>           <xs:enumeration value="sqlQuery"/>

>           <xs:enumeration value="document"/>

>           <xs:enumeration value="rpc"/>

>         </xs:restriction>

>       </xs:simpleType>

>       <!-- used by stored procedures -->

>       <xs:simpleType name="paramKindType">

>         <xs:restriction base="xs:string">

>           <xs:enumeration value="unknown"/>

>           <xs:enumeration value="in"/>

>           <xs:enumeration value="inout"/>

>           <xs:enumeration value="out"/>

>           <xs:enumeration value="return"/>

>           <xs:enumeration value="result"/>

>         </xs:restriction>

>       </xs:simpleType>

>       <!-- used by maxOccurs in relationship -->

>       <xs:simpleType name="allNNI">

>         <xs:union memberTypes="xs:nonNegativeInteger">

>           <xs:simpleType>

>             <xs:restriction base="xs:string">

>               <xs:enumeration value="unbounded"/>

>               <xs:enumeration value=""/>

>             </xs:restriction>

>           </xs:simpleType>

>         </xs:union>

>       </xs:simpleType>

>       <!-- used by relationships -->

>       <xs:simpleType name="roleType">

>         <xs:restriction base="xs:nonNegativeInteger">

>           <xs:enumeration value="1"/>

>           <xs:enumeration value="2"/>

>         </xs:restriction>

>       </xs:simpleType>

>       <xs:simpleType name="autoNumberType">

>         <xs:restriction base="xs:string">

>           <xs:enumeration value="identity"/>

>           <xs:enumeration value="sequence"/>

>           <xs:enumeration value="userComputed"/>

>         </xs:restriction>

>       </xs:simpleType>

>       <xs:simpleType name="nullSortOrderType">

>         <xs:restriction base="xs:string">

>           <xs:enumeration value="high"/>

>           <xs:enumeration value="low"/>

>           <xs:enumeration value="unknown"/>

>         </xs:restriction>

>       </xs:simpleType>

>       <xs:simpleType name="scaleType">

>         <xs:union memberTypes="xs:int">

>           <xs:simpleType>

>             <xs:restriction base="xs:string">

>               <xs:enumeration value="null"/>

>             </xs:restriction>

>           </xs:simpleType>

>         </xs:union>

>       </xs:simpleType>

>       <xs:simpleType name="orderingModeType">

>         <xs:restriction base="xs:string">

>           <xs:enumeration value="ascending"/>

>           <xs:enumeration value="descending"/>

>         </xs:restriction>

>       </xs:simpleType>

>     </xs:schema>