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

Add identity constraints for xs:IDREF fields #373

Open
jmwaura opened this issue Apr 20, 2018 · 1 comment
Open

Add identity constraints for xs:IDREF fields #373

jmwaura opened this issue Apr 20, 2018 · 1 comment

Comments

@jmwaura
Copy link
Contributor

jmwaura commented Apr 20, 2018

The current ID references are unconstrained, potentially allowing improperly referenced entities to pass validation.
As an example, this is valid under the current schema:

<vip_object>
  <precinct id="precinctA14">
    ...
  </precinct>
  <polling_location id="pollinglocationA14">
    ...
  </polling_location>
  <street_segment id="streetsegmentA14.538">
    <precinct_id>pollinglocationA14</precinct_id>
    ...
  </street_segment>
</vip_object>

Ideally, the schema should use identity constraints (or some similar mechanism, if one exists) to ensure that the above example would fail validation.

@JDziurlaj
Copy link

We in the NIST CDF WG looked into this a while back, and ran into an issue with IDREFS. We have decided to go down the path of using Schematron instead. You can take a look at what a ruleset looks like here as well as an explainer.

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

No branches or pull requests

2 participants