ZVON > References > Relax NG Reference

Element: define

Attributes: combine | datatypeLibrary | name | ns |
Children: <other> | <pattern> ( element, attribute*, group*, interleave*, choice, optional, zeroOrMore, oneOrMore*, list*, mixed, ref*, parentRef, empty*, text*, value*, data*, notAllowed, externalRef, grammar ) |
Parents: grammar | include |

<element name="define">
     <attribute name="name">
          <data type="NCName"/>
     </attribute>
     <ref name="combine-att"/>
     <ref name="common-atts"/>
     <ref name="open-patterns"/>
</element>

Occurs in Schema Tutorial examples:
Element which contains two "patterns" (sequences), in any order
Defining a group of attributes
Exact number of elements from any namespace
Definition of a custom simpleType - temperature must be greater than -273.15
Limiting string length
Limiting the number of decimal places
Limiting both the number of decimal places and total places
String must contain e-mail address
Element contains date
Element represents time duration
definition of a simpleType, target namespace is null
definition of a simpleType, target namespace is not null
Element and type have the same name
Error - simpleType and complexType have the same name
Keyref
Abstract element, substitutionGroup
Abstract type
Extension of a sequence
Extension of a choice
Error in restriction - namespaces in wildcards
Target namespaces are the same (non-null)
Including in Relax NG - include element, ns attribute