Forgive me for chopping up your post to respond. Don't think I've rearranged it to take anything out of context.
ninjeff said:
Also, a feat like:
Flipflop
Choose attack rolls or damage rolls. You gain a +1 bonus to these rolls.
would necessitate the creation of an <attackOrDamageFeat> type, which seems a bit over the top. The types of choices in the books can vary wildly, which is why we're allowing most of them (not feats, skills, languages or powers) to be specified in plaintext.
I beg to differ. Now, representing the
effects of feats/powers/etc would be a bit more laborious, but simpler in a way as well, since you're not validating data by the end user. Well-defined type derivations could cover it. (With perhaps a CYA type for the least common denominator, containing freeform exception text.)
Since we're talking about building a schema for character definition rather than building a rules engine, I only meant to imply that the choices associated with a feat/power would be built in, and I think those are relatively limited. Of course, I've only had the rulebooks for a few days, but I can't think of any powers off the top of my head that require a choice (some of the Ranger powers, frex, require two weapons OR a ranged weapon, but you don't CHOOSE either/or when you pick the power). There are some feats that require a choice, but your example is probably about as complicated as it gets.
ninjeff said:
With these points in mind, I've decided to stick with a schema that only validates whether an XML file represents a 4e D&D character,
not whether it's a
correct character.
I mentioned that as an aside in my post. If that's the objective, making things as simplistic as possible would be ideal and you're on the right track. I'll even rescind my statement about the
generic attributes.
ninjeff said:
First of all, it's infeasible. A schema like this would require updating not just with every new book, but also with every online Dragon article. The new version of the schema would then have to be distributed to application developers and users, who would have to have the latest version to be able to use their characters.
...
Second, it's illegal. IANAL, but I'm pretty sure distribution of a schema containing a significant amount of the PHB's rules text would constitute a copyright infringement.
....
However, you're absolutely right that schemas for datasets are a good idea. If we have well-defined datasets, then application developers can hook into those rather than having to hardcode rules into their applications, which helps them avoid breaking laws. Users could enter the data on their own from the books (legal, AFAIK) or find datasets elsewhere (illegal, but not our problem). Maybe a parser could even be made to turn rules text into XML data.
I'm not sure how the GSL would cover such things. I wouldn't think we'd be defining more than the GSL allows (still under the assumption that we're not giving the details of feats/powers/etc, just config info). Seems like the touchy bit would be that they wanna have their own software for creation/maintenance of characters. I'm no lawyer, either. On legal grounds, though, I'd say we'd only distribute the schema for defining datasets, not the data itself. (Ah, brings back memories of PCGen.)
I attempted to address these points regarding maintenance, legality, etc in my post, but I was running out of steam at that point.

A schema compiler is just what I'd propose. I don't like the actual data being defined in the schema either. I'd see it working this way, with rulesets in play:
- A schema is defined to define rulesets.
- User creates multiple datasets based on this schema. (Or fetches rulesets that are sanctioned by publishers.)
- A schema is defined which describes a schema for definition and validation of character data.
- Some magical construct (or software significantly advanced to appear as such to most) compiles the rulesets into said character schema.
- User creates character data based on this compiled schema.
Alernately, if rulesets are unavailable, a schema could be defined allowing for the same format which does minimal validation (sans rulesets). This would allow for "freeform" definition as well as definition/validation based on compiled rules.
So, I think we're in violent agreement!
