protected function marshall(QtiComponent $component)
    {
        $element = $this->createElement($component);
        $this->fillElement($element, $component);
        $this->setDOMElementAttribute($element, 'responseIdentifier', $component->getResponseIdentifier());
        $this->setDOMElementAttribute($element, 'lowerBound', $component->getLowerBound());
        $this->setDOMElementAttribute($element, 'upperBound', $component->getUpperBound());

        if ($component->hasStep() === true) {
            $this->setDOMElementAttribute($element, 'step', $component->getStep());
        }

        if ($component->mustStepLabel() === true) {
            $this->setDOMElementAttribute($element, 'stepLabel', true);
        }

        if ($component->getOrientation() === Orientation::VERTICAL) {
            $this->setDOMElementAttribute($element, 'orientation', Orientation::getNameByConstant(Orientation::VERTICAL));
        }

        if ($component->mustReverse() === true) {
            $this->setDOMElementAttribute($element, 'reverse', true);
        }

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

        if ($component->hasPrompt() === true) {
            $element->appendChild($this->getMarshallerFactory()->createMarshaller($component->getPrompt())->marshall($component->getPrompt()));
        }

        return $element;
    }