4 ms·
As someone not intimately familiar with xml wouldn't xs:all do what you need? It provides unordered but required.
by stonemetal 12y ago
As someone not intimately familiar with xml wouldn't xs:all do what you need? It provides unordered but required.
- Someone1234 12y agoIn theory yes. In practice absolutely no. The examples are oversimplified, and when you start using xs:all or xs:choice you quickly start running into inheritance issues (e.g. the top level node is optional, but when it exists child-XYZ are mandatory, and when you mix child optional and child mandatory things get "strange"). I spent a few days trying to get a schema working with our format. I had it working well enough with a specific node ordering, but when I tried to get it working with an order-agnostic set it would all break down around you. That's when I threw out two full days of work and replaced it with a Java class I spent about an hour writing and testing. Working flawlessly ever since.