protocoldescription.dtd

来自「这是整套横扫千军3D版游戏的源码」· DTD 代码 · 共 69 行

DTD
69
字号
<!--
  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)*">
<!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 -->
<!-- clink is a "command link", it points to another command: -->
<!ELEMENT clink EMPTY>
<!ATTLIST clink
  name NMTOKEN #REQUIRED
  >

<!-- root element: -->
<!ELEMENT ProtocolDescription (Intro, RecentChanges?, CommandList)>
<!ELEMENT Intro %CommonText;>
<!ELEMENT RecentChanges %CommonText;>
<!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 NMTOKENS #REQUIRED
   Optional (yes|no) #REQUIRED
   Sentence (yes|no) #REQUIRED
   >
<!ELEMENT Description %CommonText;>
<!ELEMENT Response %CommonText;>
<!ELEMENT Examples (Example*)>
<!ELEMENT Example (#PCDATA)>

⌨️ 快捷键说明

复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?