protected function decorateRootElement(DOMElement $rootElement)
    {
        $xsdLocation = 'http://www.imsglobal.org/xsd/qti/qtiv2p1/imsqti_v2p1.xsd';
        $xmlns = "http://www.imsglobal.org/xsd/imsqti_v2p1";
        
        switch (trim($this->getVersion())) {
            case '2.0.0':
                $xsdLocation = 'http://www.imsglobal.org/xsd/imsqti_v2p0.xsd';
                $xmlns = "http://www.imsglobal.org/xsd/imsqti_v2p0";
                break;
            
            case '2.1.1':
                $xsdLocation = 'http://www.imsglobal.org/xsd/qti/qtiv2p1/imsqti_v2p1p1.xsd';
                $xmlns = "http://www.imsglobal.org/xsd/imsqti_v2p1";
                break;
            
            case '2.2.0':
                $xsdLocation = 'http://www.imsglobal.org/xsd/qti/qtiv2p2/imsqti_v2p2.xsd';
                $xmlns = "http://www.imsglobal.org/xsd/imsqti_v2p2";
                break;
            
            case '2.2.1':
                $xsdLocation = 'http://www.imsglobal.org/xsd/qti/qtiv2p2/imsqti_v2p2p1.xsd';
                $xmlns = "http://www.imsglobal.org/xsd/imsqti_v2p2";
                break;
            
            case '3.0.0':
                $xsdLocation = 'http://www.imsglobal.org/xsd/qti/aqtiv1p0/imsaqti_itemv1p0_v1p0.xsd';
                $xmlns = "http://www.imsglobal.org/xsd/imsaqti_item_v1p0";
                break;
        }
    
        $rootElement->setAttribute('xmlns', $xmlns);
        $rootElement->setAttributeNS('http://www.w3.org/2000/xmlns/', 'xmlns:xsi', 'http://www.w3.org/2001/XMLSchema-instance');
        $rootElement->setAttributeNS('http://www.w3.org/2001/XMLSchema-instance', 'xsi:schemaLocation', "${xmlns} ${xsdLocation}");
    }
protected function decorateRootElement(DOMElement $rootElement)
    {
        $xsdLocation = 'http://www.imsglobal.org/xsd/qti/qtiv2p1/imsqti_v2p1.xsd';
        $xmlns = "http://www.imsglobal.org/xsd/imsqti_v2p1";
        
        switch (trim($this->getVersion())) {
            case '2.0.0':
                $xsdLocation = 'http://www.imsglobal.org/xsd/imsqti_v2p0.xsd';
                $xmlns = "http://www.imsglobal.org/xsd/imsqti_v2p0";
                break;
            
            case '2.1.1':
                $xsdLocation = 'http://www.imsglobal.org/xsd/qti/qtiv2p1/imsqti_v2p1p1.xsd';
                $xmlns = "http://www.imsglobal.org/xsd/imsqti_v2p1";
                break;
            
            case '2.2.0':
                $xsdLocation = 'http://www.imsglobal.org/xsd/qti/qtiv2p2/imsqti_v2p2.xsd';
                $xmlns = "http://www.imsglobal.org/xsd/imsqti_v2p2";
                break;
            
            case '2.2.1':
                $xsdLocation = 'http://www.imsglobal.org/xsd/qti/qtiv2p2/imsqti_v2p2p1.xsd';
                $xmlns = "http://www.imsglobal.org/xsd/imsqti_v2p2";
                break;
            
            case '3.0.0':
                $xsdLocation = 'http://www.imsglobal.org/xsd/qti/aqtiv1p0/imsaqti_itemv1p0_v1p0.xsd';
                $xmlns = "http://www.imsglobal.org/xsd/imsaqti_item_v1p0";
                break;
        }
    
        $rootElement->setAttribute('xmlns', $xmlns);
        $rootElement->setAttributeNS('http://www.w3.org/2000/xmlns/', 'xmlns:xsi', 'http://www.w3.org/2001/XMLSchema-instance');
        $rootElement->setAttributeNS('http://www.w3.org/2001/XMLSchema-instance', 'xsi:schemaLocation', "${xmlns} ${xsdLocation}");
    }
protected function decorateRootElement ( DOMElement $ rootElement ) { $ xsdLocation = 'http://www.imsglobal.org/xsd/qti/qtiv2p1/imsqti_v2p1.xsd' ; $ xmlns = "http://www.imsglobal.org/xsd/imsqti_v2p1" ; switch ( trim ( $ this -> getVersion ( ) ) ) { case '2.0.0' : $ xsdLocation = 'http://www.imsglobal.org/xsd/imsqti_v2p0.xsd' ; $ xmlns = "http://www.imsglobal.org/xsd/imsqti_v2p0" ; break ; case '2.1.1' : $ xsdLocation = 'http://www.imsglobal.org/xsd/qti/qtiv2p1/imsqti_v2p1p1.xsd' ; $ xmlns = "http://www.imsglobal.org/xsd/imsqti_v2p1" ; break ; case '2.2.0' : $ xsdLocation = 'http://www.imsglobal.org/xsd/qti/qtiv2p2/imsqti_v2p2.xsd' ; $ xmlns = "http://www.imsglobal.org/xsd/imsqti_v2p2" ; break ; case '2.2.1' : $ xsdLocation = 'http://www.imsglobal.org/xsd/qti/qtiv2p2/imsqti_v2p2p1.xsd' ; $ xmlns = "http://www.imsglobal.org/xsd/imsqti_v2p2" ; break ; case '3.0.0' : $ xsdLocation = 'http://www.imsglobal.org/xsd/qti/aqtiv1p0/imsaqti_itemv1p0_v1p0.xsd' ; $ xmlns = "http://www.imsglobal.org/xsd/imsaqti_item_v1p0" ; break ; } $ rootElement -> setAttribute ( 'xmlns' , $ xmlns ) ; $ rootElement -> setAttributeNS ( 'http://www.w3.org/2000/xmlns/' , 'xmlns:xsi' , 'http://www.w3.org/2001/XMLSchema-instance' ) ; $ rootElement -> setAttributeNS ( 'http://www.w3.org/2001/XMLSchema-instance' , 'xsi:schemaLocation' , "${xmlns} ${xsdLocation}" ) ; }
Decorate the root element of the XmlAssessmentDocument with the appropriate
namespaces and schema definition.

@param \DOMElement $rootElement The root DOMElement object of the document to decorate.
Decorate the root element of the XmlAssessmentDocument with the appropriate namespaces and schema definition .