Can a sequence of XML elements be conditional on a property?

Viewed 8116

First question (be kind!) Explanation: if a property's true, I need the type to have elements. So if an attribute is true, the XML output might be:

<Approval Approved="true">
   <By>RT</By>
   <Date>27/07/2011</Date>
</Approval>

And if it isn't approved, the XML output might be

<Approval Approved="false" />

Is it possible to specify something like this in an XSD?

2 Answers
Related