Skip to content

Adjust SIC Core schematron rules for base vs. sub-attribute presence - #3

Merged
pmai merged 2 commits into
mainfrom
copilot/adjust-schematron-rules
May 22, 2026
Merged

pmai merged 2 commits into
mainfrom
copilot/adjust-schematron-rules

Conversation

Copilot AI commented May 22, 2026

Copy link
Copy Markdown
Contributor

The SIC Core schematron rules currently require both a base attribute and its corresponding mandatory sub-attributes, and they emit recommended-attribute warnings even when the base attribute is already present. This change makes grouped attributes mutually exclusive: either the base attribute is present, or the relevant sub-attributes are present.

  • Mandatory grouped attributes

    • Updated grouped mandatory checks for:
      • administrative.simulation-task
      • analysis.item-under-test
      • execution.model
      • execution.parameters
      • execution.tool
    • Each group now passes when either:
      • the base attribute exists, or
      • the required sub-attributes exist
    • Added explicit schematron assertions to reject mixed usage of base + mandatory sub-attributes in the same group.
  • Recommended grouped attributes

    • Updated grouped recommended checks so warnings fire only when neither the base attribute nor the relevant sub-attributes are present.
    • If a base attribute is present, related recommended sub-attribute warnings are suppressed for that group.
    • Applied this to grouped recommended families such as:
      • administrative product / project / request attributes
      • engineering task attributes
      • modeled entity attributes
      • implementation model / parameters / test-case / simulation-environment / simulation-integration
      • execution test-cases and tool settings
  • Rule shape

    • Preserved existing keyword vocabulary and fixes; only the schematron presence logic changed.
<sch:assert
  test="stc:ClassificationEntry[@keyword='administrative.simulation-task']
        or stc:ClassificationEntry[@keyword='administrative.simulation-task.name']">
  Missing mandatory Simulation Task Name attribute.
</sch:assert>

<sch:assert
  test="not(
    stc:ClassificationEntry[@keyword='administrative.simulation-task']
    and (
      stc:ClassificationEntry[@keyword='administrative.simulation-task.name']
      or stc:ClassificationEntry[@keyword='administrative.simulation-task.version']
      or stc:ClassificationEntry[@keyword='administrative.simulation-task.identifier']
    )
  )">
  Use either the Simulation Task base attribute or the mandatory Simulation Task sub-attributes, but not both.
</sch:assert>

@pmai
pmai marked this pull request as ready for review May 22, 2026 09:53
@pmai
pmai merged commit beaead7 into main May 22, 2026
4 checks passed
@pmai
pmai deleted the copilot/adjust-schematron-rules branch May 22, 2026 09:53
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants