Name

div (in the context of a include-content) — Division (in the context of an include)

Synopsis

element div
{
 (
 attribute ns { text }?,
 attribute datatypeLibrary { xsd:anyURI }?,
 attribute * - (rng:* | local:*) { text }*
 ),
 (
 ( element * - rng:* { ... }* )
 & (
 ( element start { ... } )
 | ( element define { ... } )
 | element div { ... }
 )*
 )
}

Class

include-content

May be included in

div, include

Compact syntax equivalent

div

Description

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

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

Example

<include href="common.rng">
 ...
 <div>
 <xhtml:p>The content of the book element has been split in two named patterns:
   </xhtml:p>
 <define name="book-start">
   <attribute name="id"/>
   <ref name="isbn-element"/>
   <ref name="title-element"/>
   <zeroOrMore>
     <ref name="author-element"/>
   </zeroOrMore>
 </define>
 <define name="book-end">
   <zeroOrMore>
     <ref name="author-element"/>
   </zeroOrMore>
   <zeroOrMore>
     <ref name="character-element"/>
   </zeroOrMore>
   <attribute name="available"/>
 </define>
 </div>
 ...
 </include>

Attributes

datatypeLibrary

This attribute defines the default datatype library. The value is inherited.

ns

This attribute defines the default namespace for the elements defined in a portion of schema. The ...

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.