docs: def build(self, builder):
          """Build XML by appending to builder"""
  
          params = dict(OID=self.oid, Name=self.name)
  
          if self.description is not None:
              params["Description"] = self.description
  
          if self.signature_prompt is not None:
              params["mdsol:SignaturePrompt"] = self.signature_prompt
  
          if self.primary_formoid is not None:
              params["mdsol:PrimaryFormOID"] = self.primary_formoid
  
          if self.default_matrix_oid is not None:
              params["mdsol:DefaultMatrixOID"] = self.default_matrix_oid
  
          params["mdsol:DeleteExisting"] = bool_to_yes_no(self.delete_existing)
  
          builder.start("MetaDataVersion", params)
          if self.protocol:
              self.protocol.build(builder)
  
          for event in self.study_event_defs:
              event.build(builder)
  
          for formdef in self.form_defs:
              formdef.build(builder)
  
          for itemgroupdef in self.item_group_defs:
              itemgroupdef.build(builder)
  
          for itemdef in self.item_defs:
              itemdef.build(builder)
  
          for codelist in self.codelists:
              codelist.build(builder)
  
          # Extensions must always come after core elements
          if self.confirmation_message:
              self.confirmation_message.build(builder)
  
          for labeldef in self.label_defs:
              labeldef.build(builder)
  
          for edit_check in self.edit_checks:
              edit_check.build(builder)
  
          for derivation in self.derivations:
              derivation.build(builder)
  
          for custom_function in self.custom_functions:
              custom_function.build(builder)
  
          builder.end("MetaDataVersion")