|
Modified: ofbiz/site/dtds/simple-methods-v2.xsd URL: http://svn.apache.org/viewvc/ofbiz/site/dtds/simple-methods-v2.xsd?rev=1340366&r1=1340365&r2=1340366&view=diff ============================================================================== --- ofbiz/site/dtds/simple-methods-v2.xsd (original) +++ ofbiz/site/dtds/simple-methods-v2.xsd Sat May 19 07:37:53 2012 @@ -73,10 +73,34 @@ under the License. </xs:simpleType> </xs:attribute> + <xs:attribute type="xs:string" name="error-list-name"> + <xs:annotation> + <xs:documentation> + The name of the error message list. It will be created if it does not exist. + Defaults to "error_list". + <br/><br/> + Optional. Attribute type: constant + </xs:documentation> + </xs:annotation> + </xs:attribute> + <xs:attributeGroup name="attlist.propertyInfoOptional"> <xs:attribute type="xs:string" name="resource"/> <xs:attribute type="xs:string" name="property"/> </xs:attributeGroup> + + <xs:attributeGroup name="attlist.optionalJavaType"> + <xs:attribute type="xs:string" name="type"> + <xs:annotation> + <xs:documentation> + The Java data type. The source object will be converted to this type. + <br/><br/> + Optional. Attribute type: constant. Attribute must contain a valid Java class name. + </xs:documentation> + </xs:annotation> + </xs:attribute> + </xs:attributeGroup> + <xs:attributeGroup name="attlist.typeDefaultString"> <xs:attribute name="type" default="String"> <xs:simpleType> @@ -97,22 +121,91 @@ under the License. </xs:simpleType> </xs:attribute> </xs:attributeGroup> + <xs:attributeGroup name="attlist.operatorRequired"> <xs:attribute name="operator" use="required"> + <xs:annotation> + <xs:documentation> + The comparison operator. The operator describes the l-value compared to the r-value. + <br/><br/> + The "contains" operator returns true if the l-value contains the r-value. + This operator does not perform type conversions. + The l-value must be a collection type or a String. A null l-value returns false. + <br/><br/> + Required. Attribute type: constant. + </xs:documentation> + </xs:annotation> <xs:simpleType> <xs:restriction base="xs:token"> + <xs:enumeration value="equals"/> + <xs:enumeration value="not-equals"/> <xs:enumeration value="less"/> - <xs:enumeration value="greater"/> <xs:enumeration value="less-equals"/> + <xs:enumeration value="greater"/> <xs:enumeration value="greater-equals"/> + <xs:enumeration value="contains"/> + </xs:restriction> + </xs:simpleType> + </xs:attribute> + </xs:attributeGroup> + + <xs:attributeGroup name="attlist.operatorOptionalRvalue"> + <xs:attribute name="operator" use="required"> + <xs:annotation> + <xs:documentation> + The comparison operator. The operator describes the l-value compared to the r-value. + <br/><br/> + The "contains" operator returns true if the l-value contains the r-value. + This operator does not perform type conversions - the "type" attribute will be ignored. + The l-value must be a collection type or a String. A null l-value evaluates to false. + <br/><br/> + The "is-null", "is-not-null", and "is-empty" operators + do not require an r-value. Any r-values will be ignored. + <br/><br/> + Required. Attribute type: constant. + </xs:documentation> + </xs:annotation> + <xs:simpleType> + <xs:restriction base="xs:token"> <xs:enumeration value="equals"/> <xs:enumeration value="not-equals"/> + <xs:enumeration value="less"/> + <xs:enumeration value="less-equals"/> + <xs:enumeration value="greater"/> + <xs:enumeration value="greater-equals"/> <xs:enumeration value="contains"/> + <xs:enumeration value="is-null"/> + <xs:enumeration value="is-not-null"/> + <xs:enumeration value="is-empty"/> </xs:restriction> </xs:simpleType> </xs:attribute> </xs:attributeGroup> + <xs:attribute name="level"> + <xs:annotation> + <xs:documentation> + The logging/debug level to use. + Must be one of the following: verbose | timing | info | important | warning | error | fatal | always. + Defaults to "info". + <br/><br/> + Required. Attribute type: constant. + </xs:documentation> + </xs:annotation> + <xs:simpleType> + <xs:restriction base="xs:token"> + <xs:enumeration value="info" /> + <xs:enumeration value="verbose" /> + <xs:enumeration value="timing" /> + <xs:enumeration value="important" /> + <xs:enumeration value="warning" /> + <xs:enumeration value="error" /> + <xs:enumeration value="fatal" /> + <xs:enumeration value="always" /> + </xs:restriction> + </xs:simpleType> + </xs:attribute> + <!-- ELEMENTS start here --> <xs:element name="field"> <xs:annotation> @@ -231,7 +324,7 @@ under the License. <xs:attribute type="xs:string" name="default-error-code"> <xs:annotation> <xs:documentation> - The default error return code. Defauts to "error". + The default error return code. Defaults to "error". <br/><br/> Optional. Attribute type: constant. </xs:documentation> @@ -240,20 +333,7 @@ under the License. <xs:attribute type="xs:string" name="default-success-code"> <xs:annotation> <xs:documentation> - The default success return code. Defauts to "success". - <br/><br/> - Optional. Attribute type: constant. - </xs:documentation> - </xs:annotation> - </xs:attribute> - <xs:attribute type="xs:string" name="parameter-map-name"> - <xs:annotation> - <xs:documentation> - The name of the field containing the parameters map. Defaults to "parameters". - <br/><br/> - When the simple method is invoked as an event, the parameters map contains the request parameters. - When the simple method is invoked as a service, the parameters map contains the service IN attributes. - The parameters map should not be modified, but modification is permitted for backward compatibility. + The default success return code. Defaults to "success". <br/><br/> Optional. Attribute type: constant. </xs:documentation> @@ -380,293 +460,245 @@ under the License. </xs:documentation> </xs:annotation> </xs:attribute> - <xs:attribute type="xs:string" name="locale-name"> + </xs:complexType> + </xs:element> + <xs:element name="call-map-processor" substitutionGroup="CallOperations"> + <xs:annotation> + <xs:documentation> + The call-map-processor tag invokes a simple map processor from an existing map, creating a new map or adding to an existing one + if the named out-map already exists. Resulting messages are added to the named list, and a new list is created if a list with + the given name does not yet exist. All lists and maps exist in the same context and must have unique names. + <br/><br/> + An inline simple-map-processor can be used by putting a simple-map-processor tag under the call-map-processor tag. + If both an external and an inline map-processor are specified, the external + one will be called first, allowing the inline one to override its behavior. + </xs:documentation> + </xs:annotation> + <xs:complexType> + <xs:sequence> + <xs:element minOccurs="0" ref="simple-map-processor" /> + </xs:sequence> + <xs:attribute type="xs:string" name="processor-name"> <xs:annotation> <xs:documentation> - The name of the field containing the java.util.Locale object. Defaults to "locale". + The name of the external map processor to execute in the specified xml-resource. + This is only required if an external map processor is desired. <br/><br/> Optional. Attribute type: constant. </xs:documentation> </xs:annotation> </xs:attribute> - <xs:attribute type="xs:string" name="delegator-name"> + <xs:attribute type="xs:string" name="xml-resource"> <xs:annotation> <xs:documentation> - The name of the field containing the org.ofbiz.entity.Delegator object. Defaults to "delegator". + The full path and filename on the classpath of the XML file which contains an external map processor to execute. + This is only required if an external map processor is desired. <br/><br/> Optional. Attribute type: constant. </xs:documentation> </xs:annotation> </xs:attribute> - <xs:attribute type="xs:string" name="security-name"> + <xs:attribute type="xs:string" name="in-map-name" use="required"> <xs:annotation> <xs:documentation> - The name of the field containing the org.ofbiz.security.Security object. Defaults to "security". + The name of a map in the method environment to use as the input map. <br/><br/> - Optional. Attribute type: constant. + Required. Attribute type: expression. </xs:documentation> </xs:annotation> </xs:attribute> - <xs:attribute type="xs:string" name="dispatcher-name"> + <xs:attribute type="xs:string" name="out-map-name" use="required"> <xs:annotation> <xs:documentation> - The name of the field containing the org.ofbiz.service.LocalDispatcher object. Defaults to "dispatcher". + The name of a map in the method environment to use as the output map. + Will be created if it does not exist already. + If already exists will be added to in place. <br/><br/> - Optional. Attribute type: constant. + Required. Attribute type: expression. </xs:documentation> </xs:annotation> </xs:attribute> - <xs:attribute type="xs:string" name="user-login-name"> + <xs:attribute ref="error-list-name" /> + </xs:complexType> + </xs:element> + <xs:element name="set-service-fields" substitutionGroup="CallOperations"> + <xs:annotation> + <xs:documentation> + Copies elements from a source map that match a service's IN attributes to a target map. + If the target map does not exist, one will be created. + </xs:documentation> + </xs:annotation> + <xs:complexType> + <xs:attribute type="xs:string" name="service-name" use="required"> <xs:annotation> <xs:documentation> - The name of the field containing the UserLogin GenericValue. Defaults to "userLogin". + The name of the service to get the IN attributes from. <br/><br/> - Optional. Attribute type: constant. + Required. Attribute type: constant+expr. + </xs:documentation> + </xs:annotation> + </xs:attribute> + <xs:attribute type="xs:string" name="map" use="required"> + <xs:annotation> + <xs:documentation> + The map to copy the matching IN attributes from. + <br/><br/> + Required. Attribute type: expression. + </xs:documentation> + </xs:annotation> + </xs:attribute> + <xs:attribute type="xs:string" name="to-map" use="required"> + <xs:annotation> + <xs:documentation> + The map to copy the matching IN attributes to. + If the map does not exist, one will be created. + <br/><br/> + Required. Attribute type: expression. </xs:documentation> </xs:annotation> </xs:attribute> </xs:complexType> </xs:element> - <xs:element name="call-map-processor" substitutionGroup="CallOperations"> + <xs:element name="call-service" substitutionGroup="CallOperations"> <xs:annotation> <xs:documentation> - The call-map-processor tag invokes a simple map processor from an existing map, creating a new map or adding to an existing one - if the named out-map already exists. Resulting messages are added to the named list, and a new list is created if a list with - the given name does not yet exist. Note that all lists and maps exist in the same context and must have unique names. - - An inline simple-map-processor can be used by putting a simple-map-processor tag under the call-map-processor tag. - - If both an external and an inline map-processor are specified, the external - one will be called first, allowing the inline one to override its behavior. + Invokes a service through the Service Engine. </xs:documentation> </xs:annotation> <xs:complexType> <xs:sequence> - <xs:element minOccurs="0" ref="simple-map-processor"> + <xs:element minOccurs="0" ref="error-prefix" /> + <xs:element minOccurs="0" ref="error-suffix" /> + <xs:element minOccurs="0" ref="success-prefix" /> + <xs:element minOccurs="0" ref="success-suffix" /> + <xs:element minOccurs="0" ref="message-prefix" /> + <xs:element minOccurs="0" ref="message-suffix" /> + <xs:element minOccurs="0" ref="default-message" /> + <xs:choice minOccurs="0" maxOccurs="unbounded"> + <xs:element ref="results-to-map" /> + <xs:element ref="result-to-field" /> + <xs:element ref="result-to-request" /> + <xs:element ref="result-to-session" /> + <xs:element ref="result-to-result" /> + </xs:choice> + </xs:sequence> + <xs:attribute type="xs:string" name="service-name" use="required"> + <xs:annotation> + <xs:documentation> + Name of the service to call. + <br/><br/> + Required. Attribute type: constant, expression. + </xs:documentation> + </xs:annotation> + </xs:attribute> + <xs:attribute type="xs:string" name="in-map-name"> + <xs:annotation> + <xs:documentation> + A map in the method environment to use as the input map. + If you're not going to pass any parameters to the service than you can just + omit the in-map attribute, although typically in a service element you will see + the in-map-name attribute included. + <br/><br/> + Optional. Attribute type: expression. + </xs:documentation> + </xs:annotation> + </xs:attribute> + <xs:attribute name="include-user-login"> + <xs:annotation> + <xs:documentation> + Include the current UserLogin GenericValue in the called service IN attributes. + Defaults to "true". + <br/><br/> + Optional. Attribute type: constant. + </xs:documentation> + </xs:annotation> + <xs:simpleType> <xs:annotation> - <xs:documentation> - Uses the same definition as the simple-map-processor in the context of a simple-map-processors XML file. - Allows for an inlined simple-map-processor. - </xs:documentation> </xs:annotation> - </xs:element> - </xs:sequence> - <xs:attributeGroup ref="attlist.call-map-processor"/> + <xs:restriction base="xs:token"> + <xs:enumeration value="true" /> + <xs:enumeration value="false" /> + </xs:restriction> + </xs:simpleType> + </xs:attribute> + <xs:attribute name="break-on-error"> + <xs:annotation> + <xs:documentation> + Halt script execution if the called service returns an error. + Defaults to "true". + <br/><br/> + Optional. Attribute type: constant. + </xs:documentation> + </xs:annotation> + <xs:simpleType> + <xs:restriction base="xs:token"> + <xs:enumeration value="true" /> + <xs:enumeration value="false" /> + </xs:restriction> + </xs:simpleType> + </xs:attribute> + <xs:attribute type="xs:string" name="error-code"> + <xs:annotation> + <xs:documentation> + The error code returned by the called service. The error code is copied to the script result. + Defaults to the enclosing simple-method "default-error-code" attribute value. + <br/><br/> + Optional. Attribute type: constant. + </xs:documentation> + </xs:annotation> + </xs:attribute> + <xs:attribute type="xs:string" name="success-code"> + <xs:annotation> + <xs:documentation> + The success code returned by the called service. The success code is copied to the script result. + Defaults to the enclosing simple-method "default-success-code" attribute value. + <br/><br/> + Optional. Attribute type: constant. + </xs:documentation> + </xs:annotation> + </xs:attribute> + <xs:attribute name="require-new-transaction"> + <xs:annotation> + <xs:documentation> + Require a new transaction for the called service. + Defaults to "false". + <br/><br/> + Optional. Attribute type: constant. + </xs:documentation> + </xs:annotation> + <xs:simpleType> + <xs:restriction base="xs:token"> + <xs:enumeration value="true" /> + <xs:enumeration value="false" /> + </xs:restriction> + </xs:simpleType> + </xs:attribute> + <xs:attribute type="xs:string" name="transaction-timeout"> + <xs:annotation> + <xs:documentation> + The timeout for the new transaction, in seconds. + Defaults to the value set in the service definition. + <br/><br/> + Optional. Attribute type: constant. + </xs:documentation> + </xs:annotation> + </xs:attribute> </xs:complexType> </xs:element> - <xs:attributeGroup name="attlist.call-map-processor"> - <xs:attribute type="xs:string" name="xml-resource"> - <xs:annotation> - <xs:documentation> - The full path and filename on the classpath of the XML file which contains an external map processor to execute. - This is only required if an external map processor is desired. - </xs:documentation> - </xs:annotation> - </xs:attribute> - <xs:attribute type="xs:string" name="processor-name"> - <xs:annotation> - <xs:documentation> - The name of the external map processor to execute in the specified xml-resource. - This is only required if an external map processor is desired. - </xs:documentation> - </xs:annotation> - </xs:attribute> - <xs:attribute type="xs:string" name="in-map-name" use="required"> - <xs:annotation> - <xs:documentation> - The name of a map in the method environment to use as the input map. - </xs:documentation> - </xs:annotation> - </xs:attribute> - <xs:attribute type="xs:string" name="out-map-name" use="required"> - <xs:annotation> - <xs:documentation> - The name of a map in the method environment to use as the output map. - Will be created if it does not exist already. - If already exists will be added to in place. - </xs:documentation> - </xs:annotation> - </xs:attribute> - <xs:attribute type="xs:string" name="error-list-name" default="error_list"> - <xs:annotation> - <xs:documentation> - The name of a list in the method environment that the error messages will be added to. - Will be created if it does not exist. - Defaults to "error_list". - </xs:documentation> - </xs:annotation> - </xs:attribute> - </xs:attributeGroup> - <xs:element name="set-service-fields" substitutionGroup="CallOperations"> + <xs:element name="error-prefix"> <xs:annotation> <xs:documentation> - Take all the incoming files for this service, or all the incoming service attributes, - and look for fields with the same name in the incoming map and copy those onto the outgoing map. + Specify a resource and a property to prepend to the error message. </xs:documentation> </xs:annotation> - <xs:complexType> - <xs:attributeGroup ref="attlist.set-service-fields"/> + <xs:complexType mixed="true"> + <xs:attributeGroup ref="attlist.propertyInfoOptional"/> </xs:complexType> </xs:element> - <xs:attributeGroup name="attlist.set-service-fields"> - <xs:attribute type="xs:string" name="service-name" use="required"> - <xs:annotation><xs:documentation>Name of the service to get all the incoming attributes (parameters) from.</xs:documentation></xs:annotation> - </xs:attribute> - <xs:attribute type="xs:string" name="map" use="required"> - <xs:annotation><xs:documentation>Incoming map to copy fields from.</xs:documentation></xs:annotation> - </xs:attribute> - <xs:attribute type="xs:string" name="to-map" use="required"> - <xs:annotation><xs:documentation>Map to copy to fields to.</xs:documentation></xs:annotation> - </xs:attribute> - <xs:attribute type="xs:string" name="error-list-name" default="error_list"> - <xs:annotation> - <xs:documentation> - The name of a list in the method environment that the error messages will be added to. - Will be created if it does not exist. - Defaults to "error_list". - </xs:documentation> - </xs:annotation> - </xs:attribute> - </xs:attributeGroup> - <xs:element name="call-service" substitutionGroup="CallOperations"> + <xs:element name="error-suffix"> <xs:annotation> <xs:documentation> - The call-service tag invokes a service through the Service Engine. - If the specified error code is returned from the service, - the event is aborted and the transaction in the current thread is rolled back. - Otherwise, the remaining operations are invoked. - - The result-to-request and result-to-session elements will be IGNORED when - called in a service context. So, they are ONLY used when called in an event context. - </xs:documentation> - </xs:annotation> - <xs:complexType> - <xs:sequence> - <xs:element minOccurs="0" ref="error-prefix"/> - <xs:element minOccurs="0" ref="error-suffix"/> - <xs:element minOccurs="0" ref="success-prefix"/> - <xs:element minOccurs="0" ref="success-suffix"/> - <xs:element minOccurs="0" ref="message-prefix"/> - <xs:element minOccurs="0" ref="message-suffix"/> - <xs:element minOccurs="0" ref="default-message"/> - <xs:choice minOccurs="0" maxOccurs="unbounded"> - <xs:element ref="results-to-map"/> - <xs:element ref="result-to-field"/> - <xs:element ref="result-to-request"/> - <xs:element ref="result-to-session"/> - <xs:element ref="result-to-result"/> - </xs:choice> - </xs:sequence> - <xs:attributeGroup ref="attlist.call-service"/> - </xs:complexType> - </xs:element> - <xs:attributeGroup name="attlist.call-service"> - <xs:attribute type="xs:string" name="service-name" use="required"> - <xs:annotation> - <xs:documentation> - Name of the service to call. - </xs:documentation> - </xs:annotation> - </xs:attribute> - <xs:attribute type="xs:string" name="in-map-name"> - <xs:annotation> - <xs:documentation> - Optional name of a map in the method environment to use as the input map. - If you're not going to pass any parameters to the service than you can just - leave off the in-map name, although typically in a service tag you will see - a service-name and the in-mapname passed in. - </xs:documentation> - </xs:annotation> - </xs:attribute> - <xs:attribute name="include-user-login" default="true"> - <xs:annotation> - <xs:documentation> - Include-user-login by default will include the user login - so if there is a user login for the current simple-method - it will pass that in to the service. If you don't want it to - pass that in you can just set this to false. - Defaults to "true". - </xs:documentation> - </xs:annotation> - <xs:simpleType> - <xs:annotation> - </xs:annotation> - <xs:restriction base="xs:token"> - <xs:enumeration value="true"/> - <xs:enumeration value="false"/> - </xs:restriction> - </xs:simpleType> - </xs:attribute> - <xs:attribute name="break-on-error" default="true"> - <xs:annotation> - <xs:documentation> - If there's an error in the service by default - it will stop the current simple-method and return an - error message that came from the service it called. If - you don't want it to when there's an error you can just - set that to false. - Defaults to "true". - </xs:documentation> - </xs:annotation> - <xs:simpleType> - <xs:restriction base="xs:token"> - <xs:enumeration value="true"/> - <xs:enumeration value="false"/> - </xs:restriction> - </xs:simpleType> - </xs:attribute> - <xs:attribute type="xs:string" name="error-code" default="error"> - <xs:annotation> - <xs:documentation> - Defaults to "error". - </xs:documentation> - </xs:annotation> - </xs:attribute> - <xs:attribute type="xs:string" name="success-code" default="success"> - <xs:annotation> - <xs:documentation> - Defaults to "success". - </xs:documentation> - </xs:annotation> - </xs:attribute> - <xs:attribute name="require-new-transaction" default="false"> - <xs:annotation> - <xs:documentation> - Defines if the simple-method requires a new transaction or not. - Defaults to "false". - </xs:documentation> - </xs:annotation> - <xs:simpleType> - <xs:restriction base="xs:token"> - <xs:enumeration value="true"/> - <xs:enumeration value="false"/> - </xs:restriction> - </xs:simpleType> - </xs:attribute> - <xs:attribute type="xs:string" name="transaction-timeout"> - <xs:annotation> - <xs:documentation> - Defines the timeout for the transaction, in seconds. - Defaults to the value set in the service definition which in turn defaults to the setting - in the TransactionFactory being used (typically 60 seconds). - </xs:documentation> - </xs:annotation> - </xs:attribute> - </xs:attributeGroup> - <xs:element name="error-prefix"> - <xs:annotation> - <xs:documentation> - Specify a resource and a property to prepend to the error message. - </xs:documentation> - </xs:annotation> - <xs:complexType mixed="true"> - <xs:attributeGroup ref="attlist.propertyInfoOptional"/> - </xs:complexType> - </xs:element> - <xs:element name="error-suffix"> - <xs:annotation> - <xs:documentation> - Specify a resource and a property to append to the error message. + Specify a resource and a property to append to the error message. </xs:documentation> </xs:annotation> <xs:complexType mixed="true"> @@ -727,141 +759,139 @@ under the License. <xs:element name="results-to-map"> <xs:annotation> <xs:documentation> - results-to-map will take all of the results of the service, - the outgoing maps from the service and put them in a map of the given map-name. + Copies the called service result Map to the specified field. </xs:documentation> </xs:annotation> <xs:complexType> - <xs:attributeGroup ref="attlist.results-to-map"/> + <xs:attribute type="xs:string" name="map-name" use="required"> + <xs:annotation> + <xs:documentation> + Name of the target field. + <br/><br/> + Required. Attribute type: expression. + </xs:documentation> + </xs:annotation> + </xs:attribute> </xs:complexType> </xs:element> - <xs:attributeGroup name="attlist.results-to-map"> - <xs:attribute type="xs:string" name="map-name" use="required"> - <xs:annotation> - <xs:documentation> - Name of a map where results will be put in. - </xs:documentation> - </xs:annotation> - </xs:attribute> - </xs:attributeGroup> <xs:element name="result-to-field"> <xs:annotation> <xs:documentation> - Specify the name of the field in the result and then the name of the field in the context you want to put it in, - and optionally the name in the map. - - There's a field-map there. If you don't specify a field-name then the result-name will be used for the field-name, - that's the name of the variable that will be created in the current context for the value of that result. + Copies the called service OUT attribute to the specified field. </xs:documentation> </xs:annotation> <xs:complexType> - <xs:attributeGroup ref="attlist.result-to-field"/> + <xs:attribute type="xs:string" name="result-name" use="required"> + <xs:annotation> + <xs:documentation> + Name of the called service OUT attribute. + <br/><br/> + Required. Attribute type: expression. + </xs:documentation> + </xs:annotation> + </xs:attribute> + <xs:attribute type="xs:string" name="field"> + <xs:annotation> + <xs:documentation> + Name of target field. Defaults to the "result-name" attribute value. + <br/><br/> + Optional. Attribute type: expression. + </xs:documentation> + </xs:annotation> + </xs:attribute> </xs:complexType> </xs:element> - <xs:attributeGroup name="attlist.result-to-field"> - <xs:attribute type="xs:string" name="result-name" use="required"> - <xs:annotation> - <xs:documentation> - Name of the result. May be used for the field-name. If you don't specify a field-name, - this will be name of the variable that will be created in the current context for the value of that result. - </xs:documentation> - </xs:annotation> - </xs:attribute> - <xs:attribute type="xs:string" name="field"> - <xs:annotation><xs:documentation>Optional name of target field. If empty will default to result-name.</xs:documentation></xs:annotation> - </xs:attribute> - </xs:attributeGroup> <xs:element name="result-to-request"> <xs:annotation> <xs:documentation> - result-to-request is event specific. - It takes the result with the given name and puts it in a request attribute with the given name here. - Again the request-name is optional. - If you leave it off then it will put it in an attribute with the name of the result-name. + Copies the called service OUT attribute to the specified request attribute. + Valid only when the script is run in an event. </xs:documentation> </xs:annotation> <xs:complexType> - <xs:attributeGroup ref="attlist.result-to-request"/> + <xs:attribute type="xs:string" name="result-name" use="required"> + <xs:annotation> + <xs:documentation> + Name of the called service OUT attribute. + <br/><br/> + Required. Attribute type: expression. + </xs:documentation> + </xs:annotation> + </xs:attribute> + <xs:attribute type="xs:string" name="request-name"> + <xs:annotation> + <xs:documentation> + Name of the target request attribute. Defaults to the "result-name" attribute value. + <br/><br/> + Optional. Attribute type: expression. + </xs:documentation> + </xs:annotation> + </xs:attribute> </xs:complexType> </xs:element> - <xs:attributeGroup name="attlist.result-to-request"> - <xs:attribute type="xs:string" name="result-name" use="required"> - <xs:annotation> - <xs:documentation> - Name of the result. May be used for the request attribute name. If you don't specify a request-name , - that's the name of the request attribute that will be created for the value of that result. - </xs:documentation> - </xs:annotation> - </xs:attribute> - <xs:attribute type="xs:string" name="request-name"> - <xs:annotation> - <xs:documentation> - Optionnal request name. - </xs:documentation> - </xs:annotation> - </xs:attribute> - </xs:attributeGroup> <xs:element name="result-to-session"> <xs:annotation> <xs:documentation> - Specify the name of the session attribute that you want it to put the value in. - If you don't specify one it will use the result-name. + Copies the called service OUT attribute to the specified session attribute. + Valid only when the script is run in an event. </xs:documentation> </xs:annotation> <xs:complexType> - <xs:attributeGroup ref="attlist.result-to-session"/> + <xs:attribute type="xs:string" name="result-name" use="required"> + <xs:annotation> + <xs:documentation> + Name of the called service OUT attribute. + <br/><br/> + Required. Attribute type: expression. + </xs:documentation> + </xs:annotation> + </xs:attribute> + <xs:attribute type="xs:string" name="session-name"> + <xs:annotation> + <xs:documentation> + Name of the target session attribute. Defaults to the "result-name" attribute value. + <br/><br/> + Optional. Attribute type: expression. + </xs:documentation> + </xs:annotation> + </xs:attribute> </xs:complexType> </xs:element> - <xs:attributeGroup name="attlist.result-to-session"> - <xs:attribute type="xs:string" name="result-name" use="required"> - <xs:annotation> - <xs:documentation> - Name of the result. May be used for the session attribute name. If you don't specify a session-name, - that's the name of the session attribute that will be created for the value of that result. - </xs:documentation> - </xs:annotation> - </xs:attribute> - <xs:attribute type="xs:string" name="session-name"> - <xs:annotation> - <xs:documentation> - Optionnal session name. - </xs:documentation> - </xs:annotation> - </xs:attribute> - </xs:attributeGroup> <xs:element name="result-to-result"> <xs:annotation> <xs:documentation> - result-to-result is service specific (when the service is being called as a service). - - It will take the result of the service you're calling with the call service operation and it will put it in with the result of the current service. - So result-name is the name of the result in the service that was called using the call-service tag. - - NOTE that these attributes are somewhat confusing: result-name is the name of the field in the result of this service call that the value comes FROM; - service-result-name is the name of the field in the result of this simple-method called as a service where the value goes TO; - in other words FROM result-name and TO service-result-name. + Copies service OUT attributes from a called service to the calling service's OUT attributes. + This element can also be used to copy the called service OUT attributes to the return result of + a simple-method called as a function. + <br/><br/> + Note that the attribute names are somewhat confusing: + "result-name" is the name of the OUT attribute of the called service, and + "service-result-name" is the name of the OUT attribute of the calling service. + In other words, copy the OUT attribute FROM "result-name" TO "service-result-name". </xs:documentation> </xs:annotation> <xs:complexType> - <xs:attributeGroup ref="attlist.result-to-result"/> + <xs:attribute type="xs:string" name="result-name" use="required"> + <xs:annotation> + <xs:documentation> + Name of the called service OUT attribute. + <br/><br/> + Required. Attribute type: expression. + </xs:documentation> + </xs:annotation> + </xs:attribute> + <xs:attribute type="xs:string" name="service-result-name"> + <xs:annotation> + <xs:documentation> + Name of the calling service OUT attribute (or function return result). + Defaults to the "result-name" attribute value. + <br/><br/> + Optional. Attribute type: expression. + </xs:documentation> + </xs:annotation> + </xs:attribute> </xs:complexType> </xs:element> - <xs:attributeGroup name="attlist.result-to-result"> - <xs:attribute type="xs:string" name="result-name" use="required"> - <xs:annotation> - <xs:documentation> - Name of the field in the result of this service call that the value comes FROM. - </xs:documentation> - </xs:annotation> - </xs:attribute> - <xs:attribute type="xs:string" name="service-result-name"> - <xs:annotation> - <xs:documentation> - Name of the field in the result of this simple-method called as a service where the value goes TO. - </xs:documentation> - </xs:annotation> - </xs:attribute> - </xs:attributeGroup> <xs:element name="call-service-asynch" substitutionGroup="CallOperations"> <xs:annotation> <xs:documentation> @@ -871,38 +901,47 @@ under the License. </xs:documentation> </xs:annotation> <xs:complexType> - <xs:attributeGroup ref="attlist.call-service-asynch"/> + <xs:attribute type="xs:string" name="service-name" use="required"> + <xs:annotation> + <xs:documentation> + Name of the service to call. + <br/><br/> + Required. Attribute type: constant, expression. + </xs:documentation> + </xs:annotation> + </xs:attribute> + <xs:attribute type="xs:string" name="in-map-name"> + <xs:annotation> + <xs:documentation> + A map in the method environment to use as the input map. + If you're not going to pass any parameters to the service than you can just + omit the in-map attribute, although typically in a call-service-asynch element + you will see the in-map-name attribute included. + <br/><br/> + Optional. Attribute type: expression. + </xs:documentation> + </xs:annotation> + </xs:attribute> + <xs:attribute name="include-user-login"> + <xs:annotation> + <xs:documentation> + Include the current UserLogin GenericValue in the called service IN attributes. + Defaults to "true". + <br/><br/> + Optional. Attribute type: constant. + </xs:documentation> + </xs:annotation> + <xs:simpleType> + <xs:annotation> + </xs:annotation> + <xs:restriction base="xs:token"> + <xs:enumeration value="true" /> + <xs:enumeration value="false" /> + </xs:restriction> + </xs:simpleType> + </xs:attribute> </xs:complexType> </xs:element> - <xs:attributeGroup name="attlist.call-service-asynch"> - <xs:attribute type="xs:string" name="service-name" use="required"> - <xs:annotation> - <xs:documentation> - Name of the service called asynchronously. - </xs:documentation> - </xs:annotation> - </xs:attribute> - <xs:attribute type="xs:string" name="in-map-name"> - <xs:annotation> - <xs:documentation> - The name of a map in the method environment to use as the input map. - </xs:documentation> - </xs:annotation> - </xs:attribute> - <xs:attribute name="include-user-login" default="true"> - <xs:annotation> - <xs:documentation> - Defaults to "true". - </xs:documentation> - </xs:annotation> - <xs:simpleType> - <xs:restriction base="xs:token"> - <xs:enumeration value="true"/> - <xs:enumeration value="false"/> - </xs:restriction> - </xs:simpleType> - </xs:attribute> - </xs:attributeGroup> <xs:element name="script" substitutionGroup="CallOperations"> <xs:annotation> <xs:documentation> @@ -937,7 +976,7 @@ under the License. <xs:element name="call-bsh" substitutionGroup="CallOperations"> <xs:annotation> <xs:documentation> - Executes a BSH script. Deprecated - replace with <script>. + Executes a BSH script. Deprecated - replace with script. <br/><br/> The script can be contained in a Java resource, or a short script can be included in the element body. @@ -1019,7 +1058,7 @@ under the License. <xs:element name="call-object-method" substitutionGroup="CallOperations"> <xs:annotation> <xs:documentation> - Calls a method on an existing Java object. Deprecated - replace with <script>. + Calls a method on an existing Java object. Deprecated - replace with script. <br/><br/> The string and field sub-elements are passed to the method as arguments in the order they are specified. If the method returns a value, the value will be put in the named field. @@ -1057,7 +1096,7 @@ under the License. <xs:element name="call-class-method" substitutionGroup="CallOperations"> <xs:annotation> <xs:documentation> - Calls a static method on a Java class. Deprecated - replace with <script>. + Calls a static method on a Java class. Deprecated - replace with script. <br/><br/> The string and field sub-elements are passed to the method as arguments in the order they are specified. If the method returns a value, the value will be put in the named field. @@ -3460,108 +3499,113 @@ under the License. <xs:element name="iterate" substitutionGroup="ControlOperations"> <xs:annotation> <xs:documentation> - The operations contained by the iterate tag will be executed for each of the entries in the list, - and will make the current entry available in the method environment by the entry-name specified. - This tag can contain any of the simple-method operations, including the conditional/if operations. - - Any simple-method operation can be nested under the iterate tag. + The operations contained in the iterate element will be executed for each of the entries in the list, + and will make the current entry available in the environment by the name specified. </xs:documentation> </xs:annotation> <xs:complexType> - <xs:group minOccurs="0" maxOccurs="unbounded" ref="AllOperations"/> - <xs:attributeGroup ref="attlist.iterate"/> - </xs:complexType> - </xs:element> - <xs:attributeGroup name="attlist.iterate"> - <xs:attribute type="xs:string" name="entry" use="required"> - <xs:annotation> - <xs:documentation> - The name of the method environment field that will contain each entry as we iterate through the list. - </xs:documentation> - </xs:annotation> - </xs:attribute> - <xs:attribute type="xs:string" name="list" use="required"> - <xs:annotation> - <xs:documentation> - The name of the method environment field that contains the list to iterate over. - </xs:documentation> - </xs:annotation> - </xs:attribute> - </xs:attributeGroup> + <xs:group minOccurs="0" maxOccurs="unbounded" ref="AllOperations" /> + <xs:attribute type="xs:string" name="list" use="required"> + <xs:annotation> + <xs:documentation> + The name of the environment field that contains the list to iterate over. + <br/><br/> + Required. Attribute type: expression. + </xs:documentation> + </xs:annotation> + </xs:attribute> + <xs:attribute type="xs:string" name="entry" use="required"> + <xs:annotation> + <xs:documentation> + The name of the environment field that will contain each entry in the list. + <br/><br/> + Required. Attribute type: expression. + </xs:documentation> + </xs:annotation> + </xs:attribute> + </xs:complexType> + </xs:element> <xs:element name="iterate-map" substitutionGroup="ControlOperations"> <xs:annotation> <xs:documentation> - The operations contained by the iterate-map tag will be executed for each of the entries in the map. - It will run all of the operations underneath the iterate-map-element for each of the entries in the given map, - setting the key for that entry and the key name variable, and the value for that entry and the value variable. - - This tag can contain any of the simple-method operations, including the conditional/if operations. - - Any simple-method operation can be nested under the iterate-map tag. + The operations contained in the iterate-map element will be executed for each of the entries in the list, + and will make the current entry key/value pair available in the environment by the names specified. </xs:documentation> </xs:annotation> <xs:complexType> - <xs:group minOccurs="0" maxOccurs="unbounded" ref="AllOperations"/> - <xs:attributeGroup ref="attlist.iterate-map"/> + <xs:group minOccurs="0" maxOccurs="unbounded" ref="AllOperations" /> + <xs:attribute type="xs:string" name="map" use="required"> + <xs:annotation> + <xs:documentation> + The name of the environment field that contains the map to iterate over. + <br/><br/> + Required. Attribute type: expression. + </xs:documentation> + </xs:annotation> + </xs:attribute> + <xs:attribute type="xs:string" name="key" use="required"> + <xs:annotation> + <xs:documentation> + The name of the environment field that will contain the map entry key. + <br/><br/> + Required. Attribute type: expression. + </xs:documentation> + </xs:annotation> + </xs:attribute> + <xs:attribute type="xs:string" name="value" use="required"> + <xs:annotation> + <xs:documentation> + The name of the environment field that will contain the map entry value. + <br/><br/> + Required. Attribute type: expression. + </xs:documentation> + </xs:annotation> + </xs:attribute> </xs:complexType> </xs:element> - <xs:attributeGroup name="attlist.iterate-map"> - <xs:attribute type="xs:string" name="key" use="required"> - <xs:annotation> - <xs:documentation> - Name of the variable to put the key. - </xs:documentation> - </xs:annotation> - </xs:attribute> - <xs:attribute type="xs:string" name="value" use="required"> - <xs:annotation> - <xs:documentation> - Name of the variable to put the value in. - </xs:documentation> - </xs:annotation> - </xs:attribute> - <xs:attribute type="xs:string" name="map" use="required"> - <xs:annotation> - <xs:documentation> - Name of the map to use. - </xs:documentation> - </xs:annotation> - </xs:attribute> - </xs:attributeGroup> <xs:element name="loop" substitutionGroup="ControlOperations"> <xs:annotation> <xs:documentation> - Loop, rather than iterating over some sort of a structure, - will simply loop a certain number of times. The - number of times to loop is specified in the count attribute, - and it will put the current count in the field attribute, - or in the variable named by the field attribute. So if you - want to loop ten times you say count=ten, and - field=count for example. First time through count will - be zero; last time through count will be nine. + The operations contained in the loop element will be executed repeatedly until the specified count is reached. + The current count value is available in the environment by the name specified. </xs:documentation> </xs:annotation> <xs:complexType> - <xs:group minOccurs="0" maxOccurs="unbounded" ref="AllOperations"/> - <xs:attributeGroup ref="attlist.loop"/> + <xs:group minOccurs="0" maxOccurs="unbounded" ref="AllOperations" /> + <xs:attribute type="xs:string" name="count" use="required"> + <xs:annotation> + <xs:documentation> + The number of times to loop. + <br/><br/> + Required. Attribute types: constant, expression. + </xs:documentation> + </xs:annotation> + </xs:attribute> + <xs:attribute type="xs:string" name="field"> + <xs:annotation> + <xs:documentation> + The name of the environment field that will contain the current count. + <br/><br/> + Optional. Attribute type: expression. + </xs:documentation> + </xs:annotation> + </xs:attribute> + </xs:complexType> + </xs:element> + <xs:element name="while" substitutionGroup="ControlOperations"> + <xs:annotation> + <xs:documentation> + The operations contained in the while element will be executed as long as its condition element + evaluates to true. + </xs:documentation> + </xs:annotation> + <xs:complexType> + <xs:sequence> + <xs:element ref="condition" /> + <xs:element ref="then" /> + </xs:sequence> </xs:complexType> </xs:element> - <xs:attributeGroup name="attlist.loop"> - <xs:attribute type="xs:string" name="count" use="required"> - <xs:annotation> - <xs:documentation> - Number of times to loop. - </xs:documentation> - </xs:annotation> - </xs:attribute> - <xs:attribute type="xs:string" name="field" use="optional"> - <xs:annotation> - <xs:documentation> - Current count is put in the field attribute. - </xs:documentation> - </xs:annotation> - </xs:attribute> - </xs:attributeGroup> <xs:element name="check-errors" substitutionGroup="ControlOperations"> <xs:annotation> <xs:documentation> @@ -3572,12 +3616,14 @@ under the License. <xs:attribute type="xs:string" name="error-code"> <xs:annotation> <xs:documentation> - The error code to return to the calling process. Defaults to "error". + The error code to return to the calling process. + Defaults to value of the containing simple-method "default-error-code" attribute. <br/><br/> Optional. Attribute type: constant+expr </xs:documentation> </xs:annotation> </xs:attribute> + <xs:attribute ref="error-list-name"/> </xs:complexType> </xs:element> <xs:element name="add-error" substitutionGroup="ControlOperations"> @@ -3591,15 +3637,7 @@ under the License. <xs:element ref="fail-message" /> <xs:element ref="fail-property" /> </xs:choice> - <xs:attribute type="xs:string" name="error-list-name"> - <xs:annotation> - <xs:documentation> - The name of the error message list. Defaults to "error_list". - <br/><br/> - Optional. Attribute type: constant - </xs:documentation> - </xs:annotation> - </xs:attribute> + <xs:attribute ref="error-list-name"/> </xs:complexType> </xs:element> <xs:element name="break" substitutionGroup="ControlOperations"> @@ -3608,6 +3646,7 @@ under the License. Causes script execution to exit the nearest enclosing loop element. </xs:documentation> </xs:annotation> + <xs:complexType /> </xs:element> <xs:element name="continue" substitutionGroup="ControlOperations"> <xs:annotation> @@ -3615,6 +3654,7 @@ under the License. Causes script execution to return to the beginning of the nearest enclosing loop element. </xs:documentation> </xs:annotation> + <xs:complexType /> </xs:element> <xs:element name="return" substitutionGroup="ControlOperations"> <xs:annotation> @@ -3623,52 +3663,37 @@ under the License. </xs:documentation> </xs:annotation> <xs:complexType> - <xs:attributeGroup ref="attlist.return"/> + <xs:attribute type="xs:string" name="response-code"> + <xs:annotation> + <xs:documentation> + The string to return as a response code. Defaults to "success". + <br/><br/> + Optional. Attribute type: constant + </xs:documentation> + </xs:annotation> + </xs:attribute> </xs:complexType> </xs:element> - <xs:attributeGroup name="attlist.return"> - <xs:attribute type="xs:string" name="response-code" default="success"> - <xs:annotation> - <xs:documentation> - The string to return as a response code. Defaults to "success". - </xs:documentation> - </xs:annotation> - </xs:attribute> - </xs:attributeGroup> - <xs:element name="assert" substitutionGroup="IfOtherOperations"> + <xs:element name="assert" substitutionGroup="EnvOperations"> <xs:annotation> <xs:documentation> - Each condition under the assert element will be checked and if it fails an error will be added to the given error list. - Note that while the definitions for the if-* operations are used, the tags should be empty because of the differing semantics. - - This is mainly used for testing, and for writing simple-methods that are meant to be used as part of a test suite. - - This is mostly useful for testing because the messages are targeted at a programmer, and not really at an end user. + Adds an error message to the error message list for each condition that evaluates to false. </xs:documentation> </xs:annotation> <xs:complexType> - <xs:group maxOccurs="unbounded" ref="IfConditions"/> - <xs:attributeGroup ref="attlist.assert"/> + <xs:group maxOccurs="unbounded" ref="IfConditions" /> + <xs:attribute type="xs:string" name="title"> + <xs:annotation> + <xs:documentation> + The title of the assert operation. The title is used in automated test reports. + <br/><br/> + Optional. Attribute type: constant + </xs:documentation> + </xs:annotation> + </xs:attribute> + <xs:attribute ref="error-list-name"/> </xs:complexType> </xs:element> - <xs:attributeGroup name="attlist.assert"> - <xs:attribute type="xs:string" name="title"> - <xs:annotation> - <xs:documentation> - Each assert operation have a title that can be used in the report for the testing. - These can be used in the normal code. - </xs:documentation> - </xs:annotation> - </xs:attribute> - <xs:attribute type="xs:string" name="error-list-name" default="error_list"> - <xs:annotation> - <xs:documentation> - The name of the list in the method environment to check for error messages. - Defaults to "error_list". - </xs:documentation> - </xs:annotation> - </xs:attribute> - </xs:attributeGroup> <!-- Operations that conditionally execute blocks within them; they mimic the @@ -3735,34 +3760,6 @@ under the License. </xs:sequence> </xs:complexType> </xs:element> - <xs:element name="while" substitutionGroup="IfOtherOperations"> - <xs:annotation> - <xs:documentation> - While loop operation, uses the same condition element as the if operation. - </xs:documentation> - </xs:annotation> - <xs:complexType> - <xs:sequence> - <xs:element ref="condition"> - <xs:annotation> - <xs:documentation> - A simple element with no attributes that contains the condition that will be evaluated to determine which sub-operations to execute. - To combine the other if operations documented below the and, or, xor, and notelements can be used. - The and, or, and xor elements can contain as many general if operations and modifier/combination elements (ie and, or, xor, and not). - </xs:documentation> - </xs:annotation> - </xs:element> - <xs:element ref="then"> - <xs:annotation> - <xs:documentation> - The then element is used to contain operations that will run if the condition evaluate to true. - A then tag must be included, but can be empty. - </xs:documentation> - </xs:annotation> - </xs:element> - </xs:sequence> - </xs:complexType> - </xs:element> <xs:element name="condition"> <xs:annotation> <xs:documentation> @@ -3798,23 +3795,8 @@ under the License. </xs:annotation> <xs:complexType> <xs:sequence> - <xs:element ref="condition"> - <xs:annotation> - <xs:documentation> - A simple element with no attributes that contains the condition that will be evaluated to determine which sub-operations to execute. - To combine the other if operations documented below the and, or, xor, and notelements can be used. - The and, or, and xor elements can contain as many general if operations and modifier/combination elements (ie and, or, xor, and not). - </xs:documentation> - </xs:annotation> - </xs:element> - <xs:element ref="then"> - <xs:annotation> - <xs:documentation> - The then element is used to contain operations that will run if the condition evaluate to true. - A then tag must be included, but can be empty. - </xs:documentation> - </xs:annotation> - </xs:element> + <xs:element ref="condition" /> + <xs:element ref="then" /> </xs:sequence> </xs:complexType> </xs:element> @@ -3880,57 +3862,45 @@ under the License. <xs:documentation> The operations contained by the if-validate-method tag will only be executed if the validate method returns true. If-validate-method calls a static Java method that takes a String and returns a boolean. - This tag can contain any of the simple-method operations, including the conditional/if operations. + This tag can contain any of the simple-method operations, including + the conditional/if operations. </xs:documentation> </xs:annotation> <xs:complexType> <xs:sequence> - <xs:group minOccurs="0" maxOccurs="unbounded" ref="AllOperations"> - <xs:annotation> - <xs:documentation> - Any simple-method operation can be nested under an if-* tag. - </xs:documentation> - </xs:annotation> - </xs:group> - <xs:element minOccurs="0" ref="else"> - <xs:annotation> - <xs:documentation> - The else tag can be used to contain operations that will run if the condition fails, - or in other words if the operations under the if tag do not run. - - It can contain any simple-method operation. - The else tag must be placed as the last tag under the if-* tag. - </xs:documentation> - </xs:annotation> - </xs:element> + <xs:group minOccurs="0" maxOccurs="unbounded" ref="AllOperations" /> + <xs:element minOccurs="0" ref="else" /> </xs:sequence> - <xs:attributeGroup ref="attlist.if-validate-method"/> + <xs:attribute type="xs:string" name="field" use="required"> + <xs:annotation> + <xs:documentation> + The name of the field (variable) that will be validated. + <br/><br/> + Required. Attribute type: expression + </xs:documentation> + </xs:annotation> + </xs:attribute> + <xs:attribute type="xs:string" name="method" use="required"> + <xs:annotation> + <xs:documentation> + The name of the method that will be called to validate the field. + It must be a static method that takes a single String parameter and return a boolean. + <br/><br/> + Required. Attribute type: constant + </xs:documentation> + </xs:annotation> + </xs:attribute> + <xs:attribute type="xs:string" name="class"> + <xs:annotation> + <xs:documentation> + The name of the class that contains the validation method. Defaults to "org.ofbiz.base.util.UtilValidate". + <br/><br/> + Optional. Attribute type: constant + </xs:documentation> + </xs:annotation> + </xs:attribute> </xs:complexType> </xs:element> - <xs:attributeGroup name="attlist.if-validate-method"> - <xs:attribute type="xs:string" name="field" use="required"> - <xs:annotation> - <xs:documentation> - The name of the field (variable) that will be validated. - </xs:documentation> - </xs:annotation> - </xs:attribute> - <xs:attribute type="xs:string" name="method" use="required"> - <xs:annotation> - <xs:documentation> - The name of the method that will be called to validate the field. - It must be a static method that takes a single String parameter and return a boolean. - </xs:documentation> - </xs:annotation> - </xs:attribute> - <xs:attribute type="xs:string" name="class" default="org.ofbiz.base.util.UtilValidate"> - <xs:annotation> - <xs:documentation> - The name of the class that contains the validation method. If not specified defaults to "org.ofbiz.base.util.UtilValidate". - </xs:documentation> - </xs:annotation> - </xs:attribute> - </xs:attributeGroup> <xs:element name="if-instance-of" substitutionGroup="IfBasicOperations"> <xs:annotation> <xs:documentation> @@ -3951,146 +3921,119 @@ under the License. <xs:documentation> The else tag can be used to contain operations that will run if the condition fails, or in other words if the operations under the if tag do not run. - It can contain any simple-method operation. The else tag must be placed as the last tag under the if-* tag. </xs:documentation> </xs:annotation> </xs:element> </xs:sequence> - <xs:attributeGroup ref="attlist.if-instance-of"/> - </xs:complexType> - </xs:element> - <xs:attributeGroup name="attlist.if-instance-of"> - <xs:attribute type="xs:string" name="field" use="required"> - <xs:annotation> - <xs:documentation> - The name of the map field that will be validated as being an instance of the named class. - </xs:documentation> - </xs:annotation> - </xs:attribute> - <xs:attribute type="xs:string" name="class" use="required"> - <xs:annotation> - <xs:documentation> - The name of the class that named instance in field-name is supposed to belong. - </xs:documentation> - </xs:annotation> - </xs:attribute> - </xs:attributeGroup> + <xs:attribute type="xs:string" name="field" use="required"> + <xs:annotation> + <xs:documentation> + The name of the field to test. + <br/><br/> + Required. Attribute type: expression. + </xs:documentation> + </xs:annotation> + </xs:attribute> + <xs:attribute type="xs:string" name="class" use="required"> + <xs:annotation> + <xs:documentation> + The name of the class to test for. + <br/><br/> + Required. Attribute type: constant. + </xs:documentation> + </xs:annotation> + </xs:attribute> + </xs:complexType> + </xs:element> <xs:element name="if-compare" substitutionGroup="IfBasicOperations"> <xs:annotation> <xs:documentation> - The operations contained by the if-compare tag will only be executed if the comparison returns true. - This tag can contain any of the simple-method operations, including the conditional/if operations. + The operations contained by the if-compare tag will only be executed if the comparison evaluates to true. + This element can contain any of the simple-method operations, including the conditional/if operations. </xs:documentation> </xs:annotation> <xs:complexType> <xs:sequence> - <xs:group minOccurs="0" maxOccurs="unbounded" ref="AllOperations"> - <xs:annotation> - <xs:documentation> - Any simple-method operation can be nested under an if-* tag. - </xs:documentation> - </xs:annotation> - </xs:group> - <xs:element minOccurs="0" ref="else"> - <xs:annotation> - <xs:documentation> - The else tag can be used to contain operations that will run if the condition fails, - or in other words if the operations under the if tag do not run. - - It can contain any simple-method operation. - The else tag must be placed as the last tag under the if-* tag. - </xs:documentation> - </xs:annotation> - </xs:element> + <xs:group minOccurs="0" maxOccurs="unbounded" ref="AllOperations" /> + <xs:element minOccurs="0" ref="else" /> </xs:sequence> - <xs:attributeGroup ref="attlist.if-compare"/> - <xs:attributeGroup ref="attlist.operatorRequired"/> - <xs:attributeGroup ref="attlist.typeDefaultString"/> + <xs:attribute type="xs:string" name="field" use="required"> + <xs:annotation> + <xs:documentation> + The name of the environment field that will be compared. The l-value. + <br/><br/> + Required. Attribute type: expression. + </xs:documentation> + </xs:annotation> + </xs:attribute> + <xs:attributeGroup ref="attlist.operatorOptionalRvalue" /> + <xs:attribute type="xs:string" name="value" use="required"> + <xs:annotation> + <xs:documentation> + The value that the field will compared to. The r-value. + <br/><br/> + Required. Attribute type: constant+expr. + </xs:documentation> + </xs:annotation> + </xs:attribute> + <xs:attributeGroup ref="attlist.optionalJavaType" /> + <xs:attribute type="xs:string" name="format"> + <xs:annotation> + <xs:documentation> + Format based on the type of the object (date,number, etc.). + <br/><br/> + Optional. Attribute type: constant+expr. + </xs:documentation> + </xs:annotation> + </xs:attribute> </xs:complexType> </xs:element> - <xs:attributeGroup name="attlist.if-compare"> - <xs:attribute type="xs:string" name="field" use="required"> - <xs:annotation> - <xs:documentation> - The name of the field in the context (environment) that will be compared. - </xs:documentation> - </xs:annotation> - </xs:attribute> - <xs:attribute type="xs:string" name="value" use="required"> - <xs:annotation> - <xs:documentation> - The value that the field will compared to. - Must be a String, but can be converted to other types. - </xs:documentation> - </xs:annotation> - </xs:attribute> - <xs:attribute type="xs:string" name="format"> - <xs:annotation> - <xs:documentation> - Format based on the type of the object (date,number, etc.). - </xs:documentation> - </xs:annotation> - </xs:attribute> - </xs:attributeGroup> <xs:element name="if-compare-field" substitutionGroup="IfBasicOperations"> <xs:annotation> <xs:documentation> - The operations contained by the if-compare-field tag will only be executed if the comparison returns true. - This tag can contain any of the simple-method operations, including the conditional/if operations. + The operations contained by the if-compare-field tag will only be executed if the comparison evaluates to true. + This element can contain any of the simple-method operations, including the conditional/if operations. </xs:documentation> </xs:annotation> <xs:complexType> <xs:sequence> - <xs:group minOccurs="0" maxOccurs="unbounded" ref="AllOperations"> - <xs:annotation> - <xs:documentation> - Any simple-method operation can be nested under an if-* tag. - </xs:documentation> - </xs:annotation> - </xs:group> - <xs:element minOccurs="0" ref="else"> - <xs:annotation> - <xs:documentation> - The else tag can be used to contain operations that will run if the condition fails, - or in other words if the operations under the if tag do not run. - - It can contain any simple-method operation. - The else tag must be placed as the last tag under the if-* tag. - </xs:documentation> - </xs:annotation> - </xs:element> + <xs:group minOccurs="0" maxOccurs="unbounded" ref="AllOperations" /> + <xs:element minOccurs="0" ref="else" /> </xs:sequence> - <xs:attributeGroup ref="attlist.if-compare-field"/> - <xs:attributeGroup ref="attlist.operatorRequired"/> - <xs:attributeGroup ref="attlist.typeDefaultString"/> + <xs:attribute type="xs:string" name="field" use="required"> + <xs:annotation> + <xs:documentation> + The name of the environment field that will be compared. The l-value. + <br/><br/> + Required. Attribute type: expression. + </xs:documentation> + </xs:annotation> + </xs:attribute> + <xs:attributeGroup ref="attlist.operatorRequired" /> + <xs:attribute type="xs:string" name="to-field" use="required"> + <xs:annotation> + <xs:documentation> + The name of the environment field that will be compared to the field specified in the "field" attribute. + The r-value. + <br/><br/> + Required. Attribute type: expression. + </xs:documentation> + </xs:annotation> + </xs:attribute> + <xs:attributeGroup ref="attlist.optionalJavaType" /> + <xs:attribute type="xs:string" name="format"> + <xs:annotation> + <xs:documentation> + Format based on the type of the object (date,number, etc.). + <br/><br/> + Optional. Attribute type: constant+expr. + </xs:documentation> + </xs:annotation> + </xs:attribute> </xs:complexType> </xs:element> - <xs:attributeGroup name="attlist.if-compare-field"> - <xs:attribute type="xs:string" name="field" use="required"> - <xs:annotation> - <xs:documentation> - The name of the context field that will be compared. - </xs:documentation> - </xs:annotation> - </xs:attribute> - <xs:attribute type="xs:string" name="to-field"> - <xs:annotation> - <xs:documentation> - The name of the context field that the main field will be compared to. - If left empty will default to the field attribute's value. - </xs:documentation> - </xs:annotation> - </xs:attribute> - <xs:attribute type="xs:string" name="format"> - <xs:annotation> - <xs:documentation> - Format based on the type of the object (date,number, etc.). - </xs:documentation> - </xs:annotation> - </xs:attribute> - </xs:attributeGroup> <xs:element name="if-regexp" substitutionGroup="IfBasicOperations"> <xs:annotation> <xs:documentation> @@ -4141,43 +4084,26 @@ under the License. <xs:element name="if-empty" substitutionGroup="IfBasicOperations"> <xs:annotation> <xs:documentation> - The operations contained by the if-empty tag will only be executed if the map field is empty. - This tag can contain any of the simple-method operations, including the conditional/if operations. + The operations contained by the if-empty element will be executed if the specified field is null or empty. + This element can contain any of the simple-method operations, including the conditional/if operations. </xs:documentation> </xs:annotation> <xs:complexType> <xs:sequence> - <xs:group minOccurs="0" maxOccurs="unbounded" ref="AllOperations"> - <xs:annotation> - <xs:documentation> - Any simple-method operation can be nested under an if-* tag. - </xs:documentation> - </xs:annotation> - </xs:group> - <xs:element minOccurs="0" ref="else"> - <xs:annotation> - <xs:documentation> - The else tag can be used to contain operations that will run if the condition fails, - or in other words if the operations under the if tag do not run. - - It can contain any simple-method operation. [... 355 lines stripped ...] |
| Free forum by Nabble | Edit this page |
