Conditional Variable Expressions Conditional Variable Expressions Current Proposal

Conditional Variable Expressions

Conditional Variable Expressions • Current • Proposal – For <Derived. Variable>, a condition is an attribute of <Expression> to allow for the value to be set based on a condition – Follow the same condition pattern used for Content Units and Completion actions – For each Conditional. Expression, one specifies the Condition and the expression to use if that condition is met • Conditions can have Alternatives • • Delete condition attribute from <Derived. Variable. Expression. Type> Add a <choice to <Derived. Variable. Type> – Schema Changes – • <element name="Conditional. Expression" type="sdd-dd: Conditional. Derived. Variable. Type" max. Occurs="unbounded"/> Add New type – – – <complex. Type name="Conditional. Derived. Variable. Type"> <sequence> <element name="Condition" type="sdd-dd: Condition. Type"/> <element name="Expression" type="sdd-dd: Derived. Variable. Expression. Type"/> </sequence> </complex. Type>

Example <sdd-dd: Variables> <sdd-dd: Parameters> <sdd-dd: URIParameter id="Inst. Loc. Parm" default. Value="$(Install. Location"/> </sdd-dd: Parameters> <sdd-dd: Derived. Variable id="Install. Location"> <sdd-dd: Conditional. Expression> <sdd-dd: Condition> <sdd-dd: Resource. Constraint id=“UNIXCondition" resource. Ref="os" > < sdd-dd: Property. Constraint> < sdd-dd: Property. Name>OSType</sdd-dd: Property. Name> < sdd-dd: List. Of. Values> < sdd-dd: Value>AIX</sdd-dd: Value> < sdd-dd: Value>Solaris</sdd-dd: Value> < sdd-dd: Value>Linux</sdd-dd: Value> </ sdd-dd: List. Of. Values> </ sdd-dd: Property. Constraint> </ sdd-dd: Resource. Constraint> </sdd-dd: Condition> <sdd-dd: Expression>/usr/local</sdd-dd: Expression> </sdd-dd: Conditional. Expression> <sdd-dd: Condition> < sdd-dd: Resource. Constraint id=“Windows. Condition" resource. Ref="os" > < sdd-dd: Property. Constraint> < sdd-dd: Property. Name>OSType</sdd-dd: Property. Name> < sdd-dd: Value>Windows</sdd-dd: Value> </ sdd-dd: Property. Constraint> </ sdd-dd: Resource. Constraint> </sdd-dd: Condition> <sdd-dd: Expression>C: Program Files</sdd-dd: Expression> </sdd-dd: Conditional. Expression> </sdd-dd: Derived. Variable> </sdd-dd: Variables>

Completion Element

Completion • Current • Proposal – Multiple <Completion> element have to be defined if there are more than one condition in which the completion action is to be taken, i. e. an “or” condition. – Add <Alternatives> in the same manner as Content Units, Requirements and Conditional Expressions – Schema Changes • Change <Completion. Type> element – <element name="Resource. Constraint" type="sdd-dd: Conditional. Resource. Constraint. Type" min. Occurs="0"/> to be – • Misc <element name="Condition" type="sdd-dd: Condition. Type" min. Occurs="0"/> – Proposed change still allows for multiple completion elements. This is needed for different actions.
- Slides: 5