| <--intro | ^--xmld20--^ | design, continued--> |
While I have more experience with the older XML DTD format, this is a dead definition, and I'll definitely be sticking to XSchema. Or, now that I go and look at the W3C site, DDML.
Things that will need representation include:
This last idea is the most important. From the XML data (with this designed schema), a program should be able to use the class information to level up a character or NPC, regardless of the race or monster. In this idea of adding races and classes together, it must be able to cope with multiclassing, with ideas of prerequisites for feats (and when these prerequesites are waived). The currect style of the d20-xml data doesn't work in this way. For instance, this is the AC entry for the first monster in the Monster Manual, the aboleth:
<ArmorClass>16 (-2 size, +1 Dex, +7 natural), touch 9, flat-footed 15</ArmorClass>While this information is useful to a human for reading the total, for being able to somewhat easily figure out the creature's touch AC, etc., and even figure out what would happen if the creature was shrunk or enlarged and such, it's not so readable to software (that is, it's not easily parseable by software).
Optimally, this would be represented as
<ArmorClass size="-2" dex="1" natural="7">16 (-2 size, +1 Dex, +7 natural), touch 9, flat-footed 15</ArmorClass>This way, the software can look for specific attributes to pull out the specific numbers, in case it, say, needs to figure out what happens to the creature if a spell removes its natural armor benefit, or the creature is magically enlarged. The d20-xml guys got it right with the saves and abilities, however:
<Saves Fort="7" Ref="3" Will="11">Fort +7, Ref +3, Will +11</Saves> <Abilities Str="26" Dex="12" Con="20" Int="15" Wis="17" Cha="17">Str 26, Dex 12, Con 20, Int 15, Wis 17, Cha 17</Abilities>In this way, the information is easily viewable by both man and machine.
Another approach would be to not supply the human-readable text:
<ArmorClass size="-2" dex="1" natural="7"/> <Saves Fort="7" Ref="3" Will="11"/> <Abilities Str="26" Dex="12" Con="20" Int="15" Wis="17" Cha="17"/>With this method, the information is still there for the machine, but is no longer there in human-readable format. The data isn't being entered twice though, which is a benefit for the data-entry people. Additionally, with the use of XSLT, you can take the above format and reproduce the mixed version without much work.
For now, I think that's the approach I will take -- machine-readable only. I'll also co-develop the XSLT to produce a double-readable format, and, of course, I'll try to keep XSLT sheets available for my other targets (d20-xml and eTools) as I develop and change my own schema.
| <--intro | ^--xmld20--^ | design, continued--> |