Closed aj-stein-nist closed 8 months ago
Perhaps we could add a constraint in the Metaschema syntax model to warning (level="WARNING") about this issue for all flag, field, and assembly names that match a reserved keyword?
Per conversation with @david-waltermire and others during a community sync meeting, I am ok with:
@name
define-flag
, define-field
, and perhaps the value of use-name
. Am I missing anything else?If I got this correctly, I can move on this quickly. Is this concern and the Metaschema changes 1.0 worthy? The higher-level aliasing concern, which we all agreed is not 1.0 worth is another issue and I can definitely open up another issue for that later today.
User Story:
As a Metaschema developer, in order to ensure I do not make models with flag names, I would like constraints for the core Metaschema syntax modules to warn me as a developer I should not use a Metapath terminal symbol as a field or flag name that cause grammar-based parsing errors in my tool.
For example, when updating a tutorial in https://github.com/usnistgov/metaschema/pull/539, I errantly created a flag with the name of namespace.
ANTLR or othr systems build on context-free grammars, and the tool that leverage them, will fail. Metapath 1.x is targeting a subset of the XPath 3.0 specification, and A.2.2 defines "namespace" and other non-delimiting terminal symbols, with the same effect in Metapath, that will lead to runtime compile errors because the use of a such a symbol that should only be in the grammar to be extent in the document instance being parsed.
Goals:
Dependencies:
N/A
Acceptance Criteria