+ /*
+ * A command is always the MI's root node, it must declare the current
+ * namespace and schema URIs and the schema's version.
+ */
+ ret = config_writer_open_element(writer->writer,
+ mi_lttng_element_command);
+ if (ret) {
+ goto end;
+ }
+
+ ret = config_writer_write_attribute(writer->writer,
+ mi_lttng_xmlns, mi_lttng_ns_uri);
+ if (ret) {
+ goto end;
+ }
+
+ ret = config_writer_write_attribute(writer->writer,
+ mi_lttng_xmlns_xsi, mi_lttng_w3_schema_uri);
+ if (ret) {
+ goto end;
+ }
+
+ ret = config_writer_write_attribute(writer->writer,
+ mi_lttng_schema_location,
+ mi_lttng_schema_location_uri);
+ if (ret) {
+ goto end;
+ }
+
+ ret = config_writer_write_attribute(writer->writer,
+ mi_lttng_schema_version,
+ mi_lttng_schema_version_value);