Name
nsName — Name class for any name in a namespace
Synopsis
element nsName { ( attribute ns { text }?, attribute datatypeLibrary { xsd:anyURI }?, attribute * - (rng:* | local:*) { text }* ), ( ( element * - rng:* { ... }* ) & element except { ... }? ) }
Class
name-class
May be included in
attribute
, choice
,
element
, except
Compact syntax equivalent
nsName exceptNameClass
Description
The nsName
name class allows any name in a
specific namespace.
Restrictions
Within the scope of an element, the name classes of attributes
can’t overlap. The same restriction applies to name
classes of elements when these elements are combined by
interleave
. It is impossible to use
nsName
to produce empty name classes by including
nsName
in an except
name class
included in another nsName
.
Example
<element> <choice> <nsName ns="http://eric.van-der-vlist.com/ns/library"/> <nsName ns="http://eric.van-der-vlist.com/ns/person"/> </choice> <ref name="anything"/> </element> <element> <nsName ns="http://eric.van-der-vlist.com/ns/person"/> <except> <name>name</name> <except> </nsName> <ref name="anything"/> </element>
Attributes
-
datatypeLibrary
The
datatypeLibrary
attribute defines the default datatype library. The value ofdatatypeLibrary
is inherited.-
ns
The
ns
attribute defines the default namespace for the elements defined in a portion of a schema. The value ofns
is inherited.
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.