From 38bd81e9508370ee750b6c891374c1ee2fc34702 Mon Sep 17 00:00:00 2001 From: Dave Waltermire Date: Thu, 11 Jul 2024 08:59:58 -0400 Subject: [PATCH] Added support for prefix to namespace bindings for use in Metapath for supporting multiple models and Metapath types and functions with colliding names. --- .../metaschema-module-constraints.xml | 62 +++++++++++++------ .../metaschema-module-metaschema.xml | 22 +++++++ 2 files changed, 64 insertions(+), 20 deletions(-) diff --git a/schema/metaschema/metaschema-module-constraints.xml b/schema/metaschema/metaschema-module-constraints.xml index c91a1e34..c0084ee7 100644 --- a/schema/metaschema/metaschema-module-constraints.xml +++ b/schema/metaschema/metaschema-module-constraints.xml @@ -5,37 +5,43 @@ - - - Unique Module Short Names + + + Index Module Short Names Ensures that the current and all imported modules have a unique short name. + + Require Version for Top-Level Modules + A top-level module, a module that is not marked as @abstract='yes', must have a version specified. + Unless marked as @abstract='yes', a Metaschema module (or an imported module) should have a version. + + + Require Root Assembly for Top-Level Modules + A top-level module, a module that is not marked as @abstract='yes', must have at least one assembly with a root-name. + Unless marked as @abstract='yes', a Metaschema module (or an imported module) should have at least one assembly with a root-name. + + + Require Unique Namespace Entries + Ensures that all declared namespace entries are unique. + + + + + Require Unique Namespace Entry Prefixes + Ensures that all declared namespace entries have a unique prefix. + + - - - - - Require Version for Top-Level Modules - A top-level module, a module that is not marked as @abstract='yes', must have a version specified. - Unless marked as @abstract='yes', a Metaschema module (or an imported module) should have a version. - - - Require Root Assembly for Top-Level Modules - A top-level module, a module that is not marked as @abstract='yes', must have at least one assembly with a root-name. - Unless marked as @abstract='yes', a Metaschema module (or an imported module) should have at least one assembly with a root-name. - - - - + Import is Resolvable Ensure each import has a resolvable @href. Unable to access a Metaschema module at '{{ resolve-uri(@href) }}'. - + Import is Resolvable Ensure each import is a Metaschema module. Unable the resource at '{{ resolve-uri(@href) }}' is not a Metaschema module. @@ -43,4 +49,20 @@ + + + + + Require Unique Namespace Entries + Ensures that all declared namespace entries are unique. + + + + + Require Unique Namespace Entry Prefixes + Ensures that all declared namespace entries have a unique prefix. + + + + \ No newline at end of file diff --git a/schema/metaschema/metaschema-module-metaschema.xml b/schema/metaschema/metaschema-module-metaschema.xml index 0cdd5915..0b9c143d 100644 --- a/schema/metaschema/metaschema-module-metaschema.xml +++ b/schema/metaschema/metaschema-module-metaschema.xml @@ -52,6 +52,9 @@ A relative or absolute URI for retrieving an out-of-line Metaschema definition. + + + object-type @@ -183,6 +186,21 @@ + + Metapath Namespace Declaration + Assigns a Metapath namespace to a prefix for use in a Metapath expression in a lexical qualified name. + namespace + + Metapath Namespace URI + The namespace URI to bind to the prefix. + + + Metapath Namespace Prefix + The prefix that is bound to the namespace. + + + + Inline Assembly Definition define-assembly @@ -1302,6 +1320,10 @@ Defines constraint rules to be applied to an existing set of Metaschema module-based models. metaschema-meta-constraints + + + +