I have a XML defining properties like :
<properties>
<property name="play_sound" value="true" />
<property name="duration" value="30" />
</properties>
Is it possible, with an XML schema, specify conditions such as "if the property name is 'duration' then the value must be an integer". I think it is not possible so, what is the recommended way to model that kind of information in a XML file?
I have been thinking about something like:
<properties>
<play_sound>true</play_sound>
<duration>30</duration>
</properties>
That way I can define type restrictionos in my schema. But, what happens if I have hundreds of different properties, that are likely to grow in the future...?
Thank you.