 <p>If DateTimeType were an attribute, this could be done conveniently using conditional type assignment. But if it has to be a child element, you can do it using assertions, for example</p> <pre><code>&lt;xs:assertion test="not(DateTimeType = 'MONTH' and exists(DayOfWeek)"/&gt; </code></pre> <p>By the way, they are not called tags, they are called elements. An element generally has two tags, a start tag and an end tag. Using the correct terminology has many benefits, for example you'll find that you start to understand the language used in error messages better.</p>