draft-ietf-netmod-dsdl-map-09.txt   draft-ietf-netmod-dsdl-map-10.txt 
NETMOD L. Lhotka, Ed. NETMOD L. Lhotka, Ed.
Internet-Draft CESNET Internet-Draft CESNET
Intended status: Standards Track October 21, 2010 Intended status: Standards Track October 21, 2010
Expires: April 24, 2011 Expires: April 24, 2011
Mapping YANG to Document Schema Definition Languages and Validating Mapping YANG to Document Schema Definition Languages and Validating
NETCONF Content NETCONF Content
draft-ietf-netmod-dsdl-map-09 draft-ietf-netmod-dsdl-map-10
Abstract Abstract
This document specifies the mapping rules for translating YANG data This document specifies the mapping rules for translating YANG data
models into Document Schema Definition Languages (DSDL), a models into Document Schema Definition Languages (DSDL), a
coordinated set of XML schema languages standardized as ISO/IEC coordinated set of XML schema languages standardized as ISO/IEC
19757. The following DSDL schema languages are addressed by the 19757. The following DSDL schema languages are addressed by the
mapping: RELAX NG, Schematron and DSRL. The mapping takes one or mapping: RELAX NG, Schematron and DSRL. The mapping takes one or
more YANG modules and produces a set of DSDL schemas for a selected more YANG modules and produces a set of DSDL schemas for a selected
target document type - datastore content, NETCONF message etc. target document type - datastore content, NETCONF message etc.
skipping to change at page 3, line 48 skipping to change at page 3, line 48
10.45. The 'presence' Statement . . . . . . . . . . . . . . . . 55 10.45. The 'presence' Statement . . . . . . . . . . . . . . . . 55
10.46. The 'range' Statement . . . . . . . . . . . . . . . . . 55 10.46. The 'range' Statement . . . . . . . . . . . . . . . . . 55
10.47. The 'reference' Statement . . . . . . . . . . . . . . . 55 10.47. The 'reference' Statement . . . . . . . . . . . . . . . 55
10.48. The 'require-instance' Statement . . . . . . . . . . . . 55 10.48. The 'require-instance' Statement . . . . . . . . . . . . 55
10.49. The 'revision' Statement . . . . . . . . . . . . . . . . 55 10.49. The 'revision' Statement . . . . . . . . . . . . . . . . 55
10.50. The 'rpc' Statement . . . . . . . . . . . . . . . . . . 55 10.50. The 'rpc' Statement . . . . . . . . . . . . . . . . . . 55
10.51. The 'status' Statement . . . . . . . . . . . . . . . . . 56 10.51. The 'status' Statement . . . . . . . . . . . . . . . . . 56
10.52. The 'submodule' Statement . . . . . . . . . . . . . . . 56 10.52. The 'submodule' Statement . . . . . . . . . . . . . . . 56
10.53. The 'type' Statement . . . . . . . . . . . . . . . . . . 56 10.53. The 'type' Statement . . . . . . . . . . . . . . . . . . 56
10.53.1. The "empty" Type . . . . . . . . . . . . . . . . . 57 10.53.1. The "empty" Type . . . . . . . . . . . . . . . . . 57
10.53.2. The "boolean" and "binary" Types . . . . . . . . . 58 10.53.2. The "boolean" Type . . . . . . . . . . . . . . . . 57
10.53.3. The "bits" Type . . . . . . . . . . . . . . . . . . 58 10.53.3. The "binary" Type . . . . . . . . . . . . . . . . . 58
10.53.4. The "enumeration" and "union" Types . . . . . . . . 58 10.53.4. The "bits" Type . . . . . . . . . . . . . . . . . . 58
10.53.5. The "identityref" Type . . . . . . . . . . . . . . 58 10.53.5. The "enumeration" and "union" Types . . . . . . . . 58
10.53.6. The "instance-identifier" Type . . . . . . . . . . 59 10.53.6. The "identityref" Type . . . . . . . . . . . . . . 58
10.53.7. The "leafref" Type . . . . . . . . . . . . . . . . 59 10.53.7. The "instance-identifier" Type . . . . . . . . . . 59
10.53.8. The Numeric Types . . . . . . . . . . . . . . . . . 59 10.53.8. The "leafref" Type . . . . . . . . . . . . . . . . 59
10.53.9. The "string" Type . . . . . . . . . . . . . . . . . 61 10.53.9. The Numeric Types . . . . . . . . . . . . . . . . . 59
10.53.10. Derived Types . . . . . . . . . . . . . . . . . . . 62 10.53.10. The "string" Type . . . . . . . . . . . . . . . . . 61
10.53.11. Derived Types . . . . . . . . . . . . . . . . . . . 62
10.54. The 'typedef' Statement . . . . . . . . . . . . . . . . 63 10.54. The 'typedef' Statement . . . . . . . . . . . . . . . . 63
10.55. The 'unique' Statement . . . . . . . . . . . . . . . . . 63 10.55. The 'unique' Statement . . . . . . . . . . . . . . . . . 63
10.56. The 'units' Statement . . . . . . . . . . . . . . . . . 64 10.56. The 'units' Statement . . . . . . . . . . . . . . . . . 64
10.57. The 'uses' Statement . . . . . . . . . . . . . . . . . . 64 10.57. The 'uses' Statement . . . . . . . . . . . . . . . . . . 64
10.58. The 'value' Statement . . . . . . . . . . . . . . . . . 64 10.58. The 'value' Statement . . . . . . . . . . . . . . . . . 64
10.59. The 'when' Statement . . . . . . . . . . . . . . . . . . 64 10.59. The 'when' Statement . . . . . . . . . . . . . . . . . . 64
10.60. The 'yang-version' Statement . . . . . . . . . . . . . . 64 10.60. The 'yang-version' Statement . . . . . . . . . . . . . . 64
10.61. The 'yin-element' Statement . . . . . . . . . . . . . . 64 10.61. The 'yin-element' Statement . . . . . . . . . . . . . . 64
11. Mapping the Hybrid Schema to DSDL . . . . . . . . . . . . . . 65 11. Mapping the Hybrid Schema to DSDL . . . . . . . . . . . . . . 65
11.1. Generating RELAX NG Schemas for Various Document Types . 65 11.1. Generating RELAX NG Schemas for Various Document Types . 65
skipping to change at page 18, line 39 skipping to change at page 18, line 39
| <nma:error-app-tag> | 10.16 | 1 | | <nma:error-app-tag> | 10.16 | 1 |
| | | | | | | |
| <nma:error-message> | 10.17 | 1 | | <nma:error-message> | 10.17 | 1 |
| | | | | | | |
| @nma:if-feature | 10.22 | | | @nma:if-feature | 10.22 | |
| | | | | | | |
| @nma:implicit | 10.11, 10.7, 10.12 | | | @nma:implicit | 10.11, 10.7, 10.12 | |
| | | | | | | |
| <nma:input> | 8.1 | 4 | | <nma:input> | 8.1 | 4 |
| | | | | | | |
| <nma:instance-identifier> | 10.53.6 | 2 | | <nma:instance-identifier> | 10.53.7 | 2 |
| | | | | | | |
| @nma:key | 10.26 | | | @nma:key | 10.26 | |
| | | | | | | |
| @nma:leaf-list | 10.28 | | | @nma:leaf-list | 10.28 | |
| | | | | | | |
| @nma:leafref | 10.53.7 | | | @nma:leafref | 10.53.8 | |
| | | | | | | |
| @nma:mandatory | 10.8 | | | @nma:mandatory | 10.8 | |
| | | | | | | |
| @nma:max-elements | 10.28 | | | @nma:max-elements | 10.28 | |
| | | | | | | |
| @nma:min-elements | 10.28 | | | @nma:min-elements | 10.28 | |
| | | | | | | |
| @nma:module | 10.34 | | | @nma:module | 10.34 | |
| | | | | | | |
| <nma:must> | 10.35 | 3 | | <nma:must> | 10.35 | 3 |
skipping to change at page 43, line 21 skipping to change at page 43, line 21
used for augmenting the schema tree of another YANG module. If the used for augmenting the schema tree of another YANG module. If the
augmented module is not processed within the same mapping session, augmented module is not processed within the same mapping session,
the top-level 'augment' statement MUST be ignored. Otherwise, the the top-level 'augment' statement MUST be ignored. Otherwise, the
contents of the statement are added to the foreign module with the contents of the statement are added to the foreign module with the
namespace of the module where the 'augment' statement appears. namespace of the module where the 'augment' statement appears.
10.4. The 'base' Statement 10.4. The 'base' Statement
This statement is ignored as a substatement of 'identity' and handled This statement is ignored as a substatement of 'identity' and handled
within the 'identityref' type if it appears as a substatement of that within the 'identityref' type if it appears as a substatement of that
type definition, see Section 10.53.5. type definition, see Section 10.53.6.
10.5. The 'belongs-to' Statement 10.5. The 'belongs-to' Statement
This statement is not used since the processing of submodules is This statement is not used since the processing of submodules is
always initiated from the main module, see Section 10.24. always initiated from the main module, see Section 10.24.
10.6. The 'bit' Statement 10.6. The 'bit' Statement
This statement is handled within the "bits" type, see This statement is handled within the "bits" type, see
Section 10.53.3. Section 10.53.4.
10.7. The 'case' Statement 10.7. The 'case' Statement
This statement is mapped to <rng:group> or <rng:interleave> element, This statement is mapped to <rng:group> or <rng:interleave> element,
depending on whether the statement belongs to an definition of an RPC depending on whether the statement belongs to an definition of an RPC
operation or not. If the argument of a sibling 'default' statement operation or not. If the argument of a sibling 'default' statement
equals to ARGUMENT, @nma:implicit attribute with the value of "true" equals to ARGUMENT, @nma:implicit attribute with the value of "true"
MUST be added to that <rng:group> or <rng:interleave> element. The MUST be added to that <rng:group> or <rng:interleave> element. The
@nma:implicit attribute MUST NOT be used for nodes at the top-level @nma:implicit attribute MUST NOT be used for nodes at the top-level
of a non-default case (see Section 7.9.3 in [RFC6020]). of a non-default case (see Section 7.9.3 in [RFC6020]).
skipping to change at page 50, line 48 skipping to change at page 50, line 48
<rng:element name="yam:foliage" nma:leaf-list="true" <rng:element name="yam:foliage" nma:leaf-list="true"
nma:ordered-by="user" nma:ordered-by="user"
nma:min-elements="3" nma:max-elements="6378"> nma:min-elements="3" nma:max-elements="6378">
<rng:data type="string"/> <rng:data type="string"/>
</rng:element> </rng:element>
</rng:oneOrMore> </rng:oneOrMore>
10.29. The 'length' Statement 10.29. The 'length' Statement
This statement is handled within the "string" type, see This statement is handled within the "string" type, see
Section 10.53.9. Section 10.53.10.
10.30. The 'list' Statement 10.30. The 'list' Statement
This statement is mapped exactly as the 'leaf-list' statement, see This statement is mapped exactly as the 'leaf-list' statement, see
Section 10.28. The only difference is that the @nma:leaf-list Section 10.28. The only difference is that the @nma:leaf-list
annotation either MUST NOT be present or MUST have the value of annotation either MUST NOT be present or MUST have the value of
"false". "false".
When mapping the substatements of 'list', the order of children of When mapping the substatements of 'list', the order of children of
the list element MUST be specified so that list keys, if there are the list element MUST be specified so that list keys, if there are
skipping to change at page 53, line 40 skipping to change at page 53, line 40
is mapped to is mapped to
<nma:must assert="current()&lt;=../dhcp:max-lease-time"> <nma:must assert="current()&lt;=../dhcp:max-lease-time">
<nma:error-message> <nma:error-message>
The default-lease-time must be less than max-lease-time The default-lease-time must be less than max-lease-time
</nma:error-message> </nma:error-message>
</nma:must> </nma:must>
10.36. The 'namespace' Statement 10.36. The 'namespace' Statement
This statement is mapped in two ways: This statement is mapped simultaneously in two ways:
1. To the @xmlns:PREFIX attribute of the root <rng:grammar> element 1. To the @xmlns:PREFIX attribute of the root <rng:grammar> element
where PREFIX is the namespace prefix specified by the sibling where PREFIX is the namespace prefix specified by the sibling
'prefix' statement. ARGUMENT becomes the value of this 'prefix' statement. ARGUMENT becomes the value of this
attribute. attribute.
2. To the @ns attribute of PARENT, which is an embedded <rng: 2. To the @ns attribute of PARENT, which is an embedded <rng:
grammar> pattern. ARGUMENT becomes the value of this attribute. grammar> pattern. ARGUMENT becomes the value of this attribute.
10.37. The 'notification' Statement 10.37. The 'notification' Statement
skipping to change at page 54, line 43 skipping to change at page 54, line 43
authorship information. authorship information.
10.40. The 'output' Statement 10.40. The 'output' Statement
This statement is handled within the 'rpc' statement, see This statement is handled within the 'rpc' statement, see
Section 10.50. Section 10.50.
10.41. The 'path' Statement 10.41. The 'path' Statement
This statement is handled within the "leafref" type, see This statement is handled within the "leafref" type, see
Section 10.53.7. Section 10.53.8.
10.42. The 'pattern' Statement 10.42. The 'pattern' Statement
This statement is handled within the "string" type, see This statement is handled within the "string" type, see
Section 10.53.9. Section 10.53.10.
10.43. The 'position' Statement 10.43. The 'position' Statement
This statement is ignored. This statement is ignored.
10.44. The 'prefix' Statement 10.44. The 'prefix' Statement
This statement is handled within the sibling 'namespace' statement, This statement is handled within the sibling 'namespace' statement,
see Section 10.36, or within the parent 'import' statement, see see Section 10.36, or within the parent 'import' statement, see
Section 10.23. As a substatement of 'belongs-to' (in submodules), Section 10.23. As a substatement of 'belongs-to' (in submodules),
the 'prefix' statement is ignored. the 'prefix' statement is ignored.
10.45. The 'presence' Statement 10.45. The 'presence' Statement
This statement influences the mapping of the parent container This statement influences the mapping of the parent container
(Section 10.11): the parent container definition MUST be wrapped in (Section 10.11): the parent container definition MUST be wrapped in
<rng:optional>, regardless of its contents. See also Section 9.1.1. <rng:optional>, regardless of its contents. See also Section 9.1.1.
10.46. The 'range' Statement 10.46. The 'range' Statement
This statement is handled within numeric types, see Section 10.53.8. This statement is handled within numeric types, see Section 10.53.9.
10.47. The 'reference' Statement 10.47. The 'reference' Statement
This statement is mapped to <a:documentation> element and its text is This statement is mapped to <a:documentation> element and its text is
set to ARGUMENT prefixed with "See: ". set to ARGUMENT prefixed with "See: ".
10.48. The 'require-instance' Statement 10.48. The 'require-instance' Statement
This statement is handled within "instance-identifier" type This statement is handled within "instance-identifier" type
(Section 10.53.6). (Section 10.53.7).
10.49. The 'revision' Statement 10.49. The 'revision' Statement
The mapping uses only the most recent instance of the 'revision' The mapping uses only the most recent instance of the 'revision'
statement, i.e., one with the latest date in ARGUMENT, which statement, i.e., one with the latest date in ARGUMENT, which
specifies the current revision of the input YANG module [RFC6020]. specifies the current revision of the input YANG module [RFC6020].
This date SHOULD be recorded, together with the name of the YANG This date SHOULD be recorded, together with the name of the YANG
module, in the corresponding Dublin Core <dc:source> element (see module, in the corresponding Dublin Core <dc:source> element (see
Section 10.34), for example in this form: Section 10.34), for example in this form:
skipping to change at page 57, line 26 skipping to change at page 57, line 26
| uint8 | unsignedByte | 8-bit unsigned integer value | | uint8 | unsignedByte | 8-bit unsigned integer value |
| | | | | | | |
| uint16 | unsignedShort | 16-bit unsigned integer value | | uint16 | unsignedShort | 16-bit unsigned integer value |
| | | | | | | |
| uint32 | unsignedInt | 32-bit unsigned integer value | | uint32 | unsignedInt | 32-bit unsigned integer value |
| | | | | | | |
| uint64 | unsignedLong | 64-bit unsigned integer value | | uint64 | unsignedLong | 64-bit unsigned integer value |
| | | | | | | |
| string | string | character string | | string | string | character string |
| | | | | | | |
| boolean | boolean | "true" or "false" |
| | | |
| binary | base64Binary | binary data in base64 encoding | | binary | base64Binary | binary data in base64 encoding |
+-----------+---------------+--------------------------------+ +-----------+---------------+--------------------------------+
Table 4: YANG built-in datatypes with equivalents in the W3C XML Table 4: YANG built-in datatypes with equivalents in the W3C XML
Schema Type Library Schema Type Library
Two important datatypes of the XSD datatype library - "dateTime" and Two important datatypes of the XSD datatype library - "dateTime" and
"anyURI" - are not built-in types in YANG but instead are defined as "anyURI" - are not built-in types in YANG but instead are defined as
derived types in the standard modules [RFC6021]: "date-and-time" in derived types in the standard modules [RFC6021]: "date-and-time" in
the "ietf-yang-types" module and "uri" in the "ietf-inet-types" the "ietf-yang-types" module and "uri" in the "ietf-inet-types"
skipping to change at page 58, line 5 skipping to change at page 57, line 48
to-DSDL mapping SHOULD detect these derived types in source YANG to-DSDL mapping SHOULD detect these derived types in source YANG
modules and map them to "dateType" and "anyURI", respectively. modules and map them to "dateType" and "anyURI", respectively.
Details about the mapping of individual YANG built-in types are given Details about the mapping of individual YANG built-in types are given
in the following subsections. in the following subsections.
10.53.1. The "empty" Type 10.53.1. The "empty" Type
This type is mapped to <rng:empty/>. This type is mapped to <rng:empty/>.
10.53.2. The "boolean" and "binary" Types 10.53.2. The "boolean" Type
These two built-in types do not allow any restrictions and are mapped This built-in type does not allow any restrictions and is mapped to
simply by inserting <rng:data> element whose @type attribute is set the following XML fragment:
to ARGUMENT mapped according to Table 4 above.
10.53.3. The "bits" Type <rng:choice>
<rng:value>true</rng:value>
<rng:value>false</rng:value>
</rng:choice>
Note that the XSD "boolean" type cannot be used here because it
allows, unlike YANG, an alternative numeric representation of boolean
values: 0 for "false" and 1 for "true".
10.53.3. The "binary" Type
This built-in type does not allow any restrictions and is mapped
simply by inserting <rng:data> element whose @type attribute value is
set to "base64Binary" (see also Table 4).
10.53.4. The "bits" Type
This type is mapped to <rng:list> and for each 'bit' substatement the This type is mapped to <rng:list> and for each 'bit' substatement the
following XML fragment is inserted as a child of <rng:list>: following XML fragment is inserted as a child of <rng:list>:
<rng:optional> <rng:optional>
<rng:value>bit_name</rng:value> <rng:value>bit_name</rng:value>
</rng:optional> </rng:optional>
where bit_name is the name of the bit as found in the argument of a where bit_name is the name of the bit as found in the argument of a
'bit' substatement. 'bit' substatement.
10.53.4. The "enumeration" and "union" Types 10.53.5. The "enumeration" and "union" Types
These types are mapped to the <rng:choice> element. These types are mapped to the <rng:choice> element.
10.53.5. The "identityref" Type 10.53.6. The "identityref" Type
This type is mapped to the following named pattern reference: This type is mapped to the following named pattern reference:
<rng:ref name="__PREFIX_BASE"/> <rng:ref name="__PREFIX_BASE"/>
where PREFIX:BASE is the qualified name of the identity appearing in where PREFIX:BASE is the qualified name of the identity appearing in
the argument of the 'base' substatement. the argument of the 'base' substatement.
For example, assume that module "des" in Section 10.21 contains the For example, assume that module "des" in Section 10.21 contains the
following leaf definition: following leaf definition:
skipping to change at page 58, line 44 skipping to change at page 59, line 4
the argument of the 'base' substatement. the argument of the 'base' substatement.
For example, assume that module "des" in Section 10.21 contains the For example, assume that module "des" in Section 10.21 contains the
following leaf definition: following leaf definition:
leaf foo { leaf foo {
type identityref { type identityref {
base crypto:crypto-alg; base crypto:crypto-alg;
} }
} }
This leaf would then be mapped to the following element pattern: This leaf would then be mapped to the following element pattern:
<element name="des:foo"> <element name="des:foo">
<ref name="__crypto_crypto-alg"/> <ref name="__crypto_crypto-alg"/>
</element> </element>
10.53.6. The "instance-identifier" Type 10.53.7. The "instance-identifier" Type
This type is mapped to <rng:data> element with @type attribute set to This type is mapped to <rng:data> element with @type attribute set to
"string". In addition, an empty <nma:instance-identifier> element "string". In addition, an empty <nma:instance-identifier> element
MUST be inserted as a child of PARENT. MUST be inserted as a child of PARENT.
The argument of the 'require-instance' substatement, if it exists, The argument of the 'require-instance' substatement, if it exists,
becomes the value of the @require-instance attribute of the <nma: becomes the value of the @require-instance attribute of the <nma:
instance-identifier> element. instance-identifier> element.
10.53.7. The "leafref" Type 10.53.8. The "leafref" Type
This type is mapped exactly as the type of the leaf given in the This type is mapped exactly as the type of the leaf given in the
argument of 'path' substatement. However, if the type of the argument of 'path' substatement. However, if the type of the
referred leaf defines a default value, this default value MUST be referred leaf defines a default value, this default value MUST be
ignored by the mapping. ignored by the mapping.
In addition, @nma:leafref attribute MUST be added to PARENT. The In addition, @nma:leafref attribute MUST be added to PARENT. The
argument of the 'path' substatement, translated according to argument of the 'path' substatement, translated according to
Section 9.3, is set as the value of this attribute. Section 9.3, is set as the value of this attribute.
10.53.8. The Numeric Types 10.53.9. The Numeric Types
YANG built-in numeric types are "int8", "int16", "int32", "int64", YANG built-in numeric types are "int8", "int16", "int32", "int64",
"uint8", "uint16", "uint32", "uint64" and "decimal64". They are "uint8", "uint16", "uint32", "uint64" and "decimal64". They are
mapped to <rng:data> element with @type attribute set to ARGUMENT mapped to <rng:data> element with @type attribute set to ARGUMENT
translated according to Table 4 above. translated according to Table 4 above.
An exception is the "decimal64" type, which is mapped to the An exception is the "decimal64" type, which is mapped to the
"decimal" type of the XSD datatype library. Its precision and number "decimal" type of the XSD datatype library. Its precision and number
of fractional digits are controlled with the following facets, which of fractional digits are controlled with the following facets, which
MUST always be present: MUST always be present:
skipping to change at page 61, line 21 skipping to change at page 61, line 21
<rng:param name="minInclusive">42</rng:param> <rng:param name="minInclusive">42</rng:param>
<rng:param name="maxInclusive">42</rng:param> <rng:param name="maxInclusive">42</rng:param>
</rng:data> </rng:data>
<rng:data type="int"> <rng:data type="int">
<rng:param name="minInclusive">100</rng:param> <rng:param name="minInclusive">100</rng:param>
</rng:data> </rng:data>
</rng:choice> </rng:choice>
See Section 9.2.2 for further details on mapping the restrictions. See Section 9.2.2 for further details on mapping the restrictions.
10.53.9. The "string" Type 10.53.10. The "string" Type
This type is mapped to <rng:data> element with the @type attribute This type is mapped to <rng:data> element with the @type attribute
set to "string". set to "string".
The 'length' restriction is handled analogically to the 'range' The 'length' restriction is handled analogically to the 'range'
restriction for the numeric types (Section 10.53.8): restriction for the numeric types (Section 10.53.9):
If the length expression has just a single range, then If the length expression has just a single range, then
o if the length range consists of a single number LENGTH, the o if the length range consists of a single number LENGTH, the
following datatype facet is inserted: following datatype facet is inserted:
<rng:param name="length">LENGTH</rng:param>. <rng:param name="length">LENGTH</rng:param>.
o Otherwise the length range is of the form LO..HI, i.e., it o Otherwise the length range is of the form LO..HI, i.e., it
consists of both the lower and upper bound. The following two consists of both the lower and upper bound. The following two
skipping to change at page 62, line 38 skipping to change at page 62, line 38
<rng:param name="length">1</rng:param> <rng:param name="length">1</rng:param>
<rng:param name="pattern">[A-Z][a-z]*</rng:param> <rng:param name="pattern">[A-Z][a-z]*</rng:param>
</rng:data> </rng:data>
<rng:data type="string"> <rng:data type="string">
<rng:param name="minLength">3</rng:param> <rng:param name="minLength">3</rng:param>
<rng:param name="maxLength">8</rng:param> <rng:param name="maxLength">8</rng:param>
<rng:param name="pattern">[A-Z][a-z]*</rng:param> <rng:param name="pattern">[A-Z][a-z]*</rng:param>
</rng:data> </rng:data>
</rng:choice> </rng:choice>
10.53.10. Derived Types 10.53.11. Derived Types
If the 'type' statement refers to a derived type, it is mapped in one If the 'type' statement refers to a derived type, it is mapped in one
of the following ways depending on whether it contains any of the following ways depending on whether it contains any
restrictions as its substatements: restrictions as its substatements:
1. Without restrictions, the 'type' statement is mapped simply to 1. Without restrictions, the 'type' statement is mapped simply to
the <rng:ref> element, i.e., a reference to a named pattern. If the <rng:ref> element, i.e., a reference to a named pattern. If
the RELAX NG definition of this named pattern has not been added the RELAX NG definition of this named pattern has not been added
to the hybrid schema yet, the corresponding type definition MUST to the hybrid schema yet, the corresponding type definition MUST
be found and its mapping installed as a subelement of either the be found and its mapping installed as a subelement of either the
skipping to change at page 63, line 29 skipping to change at page 63, line 29
without restrictions in at least one of the input modules. In this without restrictions in at least one of the input modules. In this
case, the named pattern definition becomes a child of either the root case, the named pattern definition becomes a child of either the root
or an embedded <rng:grammar> element, depending on whether the or an embedded <rng:grammar> element, depending on whether the
'typedef' statement appears at the top level of a YANG module or not. 'typedef' statement appears at the top level of a YANG module or not.
The name of this named pattern definition is set to ARGUMENT mangled The name of this named pattern definition is set to ARGUMENT mangled
according to the rules specified in Section 9.2. according to the rules specified in Section 9.2.
Whenever a derived type is used with additional restrictions, the Whenever a derived type is used with additional restrictions, the
ancestor built-in type for the derived type is used instead with ancestor built-in type for the derived type is used instead with
restrictions (facets) that are a combination of all restrictions restrictions (facets) that are a combination of all restrictions
specified along the type derivation chain. See Section 10.53.10 for specified along the type derivation chain. See Section 10.53.11 for
further details and an example. further details and an example.
An implementation MAY offer the option of recording all 'typedef' An implementation MAY offer the option of recording all 'typedef'
statements as named patterns in the output RELAX NG schema even if statements as named patterns in the output RELAX NG schema even if
they are not referenced. This is useful for mapping YANG "library" they are not referenced. This is useful for mapping YANG "library"
modules containing only 'typedef' and/or 'grouping' statements. modules containing only 'typedef' and/or 'grouping' statements.
10.55. The 'unique' Statement 10.55. The 'unique' Statement
This statement is mapped to @nma:unique attribute. ARGUMENT MUST be This statement is mapped to @nma:unique attribute. ARGUMENT MUST be
 End of changes. 26 change blocks. 
37 lines changed or deleted 49 lines changed or added

This html diff was produced by rfcdiff 1.40. The latest version is available from http://tools.ietf.org/tools/rfcdiff/