[Date Prev] | [Thread Prev] | [Thread Next] | [Date Next] -- [Date Index] | [Thread Index] | [Elist Home]
Subject: Annotation isue: context-sensitive attribute default values
Unless I'm missing something, it appears that the annotations spec does not permit attribute default values to be context-sensitive. I'd like to be able to have a single attribute definition whose default value depends on where the attribute is used. One way to achieve this would be to allow an a:defaultValue attribute on a <ref> element if the referenced <define> contains a single attribute element. Then I could do something like this: <define name="salutationAttr"> <attribute name="salutation"> <data type="string"/> </attribute> </define> <element name="monarch"> ... <ref name="salutationAttr" a:defaultValue="Your Majesty"/> ... </element> <element name="judge"> ... <ref name="salutationAttr" a:defaultValue="Your Honor"/> ... </element> An alternative way to specify context-sensitive attribute default values might be to allow an attribute to contain multiple <a:defaultValue> elements, with each <a:defaultValue> specifying an Xpath expression as its context. For example, <define name="salutationAttr"> <attribute name="salutation"> <a:defaultValue context="monarch" value="Your Majesty"/> <a:defaultValue context="judge" value="Your Honor"/> <data type="string"/> </attribute> </define> Regards, Josh Joshua Lubell, NIST 100 Bureau Drive, Stop 8263 Gaithersburg MD 20899-8263 USA (301) 975-3563 lubell@nist.gov
[Date Prev] | [Thread Prev] | [Thread Next] | [Date Next] -- [Date Index] | [Thread Index] | [Elist Home]
Powered by eList eXpress LLC