protected function importSchema( $schemaLocation, $depth = 0, $mainSchema = false )
	{
		$xbrlDocument = XBRL::getXml( $schemaLocation, $this->context );
		if ( $xbrlDocument === null )
		{
			$this->log()->taxonomy_validation( "schema", "Unable to load taxonomy file ",
				array(
					'xsd' => "'$schemaLocation '",
				)
			);
			return;
		}

		$namespace = (string) $xbrlDocument['targetNamespace'];
		$classname = XBRL::class_from_namespace( $namespace );

		/**
		 * @var XBRL $xbrl
		 */
		$xbrl = new $classname();
		$xbrl->context =& $this->context;
		// if ( $mainSchema )
		// {
		// 	$xbrl->context->setIsExtensionTaxonomy();
		// 	$xbrl->context->types->clearElements();
		// }
		// $taxonomy = $xbrl->loadTaxonomy( $schemaLocation, $xbrlDocument, $namespace, $depth + 1 );
		$taxonomy = $xbrl->loadSchema( $schemaLocation, $xbrlDocument, $namespace, $depth + 1 );
		if ( ! $taxonomy )
		{
			$this->log()->warning( "Unable to create taxonomy from schema file '$schemaLocation'" );
			return;
		}

		$this->importedFiles[] = $schemaLocation;
		$namespace = $taxonomy->getNamespace();
		// if ( $mainSchema ) $this->namespace = $namespace;
	}