Details
-
Bug
-
Status: Closed
-
Minor
-
Resolution: Fixed
-
DataMapper 1.6.1
-
None
Description
The original SqlMap.xsd states that an "sql" element can not have an "include" sub-element which is not true. In fact the code snippet below is perfectly legal and working.
<sql id="TestTable_SelectFields">
SELECT Id, description
</sql>
<sql id="TestTable_BaseSQL">
<include refid="TestTable_SelectFields" />
FROM TestTable
</sql>
An updated and working schema is reportef below (note the new linw with <xs:element ref="include"/>):
<xs:element name="sql">
<xs:complexType mixed="true">
<xs:choice minOccurs="0" maxOccurs="unbounded">
<xs:element ref="include"/>
<xs:element ref="dynamic"/>
<xs:element ref="isEmpty"/>
<xs:element ref="isEqual"/>
<xs:element ref="isGreaterEqual"/>
<xs:element ref="isGreaterThan"/>
<xs:element ref="isLessThan"/>
<xs:element ref="isLessEqual"/>
<xs:element ref="isNotEmpty"/>
<xs:element ref="isNotEqual"/>
<xs:element ref="isNotNull"/>
<xs:element ref="isNotParameterPresent"/>
<xs:element ref="isNotPropertyAvailable"/>
<xs:element ref="isNull"/>
<xs:element ref="isParameterPresent"/>
<xs:element ref="isPropertyAvailable"/>
<xs:element ref="iterate"/>
</xs:choice>
<xs:attribute name="id" type="xs:string" use="required"/>
</xs:complexType>
</xs:element>