protected function marshall(QtiComponent $component)
    {
        $element = static::getDOMCradle()->createElement($component->getQtiClassName());

        if ($component->hasLowerBound() === true) {
            $this->setDOMElementAttribute($element, 'lowerBound', $component->getLowerBound());
        }

        if ($component->hasUpperBound() === true) {
            $this->setDOMElementAttribute($element, 'upperBound', $component->getUpperBound());
        }

        $this->setDOMElementAttribute($element, 'defaultValue', $component->getDefaultValue());

        foreach ($component->getMapEntries() as $mapEntry) {
            $marshaller = $this->getMarshallerFactory()->createMarshaller($mapEntry, array($this->getBaseType()));
            $element->appendChild($marshaller->marshall($mapEntry));
        }

        return $element;
    }