-
Notifications
You must be signed in to change notification settings - Fork 88
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
base: dev
Are you sure you want to change the base?
add <constraintDecl>
#2594
Conversation
a working, if not ideal, state
P5/Source/Specs/constraintDecl.xml
Outdated
<classRef key="model.identEquiv"/> | ||
<classRef key="model.descLike"/> | ||
</alternate> | ||
<anyElement/> <!-- typically <sch:ns> elements --> |
There was a problem hiding this comment.
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.
There was a problem hiding this comment.
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.
There was a problem hiding this comment.
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!
There was a problem hiding this 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"/> |
There was a problem hiding this comment.
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.
There was a problem hiding this comment.
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> |
There was a problem hiding this comment.
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>
Added
<constraintDecl>
element.