-
Notifications
You must be signed in to change notification settings - Fork 12
/
ProtocolDescription.dtd
78 lines (68 loc) · 3.05 KB
/
ProtocolDescription.dtd
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
<!--
This DTD describes format of Spring lobby protocol description document.
*** notes on document structure ***
'Source' field indicates the direction of the command, that is if
source is 'client', the command is sent by the client, and likewise for
the 'server'.
'Argument' may contain some text describing the argument itself, 'Optional' tells
us whether this argument is optional or mandatory, and 'Sentence' tells us
if this argument may contain more than one word combined with space character
as a delimiter.
Use 'clink' element in order to reference to other commands. Use "name" to
reference to a command (you must put the command name in UPPERCASE!). You may
also specify to which command you reference by Source type if there are two
different commands with same name (one sent by the server and the other by
the client, for example JOIN command). In this case add :client or :server,
or simply just :c or :s. For example: <clink name="JOIN:client" /> and
<clink name="JOIN:server" /> or shortly: <clink name="JOIN:c" /> and
<clink name="JOIN:s" />. Also note that if reference is invalid xslt
transformation will add a "[broken link]" tag to it (as html text).
'Examples' may contain some text to denote actual usage of the command.
'CommonText' entity is used for general text formatting that may contain
some html-like tags and links to other command IDs.
-->
<!ENTITY % CommonText "(#PCDATA|clink|u|i|b|br|br2|p|ul|li|url|h3|h4|code|quote|Version)*">
<!ELEMENT u %CommonText;> <!-- underline tag -->
<!ELEMENT i %CommonText;> <!-- italics tag -->
<!ELEMENT b %CommonText;> <!-- bold tag -->
<!ELEMENT br %CommonText;> <!-- same as HTML BR tag -->
<!ELEMENT br2 %CommonText;> <!-- same as 'br' but it outputs it twice -->
<!ELEMENT p %CommonText;> <!-- same as HTML P tag -->
<!ELEMENT ul (li)+> <!-- same as HTML UL tag -->
<!ELEMENT li %CommonText;> <!-- same as HTML LI tag -->
<!ELEMENT url (#PCDATA)> <!-- gets translated to "a href" html tag -->
<!ELEMENT h3 %CommonText;> <!-- heading size 3 tag -->
<!ELEMENT h4 %CommonText;> <!-- heading size 4 tag -->
<!ELEMENT code %CommonText;> <!-- code tag -->
<!ELEMENT quote %CommonText;> <!-- quote tag -->
<!-- clink is a "command link", it points to another command: -->
<!ELEMENT clink EMPTY>
<!ATTLIST clink
name NMTOKEN #REQUIRED
>
<!-- root element: -->
<!ELEMENT ProtocolDescription (Intro, CompatFlags, Versions, CommandList)>
<!ELEMENT Intro %CommonText;>
<!ELEMENT CompatFlags %CommonText;>
<!ELEMENT Versions (Version)+>
<!ELEMENT Version %CommonText;>
<!ATTLIST Version
Name CDATA #REQUIRED
>
<!ELEMENT CommandList (Command*)>
<!ELEMENT Command (Arguments?, Description, Response?, Examples?)>
<!ATTLIST Command
Name NMTOKEN #REQUIRED
Source (client|server) #REQUIRED
>
<!ELEMENT Arguments (Argument*)>
<!ELEMENT Argument %CommonText;>
<!ATTLIST Argument
Name CDATA #REQUIRED
Optional (yes|no) #REQUIRED
Sentence (yes|no) #REQUIRED
>
<!ELEMENT Description %CommonText;>
<!ELEMENT Response %CommonText;>
<!ELEMENT Examples (Example*)>
<!ELEMENT Example %CommonText;>