Intro / XCSL / XCSL Project |
Element | CS | |||||||||
---|---|---|---|---|---|---|---|---|---|---|
Description | Is the root element of an XML Constraint Specification Document. A XCSL constraint document consists of one or more CONSTRAINT elements. | |||||||||
Required | true | |||||||||
Attributes |
|
|||||||||
Childrens | CONSTRAINT | |||||||||
Parent | / | |||||||||
DTD | <!ELEMENT CS (CONSTRAINT)+> <!ATTLIST CS DTD CDATA #IMPLIED DATE CDATA #IMPLIED VERSION CDATA #IMPLIED > |
Element | CONSTRAINT |
---|---|
Description | This element specifies a constraint and the action that will be triggered when this constraint is not respected. This element is formed by a sequence of elements: a SELECTOR element, zero or more LET elements, a CC element, and an ACTION element. |
Required | true |
Childrens | SELECTOR LET CC ACTION |
Parent | CS |
DTD | <!ELEMENT CONSTRAINT (SELECTOR, LET*, CC, ACTION)> |
Element | SELECTOR | |||
---|---|---|---|---|
Description | This element, as the name suggests, selects the context (the element or elements) within which the conditions should be tested. | |||
Required | true | |||
Attributes |
|
|||
Parent | CONSTRAINT | |||
DTD | <!ELEMENT SELECTOR EMPTY> |
Element | LET | ||||||
---|---|---|---|---|---|---|---|
Description | That elements have an important role in complex constraints, they allow us to specify multi-step evaluations, enabling the simplification of very complex constraints. With this element we can save, in a variable (NAME) the result of an XPath expression applied to any XPath path, or still the set of values that belong to that context. It is an empty element. | ||||||
Required | false | ||||||
Attributes |
|
||||||
Parent | CONSTRAINT | ||||||
DTD | <!ELEMENT LET EMPTY> <!ATTLIST LET NAME CDATA #REQUIRED VALUE CDATA #REQUIRED > |
Element | CC |
---|---|
Description | It is an element that specifies the constraint that has to be verified – regular expression or XPath function. The action will be triggered whenever that expression or function is evaluated to false. It has a mixed content – text in which VARIABLE elements can occur any number of times. |
Required | true |
Childrens | VARIABLE |
Parent | CONSTRAINT |
DTD | <!ELEMENT CC (#PCDATA | VARIABLE)*> |
Element | VARIABLE | |||
---|---|---|---|---|
Description | This element is used when we are enforcing a constraint over an element or attribute and we want to guarantee that that element or attribute is present in the document instance. If the element or attribute in question is absent from the document, the CONSTRAINT will not be evaluated. | |||
Required | true | |||
Attributes |
|
|||
Parent | CC | |||
DTD | <!ELEMENT VARIABLE EMPTY> <!ATTLIST VARIABLE SELEXP CDATA #REQUIRED > |
Element | ACTION |
---|---|
Description | It is a required element that returns messages or results of evaluated expressions when the constraint being evaluated results in a false value. It consists of a sequence of messages. The contents of the MESSAGE element is returned when the ACTION element is unchained. It has mixed content: text with VALUE elements. |
Required | true |
Childrens | MESSAGE |
Parent | CONSTRAINT |
DTD | <!ELEMENT ACTION (MESSAGE*)> |
Element | MESSAGE |
---|---|
Description | The contents of the this element is returned when the ACTION element is unchained. It has mixed content: text with VALUE element. |
Required | false |
Childrens | VALUE |
Parent | ACTION |
DTD | <!ELEMENT MESSAGE (#PCDATA | VALUE)*> |
Element | VALUE | |||
---|---|---|---|---|
Description | This element is used to include some value of elements or attributes in the messages. | |||
Required | false | |||
Attributes |
|
|||
Parent | MESSAGE | |||
DTD | <!ELEMENT VALUE EMPTY> <!ATTLIST VALUE SELEXP CDATA #REQUIRED > |