-
Notifications
You must be signed in to change notification settings - Fork 9
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Metaschema Metapath minimal feature set / PoC #13
Comments
Lumley's specific advice:
In his email he is more explicit on how to approach next steps as well. |
Suggested by experts on XSL-List (JL and one or two others) this looks like a good way forward. Using the Using a stripped down EBNF we can also produce a smaller parser. Even before we do that, we could use an additional filter (function) with a syntax check, to define the permissible subset. |
https://www.bottlecaps.de/rr/ui provides an XPath 1.0 EBNF as well as some nice tooling. |
April 8 Update Much progress on this in the last few days:
Suggest we look at acceptance criteria to determine next steps. |
This is working. The grammar looks sound, with only a single remaining known question:
This is not a disabling bug; it only means the grammar includes a production it does not need. We can filter out the syntax at the application level if we need to. If we resolve this question, decide not to resolve it, or move it to a new Issue, we can close this Issue, since except for datatype support (now being tracked in usnistgov/metaschema#50), this work item is otherwise complete for a first phase. @david-waltermire-nist what say you? Tracked by usnistgov/OSCAL#633. |
This Issue has been addressed to the extent implementation is currently planned. Specification of Metapath needs another Issue. This one can be closed. |
User Story:
Under usnistgov/metaschema#39 we are working on constraints definition and support for constraints checking in Metaschema.
Our initial intent is to shortcut the problem of addressing nodes (for assertion of constraints) by using an XPath subset, which we can later extend or generalize.
Goals:
For this Issue we need to stand up a minimal PoC of an expression language supporting basic addressing in the context of Metaschema.
Starting with a small subset of XPath makes sense. It needs to be able to support at least basic traversal and value testing, e.g.
verse[@type='quatrain']/line[@feet='5']
Dependencies:
This issue is a dependency for #12 and hence for usnistgov/metaschema#39 as well.
An end-point dependency for this Issue is a boundary around the feature set for the addressing syntax. We will start small and work up.
Prior art
We can save work by doing this right, probably with a grammar for our syntax.
David Carlisle library parsing XQuery: https://davidcarlisle.github.io/xq2xml/
XForms 1.4 has a parser for XPath 1.0 in XSLT: https://sourceforge.net/projects/xsltforms/
Email from John Lumley to XSL-List Re: [xsl] Parsing XPath in XSLT? March 26 2020
Acceptance Criteria
A fully working solution is not an acceptance criterion for this Issue!
The text was updated successfully, but these errors were encountered: