Is it possible (and if so, how) to enforce with XML Schema that two elements in a document must contain an identical substructure? For instance, I'd like to express that any foo has two children, bar1 and bar2, and bar1 has to have the same child structure as bar2:
<foo>
<bar1>
<baz>hello, world</baz>
</bar1>
<bar2>
<baz>hello, world</baz>
</bar2>
</foo>
Is key and keyref the right way to go?
Thanks!