OK, so today I've been working on a DTD for the plugin XML format, to describe what it should contain and in what order.
The real question I've been wrangling with is whether I should enforce the order of things in the file, e.g. <hooks> can contain 1+ function tags, 1+ language tags and 0 or 1 provides tags. Now, in my example files and all my own files, I've always put functions first, then language files, then provides tags.
Now, the parser itself doesn't care too much, it's built to be more forgiving, but I'm thinking that it shouldn't be so forgiving, that having a set process/standard will encourage better behaviour than being more forgiving, so that I'm thinking about the DTD validator being more strict.
So, for example, I wouldn't have it enforce the order of most tags, but stuff like <hooks>, I'd enforce the order like that.
Thoughts?
Disclaimer: there is a secondary reason for doing it like this: it's actually a pain in the arse writing a DTD that has rules where there are mandatory tags and optional tags, and that there isn't a set order because you have to define all the possible permutations.