Name

div — Division (in the context of a grammar)

Synopsis

“div” “{” 
grammarContent* “}”

Restrictions

grammarContent

May be included in

div, grammar

XML syntax equivalent

div

Description

The div element is provided to define logical divisions in RELAX NG schemas. It has no effect on the validation. Its purpose is to define a group of definitions within a grammar that may be annotated as a whole.

In the context of a grammar, the content of a div element is the same as the content of a grammar (div elements may be embedded in other div elements).

Example

[
  xhtml:p [
    "The content of the book element has been split into two named patterns:"
  ]
]
div {
  book-start =
    attribute id { text },
    isbn-element,
    title-element,
    author-element*
  book-end =
    author-element*,
    character-element*,
    attribute available { text }
}

Get RELAX NG now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.