FFX (Flow Fact in XML) format

Content

2 Notation

The FFX format is based on XML and its grammar is described here in a form as close as possible to an actual XML file. The notation used throughout this document is a melt of EBNF notation with XML notation for the different items composing the format.

Each element is represented by an EBNF rules put into comments just before its XML description.

TAG ::= <tag> ... </tag>

An element may contain a sequence of other elements that may be:

Tags, rule identifiers and attributes may be suffixed with EBNF-like symbols:

If they alternatives in the definition of a symbol, they are separated by | as in the example below:

TAG ::=
| <tag1> ... </tag1>
| <tag2> ... </tag2>
| ...

Following identifier represents a sequence of characters:

Some texts may be delimited between /. This defines text that matches the regular expression between slashes.

Items may be also separated by | to represent an alternative. An alternative inside an attribute may also be followed by a member between brackets [ and ] that designs the default value of the attribute.

As a picture is better than any explanation, takes a look at the example below:

NAME ::=
<name> TEXT </name>

PHONE ::=
<phone> /[0-9]+/ </phone>

PEOPLE ::=
<people>
  NAME
  PHONE*
</people>

In this example, an element people contains exactly one name element and any number of phone elements. The name contains any text (but no sub-element) while the phone contains a text formed of decimal digits.

1 r.e. stands for regular expression.