More realistically, imagine you have a complex type whose content model is <element name="para" minOccurs="0" maxOccurs="unbounded"/>, and the assertion says test="exists(para)", then the assertion on its own would allow <para/> <fig/> <fig/> which the complex type's grammar does not allow. Requiring the assertion to be true ONLY for content that satisfies the grammar would be a ridiculous burden on schema authors. Michael Kay Saxonica
|