I need to define a schema where I have one attribute that must be defined when another optional attribute is existent.
Example:
<someNode defaultValue="Hello" /> <!-- valid -->
<someNode defaultValue="Hello" defaultValueTranslatable="true" /> <!-- valid -->
<someNode defaultValueTranslatable="true" /> <!-- NOT valid -->
How can I define this in my xsd?
You can’t I’m afraid. XSD supports optional attributes but does not support the conditional functionality you desire.