protected function unmarshall(DOMElement $element)
    {
        if (($max = $this->getDOMElementAttributeAs($element, 'max', 'string')) !== null) {
            $max = (Format::isVariableRef($max)) ? $max : intval($max);
            $object = new RandomInteger(0, $max);

            if (($step = $this->getDOMElementAttributeAs($element, 'step')) !== null) {
                $object->setStep(abs(intval($step)));
            }

            if (($min = $this->getDOMElementAttributeAs($element, 'min')) !== null) {
                $min = (Format::isVariableRef($min)) ? $min : intval($min);
                $object->setMin($min);
            }

            return $object;
        } else {
            $msg = "The mandatory attribute 'max' is missing from element '" . $element->localName . "'.";
            throw new UnmarshallingException($msg, $element);
        }
    }