XBRL.php
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;
	}
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;
	}
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;
 }
Import a specific schema
@param string $schemaLocation	The filename of the schema to load
@param int $depth				The depth of this schema in the net be processed
@param bool $mainSchema			If true the namespace of the imported schema will become the main schema of the object.
This is useful for extension taxonomies.
@return void
Import a specific schema