Skip to content
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

Implement xml-behavior feature in metaschema #468

Closed
4 tasks
wendellpiez opened this issue Aug 15, 2019 · 4 comments
Closed
4 tasks

Implement xml-behavior feature in metaschema #468

wendellpiez opened this issue Aug 15, 2019 · 4 comments
Assignees
Labels
enhancement Scope: Metaschema Issues targeted at the metaschema pipeline Scope: Modeling Issues targeted at development of OSCAL formats User Story

Comments

@wendellpiez
Copy link
Contributor

wendellpiez commented Aug 15, 2019

User Story:

We have designed but not yet built out a feature to permit groupings of fields within assemblies to be made explicit in the XML. By default, a metaschema permits a sequence of fields or assemblies to be given within their parent assembly, with the metaschema available to disambiguate ordering among siblings. For XML data this should be the usual case.

However when `xml-behavior='GROUPED`` is given, on the XML side a wrapping element should be introduced.

So, for

<model>
  <field name="prop" min-occurs='unbounded'>
    <group-as name="properties" xml-behavior='GROUPED'/>
  </field>
</model>

instead of permitting

<prop>one</prop>
<prop>two</prop>

this should specify

<properties>
  <prop>one</prop>
  <prop>two</prop>
</properties>

i.e. a grouping element is given explicitly.

Goals:

{A clear and concise description of what you want to happen. This should be outcome focused. Include concise description of any alternative solutions or features you've considered. Feel free to include screenshots or examples about the feature request here.}

Dependencies:

Note that this impacts:

  • XSD generation
  • XML to JSON conversion
  • JSON to XML converion

Acceptance Criteria

  • The XML behavior functionality GROUPED can be demonstrated in demo and/or actual metaschemas. " (UNGROUPED is the default and the way things are working currently.)
  • All OSCAL website and readme documentation affected by the changes in this issue have been updated. Changes to the OSCAL website can be made in the docs/content directory of your branch.
  • A Pull Request (PR) is submitted that fully addresses the goals of this User Story. This issue is referenced in the PR.
  • The CI-CD build process runs without any reported errors on the PR. This can be confirmed by reviewing that all checks have passed in the PR.

{The items above are general acceptance criteria for all User Stories. Please describe anything else that must be completed for this issue to be considered resolved.}

@david-waltermire david-waltermire added this to the OSCAL 1.0 Milestone 2 milestone Sep 4, 2019
@david-waltermire david-waltermire added Scope: Modeling Issues targeted at development of OSCAL formats Scope: Metaschema Issues targeted at the metaschema pipeline labels Sep 4, 2019
@david-waltermire
Copy link
Contributor

@wendellpiez We should be sure that this doesn't drive unintended changes to the XML schema for our existing models. We want to avoid changes that are unnecessary.

@wendellpiez
Copy link
Contributor Author

wendellpiez commented Sep 4, 2019

Rolling into this Issue:

  1. We have to implement not only group-as/@in-xml (GROUPED|UNGROUPED) but also field[@as-type='markup-multiline']/@in-xml (UNWRAPPED|WITH-WRAPPER)
  2. Additionally, build out not only the schemas and Schematron and converters but also
    • Schema documentation
    • Schema model maps

This last may require some design work.

In PR #484 we currently have the implementation of @in-xml on markup multiline fields. Working on group-as behavior.

@iMichaela
Copy link
Contributor

9/5/2019

Issue was implemented and is part of PR #484 and needs to be tested (we need to develop unit tests)

@david-waltermire
Copy link
Contributor

This was completed in PR #492.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement Scope: Metaschema Issues targeted at the metaschema pipeline Scope: Modeling Issues targeted at development of OSCAL formats User Story
Projects
None yet
Development

No branches or pull requests

3 participants