Problem
WorleyParsons writes: We have utilised and appropriately populated an extension called "Function Code" on our Functional Classes, and correspondingly "Document Type" on our Document Classes. We have created an Attribute called "Function Code" which we have associated with all classes. This Attribute identifies that classes should have a function code - which has been identified by the extension on the class. currently we can only validate this Attribute by a separate Enumerated list which would mean we would have to maintain this list twice - once as the value of the extension, and the second time a s the value of the enumerated list. We want to Validate the Attribute by the Class Extension - meaning that any changes to the Class Extension will be automatically captured within the values of the Attribute - and therefore maintain the list once. This would also mean that we could use the Attribute correctly as a Source in an N&N Element
Suggested Solution
There are multiple options to how this can be solved:
Configure an Enumeration to populate from extensions on classes. In this case an Enumeration@id="Function Codes" could have a @provider="Functionals/Extension[WP]/@FunctionCode". This enumeration needs to be serialized fully populated, to be utilised in the instance world
Introduce @defaultValue for Attribute, supporting an expression (like in PermissibleGrid), e.g. @defaultValue="Class/Extension[WP]/@FunctionCode". For this to have effect in the instance world, the authoring/validating software needs to understand the expression syntax. Alternatively the @defaultValue can be resolved at serialize time. This might require both @defaultValueExpression and @defaultValue
Set the value on the Attribute which is Read only - this would not require it to be attached to the Extension Data, unless we can use this as the value reported in the Configuration Schema object