HolonX - XML Document Type Definition
<!-- DTD for HolonX XML Files --> <!ELEMENT Module (Comment?, Group*)> <!ELEMENT Group (Comment?, Word*)> <!ELEMENT Word (Comment, Definiton)> <!ELEMENT Comment (#PCDATA)> <!ELEMENT Definition (#PCDATA)> <!ATTLIST Module name CDATA #REQUIRED> <!ATTLIST Group name CDATA #REQUIRED> <!ATTLIST Word name CDATA #REQUIRED>
Example: tetris.xml
Extract:
<?xml version="1.0"?> <!DOCTYPE Module SYSTEM "holonx.dtd"> <Module name="Tetris"> <Comment> And here is a real application. </Comment> <Group name="Pit"> <Comment/> <Word name="PitWidth"> <Comment/> <Definition> 12 constant PitWidth </Definition> </Word> <Word name="PitDepth"> <Comment/> <Definition> 16 constant PitDepth </Definition> </Word> <Word name="DefinePit"> <Comment> Defining word for a pit. Creates the data array and defines the action of the pit. The pit delivers the address of the element i,j. </Comment> <Definition> : DefinePit create PitWidth PitDepth * allot does> rot PitWidth * rot + + ; ( i j -- adr ) </Definition> </Word> <Word name="Pit"> <Comment> Defines the pit. </Comment> <Definition> DefinePit Pit </Definition> </Word> <Word name="PitX0"> <Comment> Upper left corner of the pit. </Comment> <Definition> 5 constant PitX0 </Definition> </Word> <Word name="PitY0"> <Comment/> <Definition> 4 constant PitY0 </Definition> </Word> <Word name="Position"> <Comment> Sets cursor to position row col in the pit. </Comment> <Definition> : Position ( row col -- ) 2* PitX0 + swap PitY0 + xy ; </Definition> </Word>
...
</Group>
</Module>