How would one write an xsd to represent the xml shown below (taken from http://static.springsource.org/spring-ws/sites/2.0/reference/html/why-contract-first.html)?
<flight number="KL1117">
<passengers>
<passenger>
<name>Arjen Poutsma</name>
<flight href="KL1117" />
</passenger>
</passengers>
</flight>
In this case, passenger.flight is referencing another flight element (in this case, the grandparent of passenger). How do you actually handle this when writing xsds? This could cover cases of cyclical references or just for convenience to keep repetition of elements that represent complex types to a minimum by using references.