You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@ibatis.apache.org by "Cruz Fernandez (JIRA)" <ib...@incubator.apache.org> on 2009/05/07 14:38:30 UTC

[jira] Commented: (IBATISNET-246) SqlMap.xsd is incorrect: sql element can have an include sub-element

    [ https://issues.apache.org/jira/browse/IBATISNET-246?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12706823#action_12706823 ] 

Cruz Fernandez commented on IBATISNET-246:
------------------------------------------

Shouldn't the other dynamic tags also allow the element "include" inside them? The isEqual, isNotEqual, etc.

I modified the xsd locally and it can work correctly

> SqlMap.xsd is incorrect: sql element can have an include sub-element 
> ---------------------------------------------------------------------
>
>                 Key: IBATISNET-246
>                 URL: https://issues.apache.org/jira/browse/IBATISNET-246
>             Project: iBatis for .NET
>          Issue Type: Bug
>          Components: DataMapper
>    Affects Versions: DataMapper 1.6.1
>            Reporter: Andrea Tassinari
>            Priority: Minor
>             Fix For: DataMapper 1.6.2
>
>
> 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>

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.