protected function marshall(QtiComponent $component)
    {
        $element = $this->createElement($component);
        $version = $this->getVersion();
        
        $this->setDOMElementAttribute($element, 'identifier', $component->getIdentifier());
        $this->setDOMElementAttribute($element, 'base', $component->getBase());
        
        if (Version::compare($version, '2.1.0', '>=') === true) {
            $this->setDOMElementAttribute($element, 'powerForm', $component->mustPowerForm());
            $this->setDOMElementAttribute($element, 'delimiter', $component->getDelimiter());
            $this->setDOMElementAttribute($element, 'mappingIndicator', $component->getMappingIndicator());
        }

        if ($component->hasFormat() === true) {
            $this->setDOMElementAttribute($element, 'format', $component->getFormat());
        }

        if ($component->hasIndex() === true) {
            $this->setDOMElementAttribute($element, 'index', $component->getIndex());
        }

        if ($component->hasField() === true) {
            $this->setDOMElementAttribute($element, 'field', $component->getField());
        }

        if ($component->hasXmlBase() === true) {
            self::setXmlBase($element, $component->getXmlBase());
        }

        $this->fillElement($element, $component);

        return $element;
    }