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

TemplateRule parameters with OR #3

Open
MatthiasWeise opened this issue Apr 26, 2017 · 5 comments
Open

TemplateRule parameters with OR #3

MatthiasWeise opened this issue Apr 26, 2017 · 5 comments

Comments

@MatthiasWeise
Copy link

MatthiasWeise commented Apr 26, 2017

We have troubles checking statements like the following:
<TemplateRule Parameters="Set[Value]='Pset_SpaceCommon' AND Property[Value]='Category' AND (Value[Value]='Betriebstechnische Anlagen' OR Value[Value]='Sonstige Nutzungen' OR Value[Value]='Verkehrserschl. und -sicherung' OR Value[Value]='Wohnen und Aufenthalt')"/>

This is working for instance:
<TemplateRule Parameters="Set[Value]='Pset_SpaceCommon' AND PropertyName[Value]='Category' AND Value[Value]='Betriebstechnische Anlagen'"/>

It seems that configuring same RuleIDs in the TemplateRule parameters is the reason.

@CBenghi
Copy link
Member

CBenghi commented Apr 26, 2017

@MatthiasWeise I'll look into this.

@CBenghi
Copy link
Member

CBenghi commented Apr 26, 2017

@MatthiasWeise would you be able to provide an mvdxml + ifc for this to be made into a test case?

@CBenghi
Copy link
Member

CBenghi commented May 9, 2017

@MatthiasWeise Looking into this still. I've got a question for you.
the documentation states the following rule in the grammar

boolean_term
: (( parameter ( metric )? | metric ) operator ( value | parameter ( metric )? ) ) |
( LPAREN boolean_expression RPAREN );

it seems to me that a statement such as [Size] would match parameter ( metric )? | metric.

If this is correct a whole boolean_term could look like [Size]=2; but would it make sense? What entity is that metric referring to?

@CBenghi
Copy link
Member

CBenghi commented May 9, 2017

Should both sides be value | parameter ( metric )?

@MatthiasWeise
Copy link
Author

The grammar introduced by mvdXML 1.1 is used by mvd:TemplateRule.Parameters, but also mvd:Constraint.Expression.
The grammar for Expression used by mvdXML 1.0 was: {Metric}{Operator}{Benchmark} (Expression is attached to a Rule that defines a RuleID = parameter, which is implicitly used in the expression; [Size]=2 would make sense in an expression, but I would recommend to add the parameter to any logical expression).
The option was mainly added to be "backward compatible" with mvdXML 1.0.

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