protected function unmarshall(DOMElement $element)
    {
        // href is a mandatory value, retrieve it first.
        if (($value = $this->getDOMElementAttributeAs($element, 'href', 'string')) !== null) {
            $object = new Stylesheet($value);

            if (($value = $this->getDOMElementAttributeAs($element, 'type', 'string')) !== null) {
                $object->setType($value);
            }

            if (($value = $this->getDOMElementAttributeAs($element, 'media', 'string')) !== null) {
                $object->setMedia($value);
            }

            if (($value = $this->getDOMElementAttributeAs($element, 'title', 'string')) !== null) {
                $object->setTitle($value);
            }
        } else {
            $msg = "The mandatory attribute 'href' is missing.";
            throw new UnmarshallingException($msg, $element);
        }

        return $object;
    }
protected function unmarshall(DOMElement $element)
    {
        // href is a mandatory value, retrieve it first.
        if (($value = $this->getDOMElementAttributeAs($element, 'href', 'string')) !== null) {
            $object = new Stylesheet($value);

            if (($value = $this->getDOMElementAttributeAs($element, 'type', 'string')) !== null) {
                $object->setType($value);
            }

            if (($value = $this->getDOMElementAttributeAs($element, 'media', 'string')) !== null) {
                $object->setMedia($value);
            }

            if (($value = $this->getDOMElementAttributeAs($element, 'title', 'string')) !== null) {
                $object->setTitle($value);
            }
        } else {
            $msg = "The mandatory attribute 'href' is missing.";
            throw new UnmarshallingException($msg, $element);
        }

        return $object;
    }
protected function unmarshall ( DOMElement $ element ) { // href is a mandatory value, retrieve it first. if ( ( $ value = $ this -> getDOMElementAttributeAs ( $ element , 'href' , 'string' ) ) !== null ) { $ object = new Stylesheet ( $ value ) ; if ( ( $ value = $ this -> getDOMElementAttributeAs ( $ element , 'type' , 'string' ) ) !== null ) { $ object -> setType ( $ value ) ; } if ( ( $ value = $ this -> getDOMElementAttributeAs ( $ element , 'media' , 'string' ) ) !== null ) { $ object -> setMedia ( $ value ) ; } if ( ( $ value = $ this -> getDOMElementAttributeAs ( $ element , 'title' , 'string' ) ) !== null ) { $ object -> setTitle ( $ value ) ; } } else { $ msg = "The mandatory attribute 'href' is missing." ; throw new UnmarshallingException ( $ msg , $ element ) ; } return $ object ; }
Unmarshall a DOMElement object corresponding to a QTI stylesheet element.

@param \DOMElement $element A DOMElement object.
@return \qtism\data\QtiComponent A Stylesheet object.
@throws \qtism\data\storage\xml\marshalling\UnmarshallingException If the mandatory attribute 'href' is missing from $element.
Unmarshall a DOMElement object corresponding to a QTI stylesheet element .