Deister has developed its own grammar based on the XML language that allows writing stored procedures independently of the database engine in which it will be stored. Axional Studio performs the transformation of the XML code into the corresponding language of the database before being stored. The transformation mechanism is performed automatically (transparent to the user) at the time of compiling the stored procedure.
 

1 Test

<procedure name='name'>
    <test id='id' /> *
    <args> *
        <arg name='name' /> +
    </args>
</procedure>
 

2 Grammar XUDP / XUDF

There are two types of functions that share a common scheme, differing only in that XUDF returns a value and XUDP supports input/output arguments.

  • XUDP: this is the name of the User Defined Procedure written in the XML language of Axional Studio.
  • XUDF: this is the name of the User Defined Function written in the XML language of Axional Studio.
XUDP (Procedure) XUDF (Function)
Return value    
Parameters IN/OUT    
 

3 Procedure

The grammar provides the elements (tags) listed below.

<procedure name='name'>
    <test id='id' /> *
    <args> *
        <arg
            name='name'
            like='like'
            type='smallint|int|integer|float|smallfloat|decimal|char|varchar|date|datetime|interval'
            size='size'
            mode='in|out'
            dict='dict'
        /> +
    </args>
    <define> *
        <variable
            name='name'
            like='like'
            type='smallint|int|integer|float|smallfloat|decimal|char|varchar|date|datetime|interval'
            size='size'
            dict='dict'
        /> +
    </define>
    <body> *
        <insert /> *
        <delete /> *
        <update /> *
        <select /> *
        <set name='name' /> *
        <if> *
            <expr> !
                <cond> !
            </expr>
            <then> !
                <instructions> !
                <set> !
                <debug> ?
                <exception> ?
            </then>
            <else-if> *
                <expr> !
                    <cond> !
                </expr>
                <then> !
                    <instructions> !
                    <set> !
                    <debug> ?
                    <exception> ?
                </then>
            </else-if>
            <else> ?
                <instructions> !
            </else>
        </if>
        <while> *
            <expr> !
                <cond> !
            </expr>
            <do> !
                <instructions> !
                <while.exit /> *
            </do>
        </while>
        <for name='name'> *
            <var-in /> !
            <do> !
                <instructions> !
            </do>
        </for>
        <foreach> *
            <select> !
                <into /> *
                <columns /> *
            </select>
            <if> !
                <expr> !
                    <cond> !
                </expr>
                <then> !
                    <instructions> !
                    <set> !
                    <exit> ?
                </then>
            </if>
        </foreach>
        <set name='name'> *
            <function /> +
        </set>
        <execute-procedure name='name'> *
            <in> *
                <param /> *
            </in>
            <out> *
                <var name='name' /> *
            </out>
        </execute-procedure>
        <lock
            table='table'
            mode='mode'
        /> *
        <unlock table='table' /> *
    </body>
</procedure>
 

3.1 TAG procedure

This item indicates that a User Defined Procedure will be initiated and contains the rest of the XML document tags.

It consists of the following attribute:

name (mandatory): allows you to specify the name of the procedure. It cannot exceed 30 characters (DB2 limitation). This name can be used to invoke the procedure from triggers, functions, scripts or other procedures.

Copy
<procedure name='icon_get_docser'>
 

3.2 Test units

This element allows the inclusion of tests of the function itself. Using a Java utility it is possible to have all functions and procedures cataloged in the dictionary automatically tested.

Copy
<test>
    <unit id='1'>
        SELECT icon_get_docser(<char>'FC-001345'</char>) FROM cdataemp;
    </unit>
    <unit id='2'>
        SELECT icon_get_docser(<char>'-123'</char>) FROM cdataemp;
    </unit>
</test>

As can be seen, the tests can consist of calls from queries. The execution of both tests should return the following results:

Unit 1:

Copy
FC-

Unit 1:

Copy
-
 

3.2.1 TAG unit

t consists of the following attribute:

Code Description Required
Id To enter the identifier of the test unit.  
 

3.3 Input and output parameters

Example of declaration of input parameters in a function:

Copy
<args>
    <arg name='p_docser' like='capuntes.docser' />
    <arg name='p_fecval' type='date'            />
    <arg name='p_paso'   type='smallint'        />
</args>

The input parameters p_docser are declared of the same type as the docser column of the capuntes table, the p_fecval of date type and the p_paso of integer type.

Example parameter declaration in a procedure:

Copy
<args>
    <arg name='p_empcode' like='capuntes.empcode' mode='in'  />
    <arg name='p_jusser'  like='capuntes.jusser'  mode='in'  />
    <arg name='p_docser'  like='capuntes.docser'  mode='in'  />
    <arg name='p_fecha'   like='capuntes.fecha'   mode='in'  />

    <arg name='o_jusser'  like='capuntes.jusser'  mode='out' />
    <arg name='o_docser'  like='capuntes.docser'  mode='out' />
</args>

P_empcode, p_jusser, p_docser and p_date are defined as input parameters, and o_jusser and o_docser as output parameters. The declaration of the output parameters implies their declaration as variables.

 

3.3.1 TAG args

This tag contains, using the arg tag, the different parameters of the function or procedure.

 

TAG arg

This element must be used for each input or output parameter.

It consists of the following attributes:

Code Description Required
name It allows specifying the name of the parameter.  
type To indicate the type of parameter data (smallint,integer,smallfloat,float,decimal,char,varchar,date,datetime,interval).  
size It must contain the parameter size (if the type of data requires it).  
like It allows obtaining the data type of an existing column.  
dict It is only necessary when the data type that is specified in the like attribute must be obtained before the function is compiled. In the case of being a column with 'like', it can specified the dictionary database (wic) in which the physical table schema to which the attribute like refers is defined, in case it is different from the database of dictionary in which this function is being defined. For example, if the function is defined in a particular wic (wic_custom) and the 'like' refers to a column of a standard management table, the wic_iges database should be indicated in the dict parameter so that its definition can be obtained.  

Returns

It is recommended to use the attribute like whenever possible, as it offers the advantage that, when the column data type is updated in the physical definition of the table (Physical Data Dictionary), the change does have to be made in all the parameters that refer to that column.

Difference with respect to XUDP

The 'arg' tag also includes the following attribute for procedures:

Code Description Required
mode To indicate the type of parameter. (in: input.), (out: output.)  
 

3.3.2 Declaration of variables

Exemple:

Copy
<define>
    <variable name='m_pos'    type='smallint'        />
    <variable name='m_str'    like='capuntes.docser' />
    <variable name='m_separa' type='char' size='1'   />
</define>

The variables m_pos of integer type are defined of the same type as m_str of the docser column of the capuntes table and the m_separa of character type with length 1.

 

TAG define

It contains the definition of the variables.

 
TAG define

This label is required for each of the variables to be used.

It consists of the following attributes:

Code Description Required
name It allows specify the name of the parameter.  
type To indicate the type of parameter data (smallint,integer,smallfloat,float,decimal,char,varchar,date,datetime,interval).  
size It must contain the parameter size (if the type of data requires it).  
like It allows obtaining the data type of an existing column.  
dict It is only necessary when the data type specified in the 'like' attribute must be obtained before the function is compiled. In the case of being a column with 'like', it can be specify the dictionary database (wic) in which the physical table schema to which the attribute 'like' refers is defined, in case it is different from the dictionary database in which this function is being defined. For example, if the function is defined in a particular wic (wic_custom) and 'like' it refers to a column of a standard management table, the wic_iges database should be indicated in the dict parameter so that its definition can be obtained.  

Information

It is recommended to use the attribute like whenever possible, as it offers the advantage that when the column data type is updated in the physical definition of the table (Physical Data Dictionary), the change is not necessary be performed in all the parameters that make reference to that column.

 

Attributes like and dict in tag arg, variable and return.

The attribute like allows declaring the type of argument, variable or value returned implicitly. It is advisable to use this method of declaration when an argument refers to a column in the database, This way, if the column tpe changes, the program will not have to be modified. For example, when an input argument receives as a value the code stored in a column of a table. It will always be like that. If the column is of type char (8), it is better to put the argument as like. So if in the future the column suffers type alterations, the program doesn't need to not be modified.

Copy
<args>
    <arg name='p_codigo' like='garticul.codigo' />
    [...]
</args>

In the case of using like, the attribute dict allows indicating the dictionary databases (wic) in which the physical table scheme to which the 'like' argument is referred to, in case it were different from the dictionary database in which this procedure is being defined.

Depending on the database agent in which the procedure will be compiled, it will not always be necessary to define the database, although the column is in a different dictionary database, since the type is not required before compilation. This is due to the fact that SQL grammar that can be used on each agent.

Agent Expression XML Transformation Necessary
Argument
type To indicate the type of parameter data (smallint,integer,smallfloat,float,decimal,char,varchar,date,datetime,interval).  
size It must contain the parameter size (if the type of data requires it).  
like It allows obtaining the data type of an existing column.  
dict It is only necessary when the data type that is indicated in the attribute 'like' must be obtained before the function is compiled. In case of being a column with 'like', you can specify the dictionary database (wic) where the physical table schema to which the attribute like refers is defined, in case it were different from the database of dictionary in which this function is being defined. For example, if the function is defined in a particular wic (wic_custom) and 'like' refers to a column of a standard management table, the wic_iges database should be indicated in the dict parameter, so that its definition can be obtained.  

Información

It is recommended to use the attribute like whenever possible, since it offers the advantage that when the column data type is updated in the physical definition of the table (Physical Data Dictionary), it is not necessary to change it in all the parameters that refer to that column.

 

4 DTD de XUDP y XUDF

 

4.1 DTD principal de XUDP y XUDF

Copy
<!-- ==================================
 
	webstutio XSQL FUNCTION AND PROCEDURE DTD (Version 1.0)
 
	COPYRIGHT:
	Copyright (c) 2003, 2018 DEISTER, S.A.
 
	Permission to copy in any form is forbidden.
 
================================== -->
 
 
<!-- ================================
	 Common.dtd functions are included, this already includes the
     common.dtd
     ================================ -->
<!ENTITY % udbasics.dtd SYSTEM "xsql2sql-udbasics.dtd">
 
%udbasics.dtd;
 
<!-- ================================
	 UDF Start
     ================================ -->
<!ELEMENT xsql-udfunc (function)*>
 
 
<!-- ================================
    Input for an include XUDF.
    Start of an include UDF. The programmer does not put this root tag,
    it is put from formeditTag.java. There is already an input in the transformer for this tag.
     ================================ -->
<!ELEMENT xudf-include (%text;|%sqlfunctions;|%udbasics;)*>
 
 
<!-- ================================
 
     ================================ -->
<!ELEMENT function (test?, args?, returns*, define?, body*)>
<!ATTLIST function %common.att;>
<!ATTLIST function name CDATA #REQUIRED>
<!ATTLIST function db2i   (yes|y) #IMPLIED>
<!ATTLIST function db2u   (yes|y) #IMPLIED>
<!ATTLIST function ids    (yes|y) #IMPLIED>
<!ATTLIST function iwa    (yes|y) #IMPLIED>
<!ATTLIST function oracle (yes|y) #IMPLIED>
<!ATTLIST function postgres (y|yes) #IMPLIED>
<!ATTLIST function sqlserver (y|yes) #IMPLIED>
<!ATTLIST function mysql    (y|yes) #IMPLIED>
<!ATTLIST function access    (y|yes) #IMPLIED>
<!ATTLIST function universe    (y|yes) #IMPLIED>
<!ATTLIST function cloudscape    (y|yes) #IMPLIED>
 
<!-- ================================
	 <args>
	 	<arg name='p_char' type='char' size='3' />
	 	<arg name='p_num1' type='integer' />
	 	<arg name='p_art'  like='garticul.codigo' />
	 </args>
 
     ================================ -->
<!ELEMENT args (arg+)>
 
<!ELEMENT arg EMPTY>
<!ATTLIST arg name CDATA #REQUIRED>
<!ATTLIST arg like CDATA #IMPLIED>
<!ATTLIST arg type      (smallint|int|int8|integer|smallfloat|float|decimal|boolean|char|nchar|varchar|lvarchar|nvarchar|date|datetime|interval|byte|text|clob|blob|geometry) #IMPLIED>
<!ATTLIST arg size CDATA #IMPLIED>
 
<!-- ================================
	 	<returns type='integer' />
 
	Si la funcion es de wic_iges
	 	<returns like='garticul.codigo' />
     ================================ -->
<!ELEMENT returns EMPTY>
<!ATTLIST returns like CDATA #IMPLIED>
<!ATTLIST returns type  (smallint|int|int8|integer|smallfloat|float|decimal|boolean|char|nchar|varchar|lvarchar|nvarchar|date|datetime|interval|byte|text|clob|blob|geometry) #IMPLIED>
<!ATTLIST returns size CDATA #IMPLIED>
 
<!-- ================================
 
     ================================ -->
<!ELEMENT body (%text;|%sqlfunctions;|%udbasics;)*>
 
<!-- ================================ -->
<!-- End of DTD -->
<!-- ================================ -->
 

4.2 TD of common specifications between XSQL Funtions and XSQL Procedures: udbasics.dtd

Copy
<!-- ==================================
 
	webstutio XSQL UDBASICS DTD (Version 1.0)
 
	COPYRIGHT:
	Copyright (c) 2003, 2018 DEISTER, S.A.
 
	Permission to copy in any form is forbidden.
 
================================== -->
 
 
<!-- ================================
	 UDF Tags
     ================================ -->
<!ENTITY % udbasics "set|lock|unlock|debug|if|if-exists|conditional|if-engine|if-not-engine|include|while|for|foreach|select|return|exception|exit|continue|nativesql|insert|delete|update|execute-procedure|execute-function|schema.colsize" >
<!ENTITY % sqlca "sqlca.rowcount|sqlca.serial" >
<!ENTITY % select-elements "ids-directive|oracle-directive|db2u-directive|db2i-directive|postgres-directive|mysql-directive|sqlserver-directive|columns|into" >
 
<!-- ================================
	 We include the functions of common.dtd
     ================================ -->
<!ENTITY % common.dtd SYSTEM "xsql2sql-common.dtd">
 
%common.dtd;
 
<!-- ================================
	 <test>
	 	<unit id='1'>
	 		...
	 	</unit>
	 	<unit id='2'>
	 		...
	 	</unit>
	 </test>
     ================================ -->
<!ELEMENT test (unit+)>
<!ELEMENT unit (%text;|%sqlfunctions;)*>
<!ATTLIST unit id CDATA #REQUIRED>
<!ATTLIST unit ids    (yes|y) #IMPLIED>
<!ATTLIST unit iwa    (yes|y) #IMPLIED>
<!ATTLIST unit db2i   (yes|y) #IMPLIED>
<!ATTLIST unit db2u   (yes|y) #IMPLIED>
<!ATTLIST unit oracle (yes|y) #IMPLIED>
<!ATTLIST unit postgres (y|yes) #IMPLIED>
<!ATTLIST unit sqlserver (y|yes) #IMPLIED>
<!ATTLIST unit mysql    (y|yes) #IMPLIED>
<!ATTLIST unit access    (y|yes) #IMPLIED>
<!ATTLIST unit universe    (y|yes) #IMPLIED>
<!ATTLIST unit cloudscape    (y|yes) #IMPLIED>
 
 
<!-- ================================
	<variable name='x' type='integer'>
 
	If you are in wic_iges
	<variable like='garticul.codigo'>
     ================================ -->
<!ELEMENT define (variable)*>
<!ELEMENT variable EMPTY>
<!ATTLIST variable name CDATA #REQUIRED>
<!ATTLIST variable like CDATA #IMPLIED>
<!ATTLIST variable type (smallint|integer|float|smallfloat|decimal|char|varchar|date|datetime|interval|geometry) #IMPLIED>
<!ATTLIST variable size CDATA #IMPLIED>
 
<!-- ================================
     <schema.colsize />
     ================================ -->
<!ELEMENT schema.colsize EMPTY>
<!ATTLIST schema.colsize name CDATA #REQUIRED>
 
<!-- ================================
     <sqlca.rowcount />
     ================================ -->
<!ELEMENT sqlca.rowcount EMPTY>
 
<!-- ================================
     <sqlca.serial />
     ================================ -->
<!ELEMENT sqlca.serial EMPTY>
 
<!-- ================================
     <set name='x'>...</set>
     ================================ -->
<!ELEMENT set (%text;|%sqlfunctions;|%sqlca;|schema.colsize)*>
<!ATTLIST set name CDATA #REQUIRED>
 
<!-- ================================
     <lock table='x' mode='(share|exclusive)' />
     ================================ -->
<!ELEMENT lock EMPTY>
<!ATTLIST lock table CDATA #REQUIRED>
<!ATTLIST lock mode (share|exclusive) #REQUIRED>
 
<!-- ================================
     <unlock table='x' />
     ================================ -->
<!ELEMENT unlock EMPTY>
<!ATTLIST unlock table CDATA #REQUIRED>
 
<!-- ================================
     <debug>message</debug>
     ================================ -->
<!ELEMENT debug (%text;)>
 
<!-- ================================
     <if>
        <expr>
        ...
        </expr>
        <then>
        ...
        </then>
        <else-if><expr></expr><then></then></else-if>
        <else-if><expr></expr><then></then></else-if>
        <else-if><expr></expr><then></then></else-if>
        <else>
        ...
        </else>
     </if>
     ================================ -->
<!ELEMENT if (expr, then, else-if*, else?)>
<!ELEMENT expr (%text;|%sqlfunctions;|%sqlca;)*>
<!ELEMENT then (%text;|%sqlfunctions;|%udbasics;|%sqlca;)*>
<!ELEMENT else-if (expr, then)*>
<!ELEMENT else (%text;|%sqlfunctions;|%udbasics;|%sqlca;)*>
 
<!-- ================================
     <while>
     	<expr>
     		...
     	</expr>
     	<do>
     	...
     		<continue />
	     	<exit />
     	</do>
     </while>
     ================================ -->
<!ELEMENT while (expr, do)>
<!ELEMENT do    (%text;|%sqlfunctions;|%udbasics;|%sqlca;)*>
 
<!-- ================================
     INFORMIX
 
     FOR p_trigname IN ("a", "b", "c")
 
     END FOR
 
     <for var=''>
		<var-in>
		</var-in>
     	<do>
     	...
     		<continue />
	     	<exit />
     	</do>
     </for>
     ================================ -->
<!ELEMENT for (var-in, do)>
<!ELEMENT var-in (%text;)>
<!ATTLIST for var CDATA #IMPLIED>
 
<!-- ================================
 	 UNION
	 ================================ -->
<!ELEMENT union (select+)>
<!ATTLIST union type CDATA #IMPLIED>
 
<!-- ================================
     <select first='3'>
     	<columns>a,b,c</columns>
     	<into>m_a,m_b,m_c</into>
     	FROM table
     	WHERE a = 'X1'
     </select>
     ================================ -->
<!ELEMENT select  (%text;|%sqlfunctions;|%select-elements;)*>
<!ATTLIST select first CDATA #IMPLIED>
 
<!ELEMENT columns (%text;|%sqlfunctions;)*>
<!ELEMENT into    (%text;)>
 
<!-- ================================
     <directive>
     Utilitzat per ara en els SELECT i UPDATE.
     ================================ -->
<!ELEMENT ids-directive (%text;)>
<!ELEMENT oracle-directive (%text;)>
<!ELEMENT db2u-directive (%text;)>
<!ELEMENT db2i-directive (%text;)>
<!ELEMENT postgres-directive (%text;)>
<!ELEMENT mysql-directive (%text;)>
<!ELEMENT sqlserver-directive (%text;)>
 
 
<!-- ================================
     <foreach>
		<select>
		</seletc>
 
		<if>
			...
		</if>
		<insert />
     </foreach>
 
     24/12/2009 It also supports the do as a xsql script and, as they also do it, while and for xudf and xudp.
 
     <foreach>
		<select>
		</seletc>
 
		<do>
			<if>
				...
			</if>
			<insert />
		</do>
     </foreach>
     ================================ -->
 
<!ELEMENT foreach ((union|select), (if|set|exception|select|foreach|insert|delete|update|nativesql|while|execute-procedure|execute-function|include|do)*, exit?) >
 
<!-- ================================
     <if-exists type='function' name='funcname'>...</if-exitst>
     <if-exists type='table' name='tabname' raise='true'>...</if-exitst>
     ================================ -->
<!ELEMENT if-exists (then, else?)*>
<!ATTLIST if-exists name CDATA #REQUIRED>
<!ATTLIST if-exists type (table|function|procedure|trigger) #REQUIRED>
<!ATTLIST if-exists variable (true) #IMPLIED>
<!ATTLIST if-exists raise (true) #IMPLIED>
 
 
<!-- ================================
     <conditional type='function' name='funcname'>...</if-exitst>
     <conditional type='table' name='tabname'>....</if-exitst>
     ================================ -->
<!ELEMENT conditional (%text;|%sqlfunctions;|%udbasics;|%sqlca;)*>
<!ATTLIST conditional name CDATA #REQUIRED>
<!-- By default the object must exist. But it can be indicated that  -->
<!-- the block can be applied withing the conditional when it does NOT exist. -->
<!ATTLIST conditional exists (true|false) #IMPLIED>
<!ATTLIST conditional type (table|function|procedure|trigger) #REQUIRED>
 
 
<!-- ================================
     The code is only transformed if the engine is of the type specified.
     <if-engine type='ids'>
		code
     <if-engine>
 
     The code is NOT transformed if the engine is of the type specified.
     <if-not-engine type='ids'>
		code
     <if-not-engine>
 
     ================================ -->
<!ELEMENT if-engine (%text;|%sqlfunctions;|%udbasics;|%sqlca;)*>
<!ATTLIST if-engine type (ids|iwa|oracle|db2i|db2u|postgres|sqlserver|mysql|access|universe|cloudscape) #REQUIRED>
 
<!ELEMENT if-not-engine (%text;|%sqlfunctions;|%udbasics;|%sqlca;)*>
<!ATTLIST if-not-engine type (ids|iwa|oracle|db2i|db2u|postgres|sqlserver|mysql|access|universe|cloudscape) #REQUIRED>
 
<!-- ================================
     <include name='proc_include_name' />
     ================================ -->
<!ELEMENT include EMPTY>
<!ATTLIST include name CDATA #REQUIRED>
 
<!-- ================================
     <exception>
     	...
     </exception>
     ================================ -->
<!ELEMENT exception (%text;|%textfunctions;)*>
 
<!-- ================================
     <return>a</return>
     ================================ -->
<!ELEMENT return (%text;|%sqlfunctions;)*>
 
<!-- ================================
     <nativesql>a</nativesql>
     ================================ -->
<!ELEMENT nativesql (%text;|%sqlfunctions;)*>
<!ATTLIST nativesql order  CDATA #IMPLIED>
<!ATTLIST nativesql ids    (y|yes) #IMPLIED>
<!ATTLIST nativesql iwa    (y|yes) #IMPLIED>
<!ATTLIST nativesql db2i   (y|yes) #IMPLIED>
<!ATTLIST nativesql db2u   (y|yes) #IMPLIED>
<!ATTLIST nativesql oracle (y|yes) #IMPLIED>
<!ATTLIST nativesql postgres (y|yes) #IMPLIED>
<!ATTLIST nativesql sqlserver (y|yes) #IMPLIED>
<!ATTLIST nativesql mysql    (y|yes) #IMPLIED>
<!ATTLIST nativesql access    (y|yes) #IMPLIED>
<!ATTLIST nativesql universe    (y|yes) #IMPLIED>
<!ATTLIST nativesql cloudscape    (y|yes) #IMPLIED>
 
 
<!-- ================================
     <insert table='name'>
     	<column name='a'>val1</column>
     	<column name='b'>val2</column>
     	<column name='c'>val3</column>
     </insert>
 
     <insert table='name'><select ...></select></insert>
 
     <insert table='name' columns='a,b,c'><select ...></select></insert>
 
     <delete table><where>condition</where></delete>
 
     <update table>
       <column name='a'>value1</column>
       <column name='b'>value2</column>
       <where>
      	condition
       </where>
     </update>
     ================================ -->
<!ELEMENT insert (column|select)*>
<!ELEMENT delete (ids-directive?, oracle-directive?, db2u-directive?, db2i-directive?, postgres-directive?, mysql-directive?, sqlserver-directive?, where?)>
<!ELEMENT update (ids-directive?, oracle-directive?, db2u-directive?, db2i-directive?, postgres-directive?, mysql-directive?, sqlserver-directive?, column+, where?)>
 
<!ATTLIST insert table CDATA #REQUIRED>
<!ATTLIST insert columns CDATA #IMPLIED>
 
<!ATTLIST update table CDATA #REQUIRED>
 
<!ATTLIST delete table CDATA #REQUIRED>
 
<!ELEMENT column (%text;|%sqlfunctions;)*>
<!ATTLIST column name CDATA #REQUIRED>
 
<!ELEMENT where (%text;|%sqlfunctions;)*>
 
<!-- ================================
     <execute-function name='icon_nxt_asient' into='m_var' db2vtable='true'>'0', <today />, 0</execute-function>
     ================================ -->
<!ELEMENT execute-function (%text;|%sqlfunctions;|%udbasics;|%sqlca;)*>
<!ATTLIST execute-function name CDATA #REQUIRED>
<!ATTLIST execute-function into CDATA #REQUIRED>
<!ATTLIST execute-function db2vtable (true) #IMPLIED>
 
<!-- ================================
     <execute-procedure name='icon_nxt_asient'>
     	<in>
     		<param></param>
     		<param></param>
     	</in>
     	<out>
       		<var name='' />
       		<var name='' />
       		<var name='' />
	   	</out>
     </execute-procedure>
     ================================ -->
<!ELEMENT execute-procedure (in|out)*>
<!ATTLIST execute-procedure name CDATA #REQUIRED>
<!ATTLIST execute-procedure recursive (true) #IMPLIED>
 
<!ELEMENT in (param+)>
<!ELEMENT out (var+)>
 
<!ELEMENT param (%text;|%sqlfunctions;)*>
 
<!ELEMENT var EMPTY>
<!ATTLIST var name CDATA #REQUIRED>
 
<!-- ================================
     <exit />
     ================================ -->
<!ELEMENT exit  EMPTY>
 
<!-- ================================
     <continue />
     ================================ -->
<!ELEMENT continue  EMPTY>
 
 
 
<!-- ================================ -->
<!-- End of DTD -->
<!-- ================================ -->
 

4.3 DTD of common specifications to all transformers: common.dtd

Copy
<!-- ==================================
 
	webstutio XSQL Common DTD (Version 1.0)
 
	COPYRIGHT:
	Copyright (c) 2003, 2018 DEISTER, S.A.
 
	Permission to copy in any form is forbidden.
 
================================== -->
 
<!-- ================================ -->
<!-- Useful entities for increased DTD readability -->
<!-- ================================ -->
 
<!ENTITY % text "#PCDATA">
<!ENTITY % ansifunctions "decode">
<!ENTITY % textfunctions "rowid|alias|user|length|trim|substr|shrink|char|smallint|matches|regexp|exists|nvl|min|max|cast|whitespace|deferred-constraint">
<!ENTITY % datefunctions "year|month|day|hour|minute|second|weekday|lastday|today|current|mdy|extend|date|datetime|eval-date|eval-datetime|sub-dates|days|seconds|seconds-todsinterval">
<!ENTITY % trigfunctions "prv|nxt">
<!ENTITY % geofunctions "geo.fromText|coords|srid|geo.point2D|geo.line|geo.polygon|geo.getType|geo.getX|geo.getY|geo.getZ|geo.getEnvelope|geo.isValid|
                         geo.getCoordDim|geo.getDim|geo.getSRID|geo.getNumVertices|geo.asKml|geo.asGml|geo.asWkt|geo.asWkb|geo.asSVG|geo.asGeoJSON|geo.transform|geo.reverseLine|
                         geom1|geom2|spheroid|dist|threshold|geo.perimeter|geo.area|geo.distanceCartesian|geo.distanceSphere|geo.distanceSpheroid|geo.length|geo.lengthSpheroid|
                         geo.centroid|geo.withinDist|geo.equals|geo.touches|geo.overlaps|geo.covers|geo.coveredBy|geo.contains|geo.within|geo.disjoint|geo.intersects|
                         geo.intersection|geo.buffer|geo.simplify|geo.convexHull|geo.difference|geo.symDifference|geo.aggrUnion|geo.aggrMbr|geo.aggrConvexHull">
<!ENTITY % sqlfunctions "%ansifunctions;|%textfunctions;|%datefunctions;|%trigfunctions;|%geofunctions;" >
 
 
<!-- ================================ -->
<!-- Entities for general XML compliance -->
<!-- ================================ -->
 
<!-- Common attributes
        Every element has an ID attribute (sometimes required,
        but usually optional) for links. %common.att;
        is for common attributes where the ID is optional, and
        %common-idreq.att; is for common attributes where the
        ID is required.
-->
<!ENTITY % common.att
        'id                     ID              #IMPLIED
         xml:lang               NMTOKEN         #IMPLIED'>
<!ENTITY % common-idreq.att
        'id                     ID              #REQUIRED
         xml:lang               NMTOKEN         #IMPLIED'>
 
 
 
<!-- ======================================= -->
<!-- textfunctions                                                                  -->
<!-- ======================================= -->
<!ELEMENT rowid EMPTY>
<!ATTLIST rowid table CDATA #IMPLIED>
<!ATTLIST rowid alias CDATA #IMPLIED>
<!ATTLIST rowid if-physical-table CDATA #IMPLIED>
 
<!-- ================================
     <alias table='cdiarios' />
     ================================ -->
<!ELEMENT alias EMPTY>
<!ATTLIST alias name CDATA #REQUIRED>
 
<!ELEMENT user EMPTY>
 
<!ELEMENT exists (select)>
 
<!ELEMENT nvl (%text;|%sqlfunctions;)*>
 
<!ELEMENT min (%text;|%sqlfunctions;)*>
 
<!ELEMENT max (%text;|%sqlfunctions;)*>
 
<!ELEMENT char (%text;|%sqlfunctions;)*>
 
<!ELEMENT smallint (%text;|%sqlfunctions;)*>
 
<!ELEMENT trim (%text;|%sqlfunctions;)*>
 
<!ELEMENT substr (%text;|%sqlfunctions;)*>
 
<!ELEMENT length (%text;|%sqlfunctions;)*>
 
<!ELEMENT shrink (%text;|%sqlfunctions;)*>
 
<!ELEMENT matches (%text;|%sqlfunctions;)*>
 
<!--                                                                   -->
<!-- <regexp>                                                          -->
<!--   <reg-col>codigo</reg-col>                                       -->
<!--   <reg-expr ids='y'>'*c[12]'</reg-expr>                           -->
<!--   <reg-expr oracle='y'>'%c[12]'</reg-expr>                        -->
<!--   <reg-expr db2i='y'>'%c[12]'</reg-expr>                           -->
<!--   <reg-expr>'%c[12]'</reg-expr>                                   -->
<!-- </regexp>                                                         -->
<!--                                                                   -->
<!-- IDS: column MATCHES '*c[12]'                                      -->
<!-- ORACLE: REGEXP_LIKE(column, '%c[12]')                             -->
<!--                                                                   -->
<!ELEMENT regexp (column|expression)*>
<!ELEMENT reg-col (%text;)>
<!ELEMENT reg-expr (%text;|%sqlfunctions;)*>
<!ATTLIST reg-expr ids    (y|yes) #IMPLIED>
<!ATTLIST reg-expr iwa    (y|yes) #IMPLIED>
<!ATTLIST reg-expr db2i    (y|yes) #IMPLIED>
<!ATTLIST reg-expr db2u    (y|yes) #IMPLIED>
<!ATTLIST reg-expr oracle (y|yes) #IMPLIED>
<!ATTLIST reg-expr postgres (y|yes) #IMPLIED>
<!ATTLIST reg-expr sqlserver (y|yes) #IMPLIED>
<!ATTLIST reg-expr mysql (y|yes) #IMPLIED>
<!ATTLIST reg-expr access (y|yes) #IMPLIED>
<!ATTLIST reg-expr universe (y|yes) #IMPLIED>
<!ATTLIST reg-expr cloudscape (y|yes) #IMPLIED>
 
 
 
<!ELEMENT cast (%text;|%sqlfunctions;)*>
<!-- rowid as type of column. In informix is integer, in Oracle varchar. -->
<!ATTLIST cast type (rowid|serial|serialref|serial8|serial8ref|smallint|int|int8|integer|smallfloat|float|decimal|boolean|char|nchar|varchar|lvarchar|date|datetime|interval|byte|text|clob|blob) #IMPLIED>
<!ATTLIST cast size CDATA #IMPLIED>
<!ATTLIST cast ids    (y|yes) #IMPLIED>
<!ATTLIST cast iwa    (y|yes) #IMPLIED>
<!ATTLIST cast db2i    (y|yes) #IMPLIED>
<!ATTLIST cast db2u    (y|yes) #IMPLIED>
<!ATTLIST cast oracle (y|yes) #IMPLIED>
<!ATTLIST cast postgres (y|yes) #IMPLIED>
<!ATTLIST cast sqlserver (y|yes) #IMPLIED>
<!ATTLIST cast mysql (y|yes) #IMPLIED>
<!ATTLIST cast access (y|yes) #IMPLIED>
<!ATTLIST cast universe (y|yes) #IMPLIED>
<!ATTLIST cast cloudscape (y|yes) #IMPLIED>
 
<!ELEMENT whitespace EMPTY>
 
<!-- ======================================= -->
<!-- ansifunctions                                                                  -->
<!-- ======================================= -->
 
<!-- =======================================
	<decode when='' cond='' then='' else='' />
	======================================== -->
 
<!ELEMENT decode (%text;)>
<!ATTLIST decode when CDATA #REQUIRED>
<!ATTLIST decode cond CDATA #REQUIRED>
<!ATTLIST decode then CDATA #REQUIRED>
<!ATTLIST decode else CDATA #REQUIRED>
 
<!-- ======================================= -->
<!-- datefunctions                                                                  -->
<!-- ======================================= -->
 
<!-- =======================================
 
  <mdy d='1' m='1' y='2004' />
  <mdy>
  	<d>1</d>
  	<m>1</m>
  	<y><year>$fecini</year></y>
  </mdy>
 
	======================================== -->
 
<!ELEMENT mdy (m|d|y)*>
<!ATTLIST mdy m CDATA #IMPLIED>
<!ATTLIST mdy d CDATA #IMPLIED>
<!ATTLIST mdy y CDATA #IMPLIED>
 
<!ELEMENT m (%text;|%datefunctions;|%textfunctions;)*>
<!ELEMENT d (%text;|%datefunctions;|%textfunctions;)*>
<!ELEMENT y (%text;|%datefunctions;|%textfunctions;)*>
 
<!-- =======================================
									IDS							DB2
  <year>$fecini</year>		<year>MDY(1,1,2004)</year> <year>DATE(01-01-2004)</year>
  <month>$fecini</month>
  <day>$fecini</day>
 
  <year><today /></year>
 
	======================================== -->
 
<!ELEMENT year   (%text;|%datefunctions;|%trigfunctions;)*>
<!ELEMENT month  (%text;|%datefunctions;|%trigfunctions;)*>
<!ELEMENT day    (%text;|%datefunctions;|%trigfunctions;)*>
<!ELEMENT hour   (%text;|%datefunctions;|%trigfunctions;)*>
<!ELEMENT minute (%text;|%datefunctions;|%trigfunctions;)*>
<!ELEMENT second (%text;|%datefunctions;|%trigfunctions;)*>
 
<!-- =======================================
	<date trunc='y' format='DD-MM-YYYY'></date>
 
	The trunc attribute is so that a DATE of a TIMESTAMP can be obtained in ORACLE. 
	For example, TRUNC (SYSDATE) returns a DATE field (SYSDATE is timestamp).
	The format attribute is to indicate the date format in oracle.
	======================================== -->
 
<!ELEMENT date (%text;|%datefunctions;|%trigfunctions;|nvl)*>
<!ATTLIST date trunc (yes|y) #IMPLIED>
<!ATTLIST date format CDATA #IMPLIED>
<!ATTLIST date ids    (y|yes) #IMPLIED>
<!ATTLIST date iwa    (y|yes) #IMPLIED>
<!ATTLIST date db2i    (y|yes) #IMPLIED>
<!ATTLIST date db2u    (y|yes) #IMPLIED>
<!ATTLIST date oracle (y|yes) #IMPLIED>
<!ATTLIST date postgres (y|yes) #IMPLIED>
<!ATTLIST date sqlserver (y|yes) #IMPLIED>
<!ATTLIST date mysql (y|yes) #IMPLIED>
<!ATTLIST date access (y|yes) #IMPLIED>
<!ATTLIST date universe (y|yes) #IMPLIED>
<!ATTLIST date cloudscape (y|yes) #IMPLIED>
 
 
<!-- =======================================
	<datetime value='00:00' idsformat='HOUR TO MINUTE' oraformat='HH24:MI' />
 
	Allows for example in an XUDP to set a value to a datetime
	(gpro_ordtimes_gen_postcon)
 
	The value can come by attribute value or by argument value.
 
	INFORMIX: DATETIME (00:00) HOUR TO MINUTE;
	ORACLE:   TO_TIMESTAMP ('00:00','HH24:MI');
	======================================== -->
 
<!ELEMENT datetime (value)?>
<!ATTLIST datetime value CDATA #IMPLIED>
<!ATTLIST datetime idsformat CDATA #REQUIRED>
<!ATTLIST datetime oraformat CDATA #IMPLIED>
<!ATTLIST datetime pgsformat CDATA #IMPLIED>
<!ATTLIST datetime db2format CDATA #IMPLIED>
 
 
<!-- =======================================
	<today />
	<today value='year|month|day' />
 
	<current />
	======================================== -->
 
<!ELEMENT today EMPTY>
<!ATTLIST today value (year|month|day) #IMPLIED>
 
<!ELEMENT current EMPTY>
<!ATTLIST current from CDATA #IMPLIED>
<!ATTLIST current to CDATA #IMPLIED>
 
<!-- =======================================
 
	<eval-date d='' m='' y=''>$fecini</eval-date>
 
	<eval-date>
		<val unit='d'><day>$FECFIN</day></val>
		<val unit='m'>4</val>
		<val unit='y'><year></val>
		<val unit='date'>$FECINI</val>
	</eval-date>
 
	======================================== -->
 
<!ELEMENT eval-date (%text;|%datefunctions;|%trigfunctions;|val)*>
<!ATTLIST eval-date d CDATA #IMPLIED>
<!ATTLIST eval-date m CDATA #IMPLIED>
<!ATTLIST eval-date y CDATA #IMPLIED>
 
<!ELEMENT val (%text;|%textfunctions;|%datefunctions;|%trigfunctions;)*>
<!ATTLIST val unit (y|m|d|h|min|s|date|datetime) #REQUIRED>
 
<!-- =======================================
 
	 <eval-datetime m='m_timemaq'>m_horini</eval-datetime>
 
	<eval-datetime>
		<val unit='d'><day>$FECFIN</day></val>
		<val unit='m'>4</val>
		<val unit='y'><year></val>
		<val unit='h'><year></val>
		<val unit='min'><year></val>
		<val unit='s'><year></val>
		<val unit='date'>$FECINI</val>
	</eval-datetime>
 
	======================================== -->
 
<!ELEMENT eval-datetime (%text;|%datefunctions;|%trigfunctions;|val)*>
<!ATTLIST eval-datetime y   CDATA #IMPLIED>
<!ATTLIST eval-datetime m   CDATA #IMPLIED>
<!ATTLIST eval-datetime d   CDATA #IMPLIED>
<!ATTLIST eval-datetime h   CDATA #IMPLIED>
<!ATTLIST eval-datetime min CDATA #IMPLIED>
<!ATTLIST eval-datetime s   CDATA #IMPLIED>
 
<!-- =======================================
 
	 <sub-dates>
	 	<datefrom>date_created</datefrom>
	 	<dateto><current/></dateto>
	 </sub-dates>
 
	======================================== -->
 
<!ELEMENT sub-dates (datefrom|dateto)*>
 
<!ATTLIST sub-dates datefrom CDATA #IMPLIED>
<!ATTLIST sub-dates dateto CDATA #IMPLIED>
 
<!ELEMENT datefrom (%text;|%datefunctions;|%textfunctions;)*>
<!ELEMENT dateto (%text;|%datefunctions;|%textfunctions;)*>
 
<!-- =======================================
 
	<extend> ...
 
	======================================== -->
 
<!ELEMENT extend (%text;|%datefunctions;|%trigfunctions;)*>
<!ATTLIST extend from CDATA #REQUIRED>
<!ATTLIST extend to CDATA #REQUIRED>
 
<!-- =======================================
 
	<days> ...
 
	En DB2
	SELECT DATE('2004-01-01') - DATE('2003-12-01') No retorna los dias entre las
	dos fechas, hay que utilizar la funcion DAYS
	SELECT DAYS(DATE('2004-01-01')) - DAYS(DATE('2003-12-01'))
 
	<days datefrom='$fecini' dateto='$fecfin' />
 
	o be
 
	<days>
		<datefrom>$fecini</datefrom>
		<dateto><today/></dateto>      To be able to transform what may be here.
	</days>
 
	o be
 
	<days datefrom='$fecini'>
		<dateto><today/></dateto>      To be able to transform what may be here.
	</days>
 
	o be
 
	<days dateto='$fecini'>
		<datefrom><today/></datefrom>  To be able to transform what may be here.
	</days>
 
	======================================== -->
 
<!ELEMENT days (datefrom|dateto)*>
 
<!ATTLIST days datefrom CDATA #IMPLIED>
<!ATTLIST days dateto CDATA #IMPLIED>
 
<!-- =======================================
 
	<seconds> ... seconds between two dates
 
	<seconds datefrom='$fecini' dateto='$fecfin' />
 
	o be
 
	<seconds>
		<datefrom>$fecini</datefrom>
		<dateto><today/></dateto>      To be able to transform what may be here.
	</seconds>
 
	o be
 
	<seconds datefrom='$fecini'>
		<dateto><today/></dateto>      To be able to transform what may be here.
	</seconds>
 
	o be
 
	<seconds dateto='$fecini'>
		<datefrom><today/></datefrom>  To be able to transform what may be here.
	</seconds>
 
	======================================== -->
 
<!ELEMENT seconds (datefrom|dateto)*>
 
<!ATTLIST seconds datefrom CDATA #IMPLIED>
<!ATTLIST seconds dateto CDATA #IMPLIED>
 
<!-- =======================================
	<seconds-todsinterval>2225412.0</seconds-todsinterval>
	======================================== -->
<!ELEMENT seconds-todsinterval (%text;|%datefunctions;|%trigfunctions;)*>
 
<!-- =======================================
	<weekday><today/></weekday>
	======================================== -->
<!ELEMENT weekday (%text;|%datefunctions;|%trigfunctions;)*>
 
<!-- =======================================
	<lastday><today/></lastday>
	======================================== -->
<!ELEMENT lastday (%text;|%datefunctions;|%trigfunctions;)*>
 
<!-- ================================
	trigfunctions
 
	 <prv>apteid</prv>
	 <nxt>apteid</nxt>
     ================================ -->
<!ELEMENT prv (%text;)>
<!ELEMENT nxt (%text;)>
 
 
<!-- ================================
     <deferred-constraint name='' [ids|oracle|db2i|db2u|postgres|mysql] />
     Ex:
     <deferred-constraint name='ALL' />
     <deferred-constraint name='f_gcompedh_1' />
 
     ids								oracle
     ...								......
     SET CONSTRAINTS ALL DEFERRED		SET CONSTRAINT ALL DEFERRED
     ================================ -->
<!ELEMENT deferred-constraint (%text;|%sqlfunctions;)*>
<!ATTLIST deferred-constraint name  CDATA #IMPLIED>
<!ATTLIST deferred-constraint ids      (y|yes) #IMPLIED>
<!ATTLIST deferred-constraint iwa      (y|yes) #IMPLIED>
<!ATTLIST deferred-constraint db2i     (y|yes) #IMPLIED>
<!ATTLIST deferred-constraint db2u     (y|yes) #IMPLIED>
<!ATTLIST deferred-constraint oracle   (y|yes) #IMPLIED>
<!ATTLIST deferred-constraint postgres (y|yes) #IMPLIED>
<!ATTLIST deferred-constraint sqlserver (y|yes) #IMPLIED>
<!ATTLIST deferred-constraint mysql    (y|yes) #IMPLIED>
<!ATTLIST deferred-constraint access    (y|yes) #IMPLIED>
<!ATTLIST deferred-constraint universe    (y|yes) #IMPLIED>
<!ATTLIST deferred-constraint cloudscape    (y|yes) #IMPLIED>
 
 
 
 
 
 
<!-- ======================================== -->
<!-- GEOMETRY    																	  -->
<!-- ======================================== -->
 
 
 
<!-- ======================================== -->
<!-- GEOMETRY CONSTRUCTORS                                                            -->
<!-- geo.fromText                                                                     -->
<!-- geo.point2D                                                                      -->
<!-- geo.line                                                                         -->
<!-- geo.polygon                                                                      -->
<!-- ======================================== -->
<!ELEMENT geo.fromText (coords,srid)>
<!ATTLIST geo.fromText type CDATA #REQUIRED>
<!ELEMENT coords       (%text;|%sqlfunctions;)*>
<!ELEMENT srid         (%text;|%sqlfunctions;)*>
 
<!ELEMENT geo.point2D (coords,srid)>
<!ELEMENT geo.line    (coords,srid)>
<!ELEMENT geo.polygon (coords,srid)>
 
<!-- ======================================== -->
<!-- GEOMETRY ACCESSORS                                                               -->
<!--                                                                                  -->
<!-- geo.getType                                                                      -->
<!-- geo.getX                                                                         -->
<!-- geo.getY                                                                         -->
<!-- geo.getZ                                                                         -->
<!-- geo.getEnvelope                                                                  -->
<!-- geo.isValid                                                                      -->
<!-- geo.getCoordDim                                                                  -->
<!-- geo.getDim                                                                       -->
<!-- geo.getSRID                                                                      -->
<!-- geo.getNumVertices                                                               -->
<!-- ======================================== -->
 
<!ELEMENT geo.getType     (%text;|%sqlfunctions;)*>
<!ELEMENT geo.getX        (%text;|%sqlfunctions;)*>
<!ELEMENT geo.getY        (%text;|%sqlfunctions;)*>
<!ELEMENT geo.getZ        (%text;|%sqlfunctions;)*>
<!ELEMENT geo.getEnvelope (%text;|%sqlfunctions;)*>
 
<!ELEMENT geo.isValid     (%text;|%sqlfunctions;)*>
<!ATTLIST geo.isValid     ora_iswkt  CDATA #IMPLIED>
 
<!ELEMENT geo.getCoordDim (%text;|%sqlfunctions;)*>
<!ELEMENT geo.getDim      (%text;|%sqlfunctions;)*>
<!ELEMENT geo.getSRID     (%text;|%sqlfunctions;)*>
<!ELEMENT geo.getNumVertices (%text;|%sqlfunctions;)*>
 
<!-- ======================================= -->
<!--  GEOMETRY OUTPUTS                                                              -->
<!--  geo.asKml                                                                     -->
<!--  geo.asGml                                                                     -->
<!--  geo.asWkt                                                                     -->
<!--  geo.asWkb                                                                     -->
<!--  geo.asSVG                                                                     -->
<!--  geo.asGeoJSON                                                                 -->
<!-- ======================================= -->
<!ELEMENT geo.asKml       (%text;|%sqlfunctions;)*>
<!ELEMENT geo.asGml       (%text;|%sqlfunctions;)*>
<!ELEMENT geo.asWkt       (%text;|%sqlfunctions;)*>
<!ELEMENT geo.asWkb       (%text;|%sqlfunctions;)*>
<!ELEMENT geo.asSVG       (%text;|%sqlfunctions;)*>
<!ELEMENT geo.asGeoJSON   (%text;|%sqlfunctions;)*>
 
 
<!-- ======================================== -->
<!-- GEOMETRY EDITORS                                                                -->
<!--                                                                                 -->
<!--    geo.transform                                                                -->
<!--    geo.reverseLine                                                              -->
<!-- ======================================== -->
<!ELEMENT geo.transform (geom,srid?)>
<!ATTLIST geo.transform  srid CDATA #IMPLIED>
 
<!ELEMENT geo.reverseLine  (%text;|%sqlfunctions;)*>
 
<!-- ======================================== -->
<!-- SPATIAL MEASUREMENTS                                                            -->
<!--                                                                                 -->
<!--    geo.area                                                                     -->
<!--    geo.distanceCartesian                                                        -->
<!--    geo.distanceSphere                                                           -->
<!--    geo.distanceSpheroid                                                         -->
<!--    geo.length                                                                   -->
<!--    geo.lengthSpheroid                                                           -->
<!--    geo.perimeter                                                                -->
<!--    geo.centroid                                                                 -->
<!--    geo.withinDist                                                               -->
<!--                                                                                 -->
<!---   geom                                                                         -->
<!---   geom1                                                                        -->
<!--    geom2                                                                        -->
<!--    spheroid                                                                     -->
<!--    dist                                                                         -->
<!-- ======================================== -->
<!ELEMENT geom      (%text;|%sqlfunctions;)*>
<!ELEMENT geom1     (%text;|%sqlfunctions;)*>
<!ELEMENT geom2     (%text;|%sqlfunctions;)*>
<!ELEMENT spheroid  (%text;|%sqlfunctions;)*>
<!ELEMENT dist      (%text;|%sqlfunctions;)*>
 
 
 
<!ELEMENT geo.perimeter (%text;|%sqlfunctions;)*>
<!ATTLIST geo.perimeter pg_dim  CDATA #IMPLIED>
<!ATTLIST geo.perimeter ora_tol  CDATA #IMPLIED>
<!ATTLIST geo.perimeter ora_unit CDATA #IMPLIED>
 
<!ELEMENT geo.area (%text;|%sqlfunctions;)*>
<!ATTLIST geo.area ora_tol  CDATA #IMPLIED>
<!ATTLIST geo.area ora_unit CDATA #IMPLIED>
 
<!ELEMENT geo.distanceCartesian (geom1,geom2)>
<!ATTLIST geo.distanceCartesian ora_tol  CDATA #IMPLIED>
<!ATTLIST geo.distanceCartesian ora_unit CDATA #IMPLIED>
 
<!ELEMENT geo.distanceSphere (geom1,geom2)>
<!ATTLIST geo.distanceSphere ora_tol  CDATA #IMPLIED>
<!ATTLIST geo.distanceSphere ora_unit CDATA #IMPLIED>
 
<!ELEMENT geo.distanceSpheroid (geom1,geom2,spheroid)>
<!ATTLIST geo.distanceSpheroid ora_tol  CDATA #IMPLIED>
<!ATTLIST geo.distanceSpheroid ora_unit CDATA #IMPLIED>
 
 
<!ELEMENT geo.length (%text;|%sqlfunctions;)*>
<!ATTLIST geo.length ora_tol  CDATA #IMPLIED>
<!ATTLIST geo.length ora_unit CDATA #IMPLIED>
 
 
<!ELEMENT geo.lengthSpheroid (geom1|spheroid)>
<!ATTLIST geo.lengthSpheroid ora_tol  CDATA #IMPLIED>
<!ATTLIST geo.lengthSpheroid ora_unit CDATA #IMPLIED>
 
 
<!ELEMENT geo.centroid (%text;|%sqlfunctions;)*>
<!ATTLIST geo.centroid ora_tol  CDATA #IMPLIED>
 
<!ELEMENT geo.withinDist (geom1,geom2,dist)>
<!ATTLIST geo.withinDist ora_tol  CDATA #IMPLIED>
<!ATTLIST geo.withinDist ora_unit CDATA #IMPLIED>
<!ATTLIST geo.withinDist ora_operator (y|yes) #IMPLIED>
 
 
<!-- ====================================== -->
<!-- SPATIAL RELATIONSHIPS                                                        -->
<!--                                                                              -->
<!--   geo.equals                                                                 -->
<!--   geo.touches                                                                -->
<!--   geo.overlaps                                                               -->
<!--   geo.covers                                                                 -->
<!--   geo.coveredBy                                                              -->
<!--   geo.contains                                                               -->
<!--   geo.within                                                                 -->
<!--   geo.disjoint                                                               -->
<!--   geo.intersects                                                             -->
<!-- ====================================== -->
<!ELEMENT geo.equals            (geom1,geom2)>
<!ELEMENT geo.touches           (geom1,geom2)>
<!ELEMENT geo.overlaps          (geom1,geom2)>
<!ELEMENT geo.covers            (geom1,geom2)>
<!ELEMENT geo.coveredBy         (geom1,geom2)>
<!ELEMENT geo.contains          (geom1,geom2)>
<!ELEMENT geo.within            (geom1,geom2)>
<!ELEMENT geo.disjoint          (geom1,geom2)>
<!ELEMENT geo.intersects        (geom1,geom2)>
 
 
 
<!-- ====================================== -->
<!-- Geometry Processing Functions                                                -->
<!--                                                                              -->
<!--    geo.intersection                                                          -->
<!--    geo.buffer                                                                -->
<!--    geo.simplify                                                              -->
<!--    geo.convexHull                                                            -->
<!--    geo.difference                                                            -->
<!--    geo.symDifference                                                         -->
<!-- ====================================== -->
<!ELEMENT geo.intersection (geom1,geom2)>
<!ATTLIST geo.intersection ora_tol  CDATA #IMPLIED>
 
<!ELEMENT geo.buffer (geom1,dist)>
<!ATTLIST geo.buffer pg_seg   CDATA #IMPLIED>
<!ATTLIST geo.buffer ora_tol  CDATA #IMPLIED>
<!ATTLIST geo.buffer sql_tol  CDATA #IMPLIED>
<!ATTLIST geo.buffer sql_rel  (0|1) #IMPLIED>
<!ATTLIST geo.buffer seg  CDATA #IMPLIED>
<!ATTLIST geo.buffer arcora_tol  CDATA #IMPLIED>
 
<!ELEMENT geo.simplify (%text;|%sqlfunctions;)*>
<!ATTLIST geo.simplify ora_tol  CDATA #IMPLIED>
<!ATTLIST geo.simplify threshold  CDATA #IMPLIED>
<!ATTLIST geo.simplify pg_preserve  (y|yes)  #IMPLIED>
 
<!ELEMENT geo.convexHull (%text;|%sqlfunctions;)*>
<!ATTLIST geo.convexHull ora_tol  CDATA #IMPLIED>
 
<!ELEMENT geo.difference (geom1,geom2)>
<!ATTLIST geo.difference ora_tol  CDATA #IMPLIED>
 
<!ELEMENT geo.symDifference (geom1,geom2)>
<!ATTLIST geo.symDifference ora_tol  CDATA #IMPLIED>
 
 
<!-- ===================================== -->
<!-- GEO AGGREGATES.                                                            -->
<!--                                                                            -->
<!--    geo.aggrUnion                                                           -->
<!--    geo.aggrMbr                                                             -->
<!--    geo.aggrConvexHull                                                      -->
<!-- ===================================== -->
<!ELEMENT geo.aggrUnion (%text;|%sqlfunctions;)*>
<!ATTLIST geo.aggrUnion isline   (y|yes) #IMPLIED>
<!ATTLIST geo.aggrUnion pg_collect   (y|yes) #IMPLIED>
 
<!ELEMENT geo.aggrMbr (%text;|%sqlfunctions;)*>
 
 
<!ELEMENT geo.aggrConvexHull (%text;|%sqlfunctions;)*>
 
 
<!-- ================================ -->
<!-- End of DTD -->
<!-- ================================ -->
   

5 Execute-procedure

It allows to execute a procedure stored in the database.

<execute-procedure name='name'>
    <in> ?
        <param /> +
    </in>
    <out var='var' /> +
</execute-procedure>
Example

XML

Copy
<execute-procedure name='sdm_raise_msg'>
    <in>
        <param>0</param>
        <param>'Do not delete finished operations if the order is not launched'</param>
    </in>
</execute-procedure>