Browse Source

HPCC-8566 Fix XML Schema generation skips top level attributes

Attributes defined in the top level record structure were being
ignored by the schema generator.

Signed-off-by: Anthony Fishbeck <Anthony.Fishbeck@lexisnexis.com>
Anthony Fishbeck 12 years ago
parent
commit
96b8d91d69
1 changed files with 5 additions and 2 deletions
  1. 5 2
      common/deftype/deftype.cpp

+ 5 - 2
common/deftype/deftype.cpp

@@ -3654,13 +3654,16 @@ void XmlSchemaBuilder::addSchemaPrefix()
                     "<xs:element name=\"Row\">"
                         "<xs:complexType>"
                             "<xs:sequence>\n");
+    attributes.append(*new StringBufferItem);
 }
 
 
 void XmlSchemaBuilder::addSchemaSuffix()
 {
-    xml.append(             "</xs:sequence>"
-                        "</xs:complexType>"
+    xml.append(             "</xs:sequence>");
+    xml.append(attributes.tos());
+    attributes.pop();
+    xml.append(         "</xs:complexType>"
                     "</xs:element>\n"
                 "</xs:sequence>"
             "</xs:complexType>"