Lee Begg pisze: >> * Missing <name> and/or <longname> of properties and/or misplaced <name> >> and <longname>; sometimes <name>, <longname> and <description> are exactly >> the same - fortunately this is not that common and probably requires >> sometime familiar with the protocol to fix that :) [is protocol3.php enough >> for that?] > > They are valid, iirc. The name, long name and description are really for the > protocol document and are not sent in the protocol itself.
The DTD says that at leas <name> and <longname> must be specified. Anyway, for me it's necessary to generate accessors for those properties in generated classes (they have to be named somehow :) so some more law and order would be useful :) I tweaked protocol3.xml a bit (proposed patch attached) to a state in which it is useful for this (but still I might have missed some). -KS ---------------------------------------------------------------------- Mamy dla Ciebie nagrody >>> http://link.interia.pl/f1b7b
From 0f46649888a8133ad22217894353d093a6efb885 Mon Sep 17 00:00:00 2001 From: Krzysztof Sobolewski <[EMAIL PROTECTED]> Date: Fri, 24 Aug 2007 22:56:30 +0200 Subject: [PATCH] Clean up a mess of <name>s and <longname>s in protocol3.xml --- protocol/protocol3.xml | 118 ++++++++++++++++++++++++++---------------------- 1 files changed, 64 insertions(+), 54 deletions(-) diff --git a/protocol/protocol3.xml b/protocol/protocol3.xml index 759ad9e..73820b3 100644 --- a/protocol/protocol3.xml +++ b/protocol/protocol3.xml @@ -944,9 +944,8 @@ <note>-1 will insert at the last position, otherwise it is inserted before the number</note> </integer> <integer type="unsigned" size="32"> - <name>Order Type ID</name> + <name>type</name> <longname>Order Type ID</longname> - <description>Order Type ID</description> <subtype /> </integer> <integer type="unsigned" size="32" readonly="yes"> @@ -1113,11 +1112,13 @@ </structure> </list> <string type="formatted"> - <name>Subject of the message</name> + <name>subject</name> + <longname>Subject of the message</longname> </string> <string type="formatted"> - <name>a Formatted String</name> - <description>Body of the message</description> + <name>body</name> + <longname>Body of the message</longname> + <description>a Formatted String</description> </string> <integer type="unsigned" size="32"> <name>Turn the message was generated on</name> @@ -1240,34 +1241,36 @@ <structure> <integer type="unsigned" size="32"> - <name>Resource ID</name> + <name>id</name> <longname>Resource ID</longname> - <description>Resource ID</description> </integer> <string type="formatted"> - <name>singular name of the resource</name> + <name>singularname</name> + <longname>singular name of the resource</longname> </string> <string type="formatted"> - <name>plural name of the resource</name> + <name>pluralname</name> + <longname>plural name of the resource</longname> </string> <string type="formatted"> - <name>singular name of the resources unit</name> + <name>singularunitname</name> + <longname>singular name of the resources unit</longname> </string> <string type="formatted"> - <name>plural name of the resources unit</name> + <name>pluralunitname</name> + <longname>plural name of the resources unit</longname> </string> <string type="formatted"> - <name>description of the resource</name> + <name>description</name> + <longname>description of the resource</longname> </string> <integer type="unsigned" size="32"> - <name>weight per unit of resource (0 for not applicable)</name> + <name>weight</name> <longname>weight per unit of resource (0 for not applicable)</longname> - <description>weight per unit of resource (0 for not applicable)</description> </integer> <integer type="unsigned" size="32"> - <name>size per unit of resource (0 for not applicable)</name> + <name>size</name> <longname>size per unit of resource (0 for not applicable)</longname> - <description>size per unit of resource (0 for not applicable)</description> </integer> <integer type="unsigned" size="64"> <name>modtime</name> @@ -1295,13 +1298,10 @@ <packet id="40" base="Response" name="Player"> <longname>Player Data</longname> - - <structure> <integer type="unsigned" size="32"> - <name>the Player id</name> + <name>id</name> <longname>the Player id</longname> - <description>the Player id</description> </integer> <string> <name>name</name> @@ -1333,9 +1333,8 @@ <longname>Category Frame, Add Category</longname> <structure> <integer type="semisigned" size="32"> - <name>Category ID</name> + <name>id</name> <longname>Category ID</longname> - <description>Category ID</description> </integer> <integer type="unsigned" size="64"> <name>modtime</name> @@ -1343,10 +1342,12 @@ <description>The time at which this category was last modified.</description> </integer> <string type="formatted"> - <name>name of the category</name> + <name>name</name> + <longname>name of the category</longname> </string> <string type="formatted"> - <name>description of the category</name> + <name>description</name> + <longname>description of the category</longname> </string> </structure> <note> @@ -1381,13 +1382,10 @@ <packet id="48" base="Response" name="Design"> <longname>Design Frame, Add Design Frame, Modify Design</longname> - - <structure> <integer type="unsigned" size="32"> - <name>Design ID</name> + <name>id</name> <longname>Design ID</longname> - <description>Design ID</description> </integer> <integer type="unsigned" size="64"> <name>modtime</name> @@ -1395,58 +1393,61 @@ <description>The time at which this design was last modified.</description> </integer> <list> + <name>categories</name> + <longname>categories this design is in</longname> <structure> <integer type="unsigned" size="32"> - <name>categories this design is in</name> + <name>category</name> + <longname>one category</longname> </integer> </structure> </list> <string type="formatted"> - <name>name of the design</name> + <name>name</name> + <longname>name of the design</longname> </string> <string type="formatted"> - <name>description of the design</name> + <name>description</name> + <longname>description of the design</longname> </string> <integer type="semisigned" size="32"> - <name>number of times the design is in use</name> + <name>usage</name> <longname>number of times the design is in use</longname> - <description>number of times the design is in use</description> </integer> <integer type="semisigned" size="32"> - <name>owner of the design</name> + <name>owner</name> <longname>owner of the design</longname> - <description>owner of the design</description> </integer> <list> <name>components</name> <longname>Component List</longname> <structure> <integer type="unsigned" size="32"> - <name>component id</name> + <name>componentid</name> <longname>component id</longname> - <description>component id</description> </integer> <integer type="unsigned" size="32"> - <name>the number of components</name> + <name>componentnum</name> <longname>the number of components</longname> - <description>the number of components</description> </integer> </structure> </list> <string type="formatted"> - <name>human readable feedback on the design</name> + <name>feedback</name> + <longname>human readable feedback on the design</longname> </string> <list> <name>properties</name> <longname>List of Properties</longname> <structure> <integer type="unsigned" size="32"> - <name>property id</name> + <name>id</name> <longname>property id</longname> <description>property id</description> </integer> <string type="formatted"> - <name>property display string</name> + <name>value</name> + <longname>property display string</longname> </string> </structure> </list> @@ -1497,9 +1498,8 @@ <longname>Component</longname> <structure> <integer type="unsigned" size="32"> - <name>component ID</name> + <name>id</name> <longname>component ID</longname> - <description>component ID</description> </integer> <integer type="unsigned" size="64"> <name>modtime</name> @@ -1507,15 +1507,22 @@ <description>The time at which this component was last modified.</description> </integer> <list> + <name>categories</name> + <longname>categories this component is in</longname> <structure> - <integer type="unsigned" size="32"><name>categories this component is in</name></integer> + <integer type="unsigned" size="32"> + <name>category</name> + <longname>one category</longname> + </integer> </structure> </list> <string type="formatted"> - <name>name of the component</name> + <name>name</name> + <longname>name of the component</longname> </string> <string type="formatted"> - <name>description of the component</name> + <name>description</name> + <longname>description of the component</longname> </string> <string> <name>requirements</name> @@ -1527,9 +1534,8 @@ <longname>List of Properties</longname> <structure> <integer type="unsigned" size="32"> - <name>Property ID</name> + <name>id</name> <longname>Property ID</longname> - <description>Property ID</description> </integer> <string> <name>valuefunc</name> @@ -1571,16 +1577,18 @@ <description>The time at which this property was last modified.</description> </integer> <list> + <name>categories</name> + <longname>categories this component is in</longname> <structure> <integer type="unsigned" size="32"> - <name>categories this component is in</name> + <name>category</name> + <longname>one category</longname> </integer> </structure> </list> <integer type="unsigned" size="32"> - <name>rank of the property</name> + <name>rank</name> <longname>rank of the property</longname> - <description>rank of the property</description> </integer> <string> <name>name</name> @@ -1588,10 +1596,12 @@ <description>A valid TPCL identifier for this property.</description> </string> <string type="formatted"> - <name>display name of the property</name> + <name>displayname</name> + <longname>display name of the property</longname> </string> <string type="formatted"> - <name>description of the property</name> + <name>description</name> + <longname>description of the property</longname> </string> <string> <name>calculatefunc</name> -- 1.5.2.4
signature.asc
Description: OpenPGP digital signature
_______________________________________________ tp-devel mailing list [email protected] http://www.thousandparsec.net/tp/mailman.php/listinfo/tp-devel
