String simpleSeqencingUri = null;
// get all organization elements. need to set namespace
Element rootElement = doc.getRootElement();
String nsuri = rootElement.getNamespace().getURI();
// look for the adl cp namespace that differs a scorm package from a normal cp package
Namespace nsADL = rootElement.getNamespaceForPrefix("adlcp");
if (nsADL != null ) adluri = nsADL.getURI();
Namespace nsADLSeq = rootElement.getNamespaceForPrefix("adlseq");
if (nsADLSeq != null ) seqencingUri = nsADLSeq.getURI();
Namespace nsADLSS = rootElement.getNamespaceForPrefix("imsss");
if (nsADLSS != null ) simpleSeqencingUri = nsADLSS.getURI();
// we can only support scorm 1.2 so far.
if (adluri != null && !((adluri.indexOf("adlcp_rootv1p2") != -1) || (adluri.indexOf("adlcp_rootv1p3") != -1))){
//we dont have have scorm 1.2 or 1.3 namespace so it can't be a scorm package
throw new AddingResourceException("scorm.no.scorm.namespace");
}