I have properties defining XML:
<properties>
<property name="play_sound" value="true" />
<property name="duration" value="30" />
</properties>
Is it possible, using an XML schema, to specify conditions such as "if the property name is" duration ", then the value must be integer." I think this is not possible, what is the recommended way to model such information in an XML file?
I was thinking of something like:
<properties>
<play_sound>true</play_sound>
<duration>30</duration>
</properties>
That way, I can define type restrictions in my schema. But what happens if I have hundreds of different properties that are likely to grow in the future ...?
Thanks.
source
share