recently i encountered a situation in a configuration file where i need to have an attribute with a value from a list of values specified in my document.
e.g
<SeverityList>
<Severity name="SAFETY" />
<Severity name="ERROR" />
<Severity name="WARNING" />
<Severity name="INFO" />
</SeverityList>
this list of severities comes as a part of the system configurations but is subject to change from user to user, and during the lifetime of the hospital.
later on in the same XML document, i have tests, that each has a Severity, this severity MUST BE one of the options above.
e.g.
<Test name="patient_dosage_test" severity="SAFETY" /> <!-- O.K -->
<Test name="room_temperature" severity="WTF_SEV" /> <!-- FAIL Validation -->
I would like to emphasize:
1. The Severity list is subject to change
2. The Severity list is used in XSLT to reformat something later on.
Thanks