| <?xml version="1.0" encoding="UTF-8"?> |
| <!-- |
| Licensed to the Apache Software Foundation (ASF) under one or more |
| contributor license agreements. See the NOTICE file distributed with |
| this work for additional information regarding copyright ownership. |
| The ASF licenses this file to You under the Apache License, Version 2.0 |
| (the "License"); you may not use this file except in compliance with |
| the License. You may obtain a copy of the License at |
| |
| http://www.apache.org/licenses/LICENSE-2.0 |
| |
| Unless required by applicable law or agreed to in writing, software |
| distributed under the License is distributed on an "AS IS" BASIS, |
| WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. |
| See the License for the specific language governing permissions and |
| limitations under the License. |
| --> |
| |
| <!-- $Id: workflow.xsd 473861 2006-11-12 03:51:14Z gregor $ --> |
| |
| <grammar |
| xmlns="http://relaxng.org/ns/structure/1.0" |
| datatypeLibrary="http://www.w3.org/2001/XMLSchema-datatypes" |
| > |
| |
| <define name="simpleNameToken"> |
| <data type="string"> |
| <param name="pattern">[\-_a-zA-Z]+</param> |
| </data> |
| </define> |
| |
| <define name="javaClassName"> |
| <data type="string"> |
| <param name="pattern">([\-_a-zA-Z0-9]+\.)+[\-_a-zA-Z0-9]+</param> |
| </data> |
| </define> |
| |
| <define name="booleanString"> |
| <choice> |
| <value>true</value> |
| <value>false</value> |
| </choice> |
| </define> |
| |
| <start> |
| |
| <element |
| name="workflow" ns="http://apache.org/cocoon/lenya/workflow/1.0" |
| > |
| <zeroOrMore> |
| <element name="state"> |
| <attribute name="id"><ref name="simpleNameToken"/></attribute> |
| <optional> |
| <attribute name="initial"><value>true</value></attribute> |
| </optional> |
| </element> |
| </zeroOrMore> |
| <!-- can this be made more flexible? zeroOrMore variables of arbitrary type? --> |
| <element name="variable"> |
| <attribute name="name"><ref name="simpleNameToken"/></attribute> |
| <attribute name="value"> |
| <ref name="booleanString"/> |
| </attribute> |
| </element> |
| <oneOrMore> |
| <element name="transition"> |
| <attribute name="source"><ref name="simpleNameToken"/></attribute> |
| <attribute name="destination"><ref name="simpleNameToken"/></attribute> |
| <element name="event"> |
| <attribute name="id"><ref name="simpleNameToken"/></attribute> |
| </element> |
| <oneOrMore> |
| <element name="condition"> |
| <attribute name="class"><ref name="javaClassName"/></attribute> |
| <data type="string"/> |
| </element> |
| </oneOrMore> |
| <optional> |
| <element name="assign"> |
| <attribute name="variable"><ref name="simpleNameToken"/></attribute> |
| <attribute name="value"> |
| <ref name="booleanString"/> |
| </attribute> |
| </element> |
| </optional> |
| </element> |
| </oneOrMore> |
| </element> |
| |
| </start> |
| </grammar> |