You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user-cs@ibatis.apache.org by Martin Wickman <ma...@dapresy.com> on 2009/05/10 15:58:30 UTC

inside dynamic sql

Hello

The SqlMap.xsd does not allow a construct like the one below:

        <select id="a">
            <isEqual property="a" compareValue="foo">
                SELECT 1 as A
                <include refid="someSql"/>                
            </isEqual>
        </select>

==> Warning	1	The element 'isEqual' in namespace 'http://ibatis.apache.org/mapping' has invalid child element 'include' in namespace 'http://ibatis.apache.org/mapping'. List of possible elements expected: 'isEmpty, isEqual, isGreaterEqual, isGreaterThan, isLessThan, isLessEqual, isNotEmpty, isNotEqual, isNotNull, isNotParameterPresent, isNotPropertyAvailable, isNull, isParameterPresent, isPropertyAvailable, iterate' in namespace 'http://ibatis.apache.org/mapping'.	

Note that iBatis itself can handle nested <include> tags. The quirk is I have to set <setting validateSqlMap="false"/> which kinda defeats the reasoning behind using an xsd file in the first place. 

Is this a bug in the xsd file?