Add missing closing / in xsd:restriction, and remove some unnecessary
authorTom Lane <tgl@sss.pgh.pa.us>
Sat, 10 Nov 2007 19:29:54 +0000 (19:29 +0000)
committerTom Lane <tgl@sss.pgh.pa.us>
Sat, 10 Nov 2007 19:29:54 +0000 (19:29 +0000)
spaces for consistency.  Per bug #3734 from Ben Leslie; fix by
Euler Taveira de Oliveira.

src/backend/utils/adt/xml.c

index c6245084fba24fa5c643d7891fdf3f6c1f8b5508..e7141061a47e30d56706ed4d1c0892269dc679b3 100644 (file)
@@ -2707,11 +2707,11 @@ map_sql_schema_to_xmlschema_types(Oid nspid, List *relid_list, bool nulls,
 
                if (!tableforest)
                        appendStringInfo(&result,
-                                                        "    <xsd:element name=\"%s\" type=\"%s\" />\n",
+                                                        "    <xsd:element name=\"%s\" type=\"%s\"/>\n",
                                                         xmltn, tabletypename);
                else
                        appendStringInfo(&result,
-                                                        "    <xsd:element name=\"%s\" type=\"%s\" minOccurs=\"0\" maxOccurs=\"unbounded\" />\n",
+                                                        "    <xsd:element name=\"%s\" type=\"%s\" minOccurs=\"0\" maxOccurs=\"unbounded\"/>\n",
                                                         xmltn, tabletypename);
        }
 
@@ -2773,7 +2773,7 @@ map_sql_catalog_to_xmlschema_types(List *nspid_list, bool nulls,
                                                                                                                                                NULL);
 
                appendStringInfo(&result,
-                                                "    <xsd:element name=\"%s\" type=\"%s\" />\n",
+                                                "    <xsd:element name=\"%s\" type=\"%s\"/>\n",
                                                 xmlsn, schematypename);
        }
 
@@ -3111,7 +3111,7 @@ map_sql_type_to_xmlschema_type(Oid typeoid, int typmod)
                                        base_typeoid = getBaseTypeAndTypmod(typeoid, &base_typmod);
 
                                        appendStringInfo(&result,
-                                                                        "  <xsd:restriction base=\"%s\">\n",
+                                                                        "  <xsd:restriction base=\"%s\"/>\n",
                                                                         map_sql_type_to_xml_name(base_typeoid, base_typmod));
                                }
                                break;