Choice of subelements by attribute value?

Hi (me again ;)

I wondered if there is a possibility to restrict the appearance of 
certain subelements of an element by the value of an attribute.
Example:

<!-- valid: -->
<getdata type="http">
 <connection>...</connection>
</getdata>

<!-- valid: -->
<getdata type="https">
 <connection>...</connection>
</getdata>

<!-- invalid: -->
<getdata type="file">
 <connection>...</connection>
</getdata>

... because ...

<!-- valid: -->
<getdata type="file">
 <file>...</file>
</getdata>

I might be able to allow both subelements, but I actually want the 
necessary ones to be required. In that case, however, it doesn't make 
sense to require a <connection/> element for a "file" type data fetch, 
and vice versa.
I'd appreciate any hint on this one. Thx!

Bye,

Bjoern

Received on Friday, 22 June 2001 10:40:39 UTC