I have to make a schema for an XML format that's already being used. The existing XML is being generated already by a different program, and it sounds like it would be difficult to track down all the places that would need to be changed in order to use a more regular XML format.
Here's an example similar to our XML structure:
<data>
<summary>some info</summary>
<error>error message (only if there was an error)</error>
<details>more info
<x>more</x>
<y>even more</y>
</details>
<error>another error message</error>
<z>some extra info</z>
</data>
Note that the error tag is reused at the same level and comes after certain items but not others, so I can't just set maxOccurs="unbounded". I've tried wrapping the associated pairs of error/other tags in an xsd:sequence, but that doesn't do the trick because I'm still effectively breaking the Unique Particle Attribution rule.
Can this even be done, or do I need to let the other developers know this schema isn't going to validate?