rng – Relax NG

This module is an XIST namespace for Relax NG files.

class ll.xist.ns.rng.base(*content, **attrs)[source]

Bases: ll.xist.xsc.Element

“Abstract” basis class, providing common attributes.

class ll.xist.ns.rng.anyName(*content, **attrs)[source]

Bases: ll.xist.ns.rng.base

Matches any name from any namespace.

class ll.xist.ns.rng.attribute(*content, **attrs)[source]

Bases: ll.xist.ns.rng.base

Specifies an XML attribute.

class ll.xist.ns.rng.choice(*content, **attrs)[source]

Bases: ll.xist.ns.rng.base

nameclass: a name matches choice if, and only if, it matches at least one of the subname classes. pattern: it matches a node if, and only if, at least one of its subpatterns matches the node

class ll.xist.ns.rng.data(*content, **attrs)[source]

Bases: ll.xist.ns.rng.base

Specifies data of a certain kind.

class ll.xist.ns.rng.define(*content, **attrs)[source]

Bases: ll.xist.ns.rng.base

Defines a part of a grammar pattern (also a pattern), recursion possible only inside an element.

class ll.xist.ns.rng.div(*content, **attrs)[source]

Bases: ll.xist.ns.rng.base

Allows logical divisions, no effect on validation, annotations can be made here

class ll.xist.ns.rng.element_(*content, **attrs)[source]

Bases: ll.xist.ns.rng.base

Specifies an XML element.

class ll.xist.ns.rng.empty(*content, **attrs)[source]

Bases: ll.xist.ns.rng.base

Specifies empty content.

class ll.xist.ns.rng.except_(*content, **attrs)[source]

Bases: ll.xist.ns.rng.base

An except_ element can remove a name class from another (this class has no attributes) (inside a name element) or it is used to remove a set of values from a data pattern.

class ll.xist.ns.rng.externalRef(*content, **attrs)[source]

Bases: ll.xist.ns.rng.base

Reference to an extern pattern stored in a file.

class ll.xist.ns.rng.grammar(*content, **attrs)[source]

Bases: ll.xist.ns.rng.base

A grammar element has a single start child element, and zero or more define child elements. The start and define elements contain patterns. These patterns can contain ref elements that refer to patterns defined by any of the define elements in that grammar element. A grammar pattern is matched by matching the pattern contained in the start element.

class ll.xist.ns.rng.group(*content, **attrs)[source]

Bases: ll.xist.ns.rng.base

Is implied, can be also explicitly specified: the patterns have to appear in the specified order (except for the attributes, they are allowed to appear in any order in the start tag)

class ll.xist.ns.rng.include(*content, **attrs)[source]

Bases: ll.xist.ns.rng.base

Includes an extern grammar pattern. Can contain define parts to overwrite that part (same name) in the extern pattern. A possible start element inside include overwrites the start element of the extern pattern.

class ll.xist.ns.rng.interleave(*content, **attrs)[source]

Bases: ll.xist.ns.rng.base

Child elements can appear in any order, if one is a group, the order must be kept, other direct childs can mix between.

class ll.xist.ns.rng.list(*content, **attrs)[source]

Bases: ll.xist.ns.rng.base

Matches whitespace seperated values.

class ll.xist.ns.rng.mixed(*content, **attrs)[source]

Bases: ll.xist.ns.rng.base

<mixed> p </mixed> is short for <interleave> <text/> p </interleave>

class ll.xist.ns.rng.name(*content, **attrs)[source]

Bases: ll.xist.ns.rng.base

Defines a class with a single name.

class ll.xist.ns.rng.notAllowed(*content, **attrs)[source]

Bases: ll.xist.ns.rng.base

Used to make extension points in patterns.

class ll.xist.ns.rng.nsName(*content, **attrs)[source]

Bases: ll.xist.ns.rng.base

Allows any name in a specific namespace.

class ll.xist.ns.rng.oneOrMore(*content, **attrs)[source]

Bases: ll.xist.ns.rng.base

There can be one or more recurrence of the enclosed pattern.

class ll.xist.ns.rng.optional(*content, **attrs)[source]

Bases: ll.xist.ns.rng.base

The enclosed tags can be left out.

class ll.xist.ns.rng.param(*content, **attrs)[source]

Bases: ll.xist.ns.rng.base

Specifies parameters passed to the datatype library to determine whether a value is valid per a datatype.

class ll.xist.ns.rng.parentRef(*content, **attrs)[source]

Bases: ll.xist.ns.rng.base

Escapes out of the current grammar and references a definition from the parent of the current grammar.

class ll.xist.ns.rng.ref(*content, **attrs)[source]

Bases: ll.xist.ns.rng.base

A ref pattern refers to a definition from the nearest grammar ancestor.

class ll.xist.ns.rng.start(*content, **attrs)[source]

Bases: ll.xist.ns.rng.base

Required start tag inside a grammar tag.

class ll.xist.ns.rng.text(*content, **attrs)[source]

Bases: ll.xist.ns.rng.base

Matches arbitrary text (one or more text nodes), including empty text.

class ll.xist.ns.rng.value(*content, **attrs)[source]

Bases: ll.xist.ns.rng.base

By default, the value pattern will consider the string in the pattern to match the string in the document if the two strings are the same after the whitespace in both strings is normalized. Whitespace normalization strips leading and trailing whitespace characters, and collapses sequences of one or more whitespace characters to a single space character. This corresponds to the behaviour of an XML parser for an attribute that is declared as other than CDATA.

class ll.xist.ns.rng.zeroOrMore(*content, **attrs)[source]

Bases: ll.xist.ns.rng.base

There can be zero or more recurrence of the enclosed pattern.