def _writeRecordSpecificationXML(self, elem):
    assert isinstance(elem, autosar.constant.RecordValue)
    lines = []
    lines.append('<RECORD-SPECIFICATION>')
    lines.append(self.indent(('<SHORT-NAME>%s</SHORT-NAME>' % elem.name), 1))
    tag = elem.rootWS().find(elem.typeRef).tag(self.version)
    lines.append(self.indent(('<TYPE-TREF DEST="%s">%s</TYPE-TREF>' % (tag, elem.typeRef)), 1))
    if (len(elem.elements) == 0):
        lines.append('<ELEMENTS/>')
    else:
        lines.append(self.indent('<ELEMENTS>', 1))
        for childElem in elem.elements:
            lines.extend(self.indent(self._writeLiteralValueXML(childElem), 2))
        lines.append(self.indent('</ELEMENTS>', 1))
    lines.append('</RECORD-SPECIFICATION>')
    return lines
def _writeRecordSpecificationXML(self, elem):
    assert isinstance(elem, autosar.constant.RecordValue)
    lines = []
    lines.append('<RECORD-SPECIFICATION>')
    lines.append(self.indent(('<SHORT-NAME>%s</SHORT-NAME>' % elem.name), 1))
    tag = elem.rootWS().find(elem.typeRef).tag(self.version)
    lines.append(self.indent(('<TYPE-TREF DEST="%s">%s</TYPE-TREF>' % (tag, elem.typeRef)), 1))
    if (len(elem.elements) == 0):
        lines.append('<ELEMENTS/>')
    else:
        lines.append(self.indent('<ELEMENTS>', 1))
        for childElem in elem.elements:
            lines.extend(self.indent(self._writeLiteralValueXML(childElem), 2))
        lines.append(self.indent('</ELEMENTS>', 1))
    lines.append('</RECORD-SPECIFICATION>')
    return lines