protected function marshall(QtiComponent $component)
    {
        $element = parent::marshall($component);
        $version = $this->getVersion();
        
        if ($component->isParamVariable() === true) {
            $this->setDOMElementAttribute($element, 'paramVariable', true);
        } elseif (Version::compare($version, '2.0.0', '==') === true && $component->isParamVariable() === false) {
            $this->setDOMElementAttribute($element, 'paramVariable', false);
        }

        if ($component->isMathVariable() === true) {
            $this->setDOMElementAttribute($element, 'mathVariable', true);
        } elseif (Version::compare($version, '2.0.0', '==') === true && $component->isMathVariable() === false) {
            $this->setDOMElementAttribute($element, 'mathVariable', false);
        }

        return $element;
    }