4.6 Parser Obligations
4.6 Parser Obligations
The obligations of parsers and tools that process RUML or RUML-EXT files are defined in the chapters they concern and catalogued, with references to those chapters, in Chapter 8; the parser obligations of the capability system are in Chapter 8.7. This section adds the order in which a parser reads a file. That order cannot be observed from outside, so it has no rule id.
The order of the capability entries of a node is defined in Chapter 4.3; at the root, it is not significant.
Early Reading of the capabilities Array
A parser MUST read and evaluate the capabilities array before processing the rulemap or
other structural fields of the file. This ensures fail-fast behavior for required: true
capabilities.
Recommended Parse Order
- Read and validate
$formatand$specVersion - Read the
capabilitiesarray and check whether each capability is known - On unknown
required: truecapability: abort - Process remaining fields
Note on Tool Implementations
Validation Tools
A validation tool MUST check every rule of the layers schema and semantic in
Chapter 8 (Rule CAP-28CAP-28 A validation tool MUST check every rule of this catalogue whose layer is schema or semantic.). A tool that only checks the core structure
and ignores the capabilities system is not a complete RUML validator.