Adjusted comment XML fields for consistency.
authorW. Trevor King <wking@drexel.edu>
Mon, 22 Jun 2009 13:15:22 +0000 (09:15 -0400)
committerW. Trevor King <wking@drexel.edu>
Mon, 22 Jun 2009 13:15:22 +0000 (09:15 -0400)
Renamed "name" -> "short-name" and "in_reply_to" -> "in-reply-to".
Reordered uuid before short-name.

libbe/comment.py

index e5c86c7003bb6851084ef0bbcf2249efe04b4be2..78a6b6a39b8dc627186729af2157b83ef1d25f01 100644 (file)
@@ -223,8 +223,8 @@ class Comment(Tree, settings_object.SavedSettingsObject):
         >>> comm.time_string = "Thu, 01 Jan 1970 00:00:00 +0000"
         >>> print comm.xml(indent=2, shortname="com-1")
           <comment>
-            <name>com-1</name>
             <uuid>0123</uuid>
+            <short-name>com-1</short-name>
             <from></from>
             <date>Thu, 01 Jan 1970 00:00:00 +0000</date>
             <body>Some
@@ -235,10 +235,10 @@ class Comment(Tree, settings_object.SavedSettingsObject):
         if shortname == None:
             shortname = self.uuid
         lines = ["<comment>",
-                 "  <name>%s</name>" % (shortname,),
-                 "  <uuid>%s</uuid>" % self.uuid,]
+                 "  <uuid>%s</uuid>" % self.uuid,
+                 "  <short-name>%s</short-name>" % (shortname,),]
         if self.in_reply_to != None:
-            lines.append("  <in_reply_to>%s</in_reply_to>" % self.in_reply_to)
+            lines.append("  <in-reply-to>%s</in-reply-to>" % self.in_reply_to)
         lines.extend([
                 "  <from>%s</from>" % self._setting_attr_string("From"),
                 "  <date>%s</date>" % self.time_string,