X-Git-Url: https://pintos-os.org/cgi-bin/gitweb.cgi?a=blobdiff_plain;f=ovsdb%2Fovsdb-doc.in;h=17eca52e76b07a3084d31c1c9d169f6c6bd9d737;hb=a193dde952a9ec7bb388e08b86bd2929edd3a353;hp=5f3033480253993136222a2f18caad4a7958d7ad;hpb=c5c7c7c5c0d379c49121d63b77067aa32bce22b7;p=openvswitch diff --git a/ovsdb/ovsdb-doc.in b/ovsdb/ovsdb-doc.in index 5f303348..17eca52e 100755 --- a/ovsdb/ovsdb-doc.in +++ b/ovsdb/ovsdb-doc.in @@ -52,6 +52,8 @@ def inlineXmlToNroff(node, font): s = r'\fB' if node.hasAttribute('column'): s += node.attributes['column'].nodeValue + if node.hasAttribute('key'): + s += ':' + node.attributes['key'].nodeValue elif node.hasAttribute('table'): s += node.attributes['table'].nodeValue elif node.hasAttribute('group'): @@ -86,7 +88,7 @@ def blockXmlToNroff(nodes, para='.PP'): and liNode.tagName == 'li'): i += 1 if node.tagName == 'ul': - s += ".IP \\bu\n" + s += ".IP \\(bu\n" else: s += ".IP %d. .25in\n" % i s += blockXmlToNroff(liNode.childNodes, ".IP") @@ -136,6 +138,8 @@ def typeAndConstraintsToNroff(column): constraints = column.type.constraintsToEnglish(escapeNroffLiteral) if constraints: type += ", " + constraints + if column.unique: + type += " (must be unique within table)" return type def columnToNroff(columnName, column, node): @@ -237,7 +241,8 @@ def docsToNroff(schemaFile, xmlFile, erFile, title=None): .de TQ . br . ns -. TP "\\$1" +. TP +\\$1 .. .de ST . PP @@ -286,20 +291,25 @@ Table Purpose if erFile: s += """ +.if !'\*[.T]'ascii' \{ .sp 1 .SH "TABLE RELATIONSHIPS" .PP The following diagram shows the relationship among tables in the -database. Each node represents a table. Each edge leads from the +database. Each node represents a table. Tables that are part of the +``root set'' are shown with double borders. Each edge leads from the table that contains it and points to the table that its value -represents. Edges are labeled with their column names. +represents. Edges are labeled with their column names, followed by a +constraint on the number of allowed values: \\fB?\\fR for zero or one, +\\fB*\\fR for zero or more, \\fB+\\fR for one or more. Thick lines +represent strong references; thin lines represent weak references. .RS -1in """ erStream = open(erFile, "r") for line in erStream: s += line + '\n' erStream.close() - s += ".RE\n" + s += ".RE\\}\n" for node in tableNodes: s += tableToNroff(schema, node) + "\n"