to the main page about the tutorial  INTERACTIVE WEB SERVICES WITH JAVA back up next

Constraint Syntax

PowerForms constraints are written in XML syntax and look like:
<powerforms>
  <constraint field="name">
    body

  </constraint>
  ...
  <constraint field="name">
    body
  </constraint>
</powerforms>

A body is an expression, a regexp, or looks like:
<ignore/>
or:
<if>
  expression
  <then>body</then>
  <else>body</else>
</if>

An expression is a predicate or looks like one of:
<and>expression*</and>
<or>expression*</or>
<not>expression*</not>

A predicate looks like one of:
<count min="int max="int"/>
<equal field="name" value="string"/>
<match field="name">regexp</match>

A regexp looks like:
<regexp pattern="regexp"/>
<regexp url="URL"/>

back COPYRIGHT © 2002-2003 ANDERS MØLLER & MICHAEL I. SCHWARTZBACH next