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 <constraintDecl> #2594

Open
wants to merge 6 commits into
base: dev
Choose a base branch
from
Open

add <constraintDecl> #2594

wants to merge 6 commits into from

Conversation

sydb
Copy link
Member

@sydb sydb commented Sep 20, 2024

Added <constraintDecl> element.

<classRef key="model.identEquiv"/>
<classRef key="model.descLike"/>
</alternate>
<anyElement/> <!-- typically <sch:ns> elements -->
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I would suggest making this optional, in case one only wanted to use <constraintDecl/> to declare a query language binding and nothing else.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think you are quite right.
Good catch.
Hope to make change today.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Not just, BTW, in case user wants no <sch:ns>, but it would be appropriate to let poor user have 2 or more of them!

Copy link
Contributor

@raffazizzi raffazizzi left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested different content models for contraintDecl and encodingDesc

<desc versionDate="2023-03-09" xml:lang="en">contains declarations pertaining to formal constraints expressed elsewhere in <gi>constraintSpec</gi> elements</desc>
<classes>
<memberOf key="att.global"/>
<memberOf key="model.encodingDescPart"/>
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This won't do if we want to make this element only be used once, as #2330 required.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We only want 1 <constraintDecl> per scheme (rather than allowing multiples and using decarable/decaring mechanism), but we still have to allow multiples in case there is more than one scheme. E.g.

<constraintDecl scheme="schematron" queryBinding="xslt3"/>
<constraintDecl scheme="prolog">
  $globalVarOne=FALSE;
  $globalVarTwo=17;
</constraintDecl>

(I have no idea if that is syntactically correct PROLOG; I kinda doubt it. But it does not matter for our purposes.)
That said, it might be a good idea to have a <constraintSpec> for <constraintDecl> that constrained use to only 1 per scheme. 😄

<alternate minOccurs="1" maxOccurs="unbounded">
<classRef key="model.encodingDescPart"/>
<classRef key="model.pLike"/>
</alternate>
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I would suggest interleaving a reference to an optional constraintDecl here.

<sequence preserveOrder="false">
      <alternate minOccurs="1" maxOccurs="unbounded">
       <classRef key="model.encodingDescPart"/>
        <classRef key="model.pLike"/>
      </alternate>
      <elementRef key="constraintDecl" minOccurs="0" maxOccurs="1"/>
    </sequence>

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants