Syntax Diagram Conventions

The descriptions of the XML resource files include diagrams describing the syntax of the elements in the files. The diagrams look something like this:

<content-types
    version="4"
>
  <field-group>...<field-group>*
  <relation-type-group>...<relation-type-group>*
  <content-type>...<content-type>+
  ANY-FOREIGN-ELEMENT*
</content-types>

In these diagrams, anything appearing in plain black characters is literal content: that is, it should be entered in the file exactly as shown. Anything appearing in black, italic characters is a placeholder that must be replaced by something else. The only such placeholders currently in use are:

  • ANY-FOREIGN-ELEMENT - This placeholder can be replaced by any foreign element. A foreign element is an element from a different namespace. This is mainly intended to allow you to enter elements from the interface-hints namespace (see interface-hints). You can, however, insert elements from any other namespace if you have the need.

  • ANY-ELEMENT - This placeholder can be replaced by any element from this namespace or any other.

Anything appearing in this color is neither literal content nor a placeholder, but has one of the following special meanings:

()

Encloses a set of alternatives, only one of which may be selected.

|

Separates the alternatives in a () set.

?

Indicates that the preceding element is optional.

*

Indicates that the preceding element may appear 0 or more times.

+

Indicates that the preceding element may appear 1 or more times.

...

Represents possible content in an element or attribute.

Element order is not significant in any of the XML publication resource files. The syntax diagram shown above seems to suggest that a field-group element must appear before a relation-type-group element, but this is not the case: the elements can in fact appear in any order.