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
Evaluation of Constraints of a Rule inconsistent #193
Comments
If a Rule has a Compound Constraint, then the two Atomic constraints (in the left/right operand) are not considered constraints of the Rule (but of the Compound constraint itself.). An ODRL Evaluator will know (from the type of the left/right operands) if they are dealing with a Compound Constraint or not. RE: Footnote: If you look at Example 16: http://w3c.github.io/poe/model/#constraint-compound Does that make sense? |
@riannella I have a serialization-driven view on that issue.
If we fix the serialization issue a statement about such "standalone Rule"s should be made and we must defined that Rules of a leftOperand or a rightOperand MUST NOT be associated with a Rule by a constraint relationship. Else the contradiction outlined above applies. |
if "standalone" constraints would cause issues with ODRL's legacy XML/JSON serializations, so would any other ODRL concept. |
The ODRL 2.0/.1 XML and JSON reflected a user's view on the model design: a policy is a wrapper/container of one to many rules. Permissions, prohibitions, duties, constraints - they all have their specific structure inside the container. This raises the questions:
|
We have documented how XML serialisations deal with compound constraints here: (Yes, I know, we need to s/Constraint Relations/Compound Constraints/) Is there more we can add there? |
Well, the #constraint-relations section shows s as children of policy, but the definition of (below 5.1) does not list constraint as supported element. |
@riannella the /parts/xml.html was updated but not the index.html! Having a look at the commits:
I suggest: |
For XML it looks like we have a solution - but not for JSON(-LD): Examples 17 and 18 in the Information Model document's https://w3c.github.io/poe/model/#constraint-compound section show a "constraint" at the top level of the object. The object claims by its
This shows no :Policy (and no :Offer etc) in the rdfs:Domain, therefore Examples 17 and 18 are unfortunately invalid. So we could do something similar like for XML, it would even be better to have a definition that only a constraint referenced by a Compound Constraints may be a property of Policy - may be possible by some tricky RDF/OWL. |
Updated xml narrative (and index.html now) We do also support an Atomic Constraint at the policy-level that is there only to be referenced by an (atomic) constraint in a Rule. Eg the same atomic constraint in 2 rules. commit: dc4065d |
@riannella by which feature of ODRL may an Atomic Constraint of a Rule reference an Atomic Constraint?
If yes: how to make this work in XML? |
Yes. A Rule (ie Duty) can have a uid, which is then referenced as above. In XML, you can use the id/idref attributes |
I refer to the Information Model document of 13 June - http://w3c.github.io/poe/model
How to solve that:
A logically ok approach would be: "The Rule becomes effective if all of its Constraints are satisfied, excluded are Constraints being an operand of a Compound Constraint of this Rule." But such a design would be hard to process: first all constraints are listed, then iterated and by evaluating Compound Constraints all Constraints being an operand are removed from the list. Then all the remaining Constraints are finally evaluated.
A helper would be a new boolean property "isCompoundOperand" of Constraint, default value false. It should be set to true for Constraints which are a leftOperand or rightOperand of a Compound Constraint only. The definition used for Rule could be: "The Rule becomes effective if all of its Constraints are satisfied, excluded are Constraints being a Compound Operand".
Footnote: currently the specification of Compound Constraint doesn't tell anything about to which Rule the Compound Constraint and its Atomic Constraints must/should be applied. It would be valid if CC1 is a constraint of Rule1, AC1 of Rule2 and AC2 of Rule3.
First: do we really support such a wide flexibility?
And: if yes I see the use of isCompoundOperand as a MUST, a processor having to find out if a constraint of a Rule is an operand of a Compound Constraint anywhere in the ODRL universe would be impossible.
The text was updated successfully, but these errors were encountered: