XBRL.php
private function validateXLinkLocatorAttributes( $xlinkAttributes, $linkbaseName, $linkbaseHRef )
	{
		if ( ! XBRL::isValidating() ) return true;

		$result = true;

		if ( ! property_exists( $xlinkAttributes, 'type' ) )
		{
			$this->reportMissingLocatorAttribute( '3.5.3.7.1', 'type', $linkbaseName );
			$result = false;
		}

		if ( ! property_exists( $xlinkAttributes, 'label' ) )
		{
			$this->reportMissingLocatorAttribute( '3.5.3.7.3', 'label', $linkbaseName );
			$result = false;
		}

		if ( ! property_exists( $xlinkAttributes, 'href' ) )
		{
			$this->reportMissingLocatorAttribute( '3.5.3.7.2', 'href', $linkbaseName );
			return false;
		}

		// BMS 2018-04-16 This have been moved to a function called 'validateLocator'
		// $href = (string) $xlinkAttributes->href;
		// $parts = parse_url( $href );
		// if ( ! isset( $parts['path'] ) )
		// {
		// 	if ( ! isset( $parts['fragment'] ) )
		// 	{
		// 		$this->log()->taxonomy_validation( "3.5.3.7.2", "The href of the locator is not valid",
		// 			array(
		// 				'linkbase' => $linkbaseName,
		// 				'href' => $href,
		// 			)
		// 		);
        //
		// 		return false;
		// 	}
        //
		// 	// The locator points to a reference that has already been loaded.  Just check that it has.
		// 	$result = isset( $this->linkbaseIds[ basename( $linkbaseHRef ) ][ trim( $parts['fragment'], '#' ) ] );
		// 	return $result;
		// }
        //
		// if ( XBRL::endsWith( $parts['path'], '.xml' ) )
		// {
		// 	// It's a linkbase reference
		// 	if ( isset( $this->linkbaseIds[ $parts['path'] ] ) )
		// 	{
		// 		return true;
		// 	}
        //
		// 	$linkbaseRef = array(
		// 		'type' => (string) $xlinkAttributes->type,
		// 		// BMS 2017-10-27 This makes the linkbase relative to the location of the schema file which is not correct
		// 		// 'href' => XBRL::resolve_path( $taxonomy->getSchemaLocation(), $href ),
		// 		'href' => XBRL::resolve_path( $this->schemaLocation, $parts['path'] ),
		// 		'role' => XBRL_Constants::$anyLinkbaseRef,
		// 		'arcrole' => \XBRL_Constants::$arcRoleLinkbase,
		// 		'title' => '',
		// 		'base' => '',
		// 	);
        //
		// 	$this->processPresentationLinkbase( $linkbaseRef );
		// 	$this->processLabelLinkbase( $linkbaseRef );
		// 	$this->processDefinitionLinkbase( $linkbaseRef );
		// 	$this->processCalculationLinkbase( $linkbaseRef );
		// 	// Handle custom linkbases
		// 	$this->processCustomLinkbaseArcRoles( $linkbaseRef );
        //
		// 	return true;
		// }
        //
		// /**
		//  * @var XBRL $taxonomy
		//  */
		// $taxonomy = $parts['path'] == $this->getTaxonomyXSD()
		// 	? $this
		// 	: $this->getTaxonomyForXSD( $parts['path'] );
        //
		// if ( ! $taxonomy )
		// {
		// 	// If the linkbase is 'label' look in the labels
		// 	if ( $linkbaseName == 'labels' )
		// 	{
		// 		$labelsHref =& $this->context->labels[ XBRL_Constants::$defaultLinkRole ]['labelshref'];
		// 		if ( ! isset( $labelsHref[ basename( $parts['path'] ) ] ) ||
		// 			 ! isset( $labelsHref[ basename( $parts['path'] ) ][ $parts['fragment'] ] ) )
		// 		{
		// 			$result = false;
		// 		}
		// 	}
		// 	else
		// 	{
		// 		// Look for the taxonomy and include its contents in the DTS
		// 		$xsd = $this->resolve_path( $this->getSchemaLocation(), $href );
		// 		$xsd = strpos( $xsd, '#' ) ? strstr( $xsd, '#', true ) : $xsd;
        //
		// 		$taxonomy = XBRL::withTaxonomy( $xsd );
		// 		// $taxonomy = $this->getTaxonomyForXSD( $xsd );
		// 	}
		// }
        //
		// if ( $taxonomy )
		// {
		// 	// BMS 2018-04-16	This is required by the XBRL 2.1 specification (see test 2012 V-02)
		// 	$element =& $taxonomy->getElementById( $parts['fragment'] );
		// 	if ( ! $element )
		// 	{
		// 		$this->log()->taxonomy_validation( "3.5.3.9.2", "The concept of the locator does not exist in the DTS",
		// 			array(
		// 				'href' => $href,
		// 				'linkbase' => $linkbaseName,
		// 			)
		// 		);
		// 		$result = false;
		// 	}
		// }
		// else
		// {
		// 	$this->log()->taxonomy_validation( "3.5.3.7.2", "The document of the locator does not exist in the DTS",
		// 		array(
		// 			'href' => $href,
		// 			'linkbase' => $linkbaseName,
		// 		)
		// 	);
		// 	$result = false;
		// }

		return $result;
	}
private function validateXLinkLocatorAttributes( $xlinkAttributes, $linkbaseName, $linkbaseHRef )
	{
		if ( ! XBRL::isValidating() ) return true;

		$result = true;

		if ( ! property_exists( $xlinkAttributes, 'type' ) )
		{
			$this->reportMissingLocatorAttribute( '3.5.3.7.1', 'type', $linkbaseName );
			$result = false;
		}

		if ( ! property_exists( $xlinkAttributes, 'label' ) )
		{
			$this->reportMissingLocatorAttribute( '3.5.3.7.3', 'label', $linkbaseName );
			$result = false;
		}

		if ( ! property_exists( $xlinkAttributes, 'href' ) )
		{
			$this->reportMissingLocatorAttribute( '3.5.3.7.2', 'href', $linkbaseName );
			return false;
		}

		// BMS 2018-04-16 This have been moved to a function called 'validateLocator'
		// $href = (string) $xlinkAttributes->href;
		// $parts = parse_url( $href );
		// if ( ! isset( $parts['path'] ) )
		// {
		// 	if ( ! isset( $parts['fragment'] ) )
		// 	{
		// 		$this->log()->taxonomy_validation( "3.5.3.7.2", "The href of the locator is not valid",
		// 			array(
		// 				'linkbase' => $linkbaseName,
		// 				'href' => $href,
		// 			)
		// 		);
        //
		// 		return false;
		// 	}
        //
		// 	// The locator points to a reference that has already been loaded.  Just check that it has.
		// 	$result = isset( $this->linkbaseIds[ basename( $linkbaseHRef ) ][ trim( $parts['fragment'], '#' ) ] );
		// 	return $result;
		// }
        //
		// if ( XBRL::endsWith( $parts['path'], '.xml' ) )
		// {
		// 	// It's a linkbase reference
		// 	if ( isset( $this->linkbaseIds[ $parts['path'] ] ) )
		// 	{
		// 		return true;
		// 	}
        //
		// 	$linkbaseRef = array(
		// 		'type' => (string) $xlinkAttributes->type,
		// 		// BMS 2017-10-27 This makes the linkbase relative to the location of the schema file which is not correct
		// 		// 'href' => XBRL::resolve_path( $taxonomy->getSchemaLocation(), $href ),
		// 		'href' => XBRL::resolve_path( $this->schemaLocation, $parts['path'] ),
		// 		'role' => XBRL_Constants::$anyLinkbaseRef,
		// 		'arcrole' => \XBRL_Constants::$arcRoleLinkbase,
		// 		'title' => '',
		// 		'base' => '',
		// 	);
        //
		// 	$this->processPresentationLinkbase( $linkbaseRef );
		// 	$this->processLabelLinkbase( $linkbaseRef );
		// 	$this->processDefinitionLinkbase( $linkbaseRef );
		// 	$this->processCalculationLinkbase( $linkbaseRef );
		// 	// Handle custom linkbases
		// 	$this->processCustomLinkbaseArcRoles( $linkbaseRef );
        //
		// 	return true;
		// }
        //
		// /**
		//  * @var XBRL $taxonomy
		//  */
		// $taxonomy = $parts['path'] == $this->getTaxonomyXSD()
		// 	? $this
		// 	: $this->getTaxonomyForXSD( $parts['path'] );
        //
		// if ( ! $taxonomy )
		// {
		// 	// If the linkbase is 'label' look in the labels
		// 	if ( $linkbaseName == 'labels' )
		// 	{
		// 		$labelsHref =& $this->context->labels[ XBRL_Constants::$defaultLinkRole ]['labelshref'];
		// 		if ( ! isset( $labelsHref[ basename( $parts['path'] ) ] ) ||
		// 			 ! isset( $labelsHref[ basename( $parts['path'] ) ][ $parts['fragment'] ] ) )
		// 		{
		// 			$result = false;
		// 		}
		// 	}
		// 	else
		// 	{
		// 		// Look for the taxonomy and include its contents in the DTS
		// 		$xsd = $this->resolve_path( $this->getSchemaLocation(), $href );
		// 		$xsd = strpos( $xsd, '#' ) ? strstr( $xsd, '#', true ) : $xsd;
        //
		// 		$taxonomy = XBRL::withTaxonomy( $xsd );
		// 		// $taxonomy = $this->getTaxonomyForXSD( $xsd );
		// 	}
		// }
        //
		// if ( $taxonomy )
		// {
		// 	// BMS 2018-04-16	This is required by the XBRL 2.1 specification (see test 2012 V-02)
		// 	$element =& $taxonomy->getElementById( $parts['fragment'] );
		// 	if ( ! $element )
		// 	{
		// 		$this->log()->taxonomy_validation( "3.5.3.9.2", "The concept of the locator does not exist in the DTS",
		// 			array(
		// 				'href' => $href,
		// 				'linkbase' => $linkbaseName,
		// 			)
		// 		);
		// 		$result = false;
		// 	}
		// }
		// else
		// {
		// 	$this->log()->taxonomy_validation( "3.5.3.7.2", "The document of the locator does not exist in the DTS",
		// 		array(
		// 			'href' => $href,
		// 			'linkbase' => $linkbaseName,
		// 		)
		// 	);
		// 	$result = false;
		// }

		return $result;
	}
private function validateXLinkLocatorAttributes ( $ xlinkAttributes , $ linkbaseName , $ linkbaseHRef ) { if ( ! XBRL :: isValidating ( ) ) return true ; $ result = true ; if ( ! property_exists ( $ xlinkAttributes , 'type' ) ) { $ this -> reportMissingLocatorAttribute ( '3.5.3.7.1' , 'type' , $ linkbaseName ) ; $ result = false ; } if ( ! property_exists ( $ xlinkAttributes , 'label' ) ) { $ this -> reportMissingLocatorAttribute ( '3.5.3.7.3' , 'label' , $ linkbaseName ) ; $ result = false ; } if ( ! property_exists ( $ xlinkAttributes , 'href' ) ) { $ this -> reportMissingLocatorAttribute ( '3.5.3.7.2' , 'href' , $ linkbaseName ) ; return false ; } // BMS 2018-04-16 This have been moved to a function called 'validateLocator'
 // $href = (string) $xlinkAttributes->href;
 // $parts = parse_url( $href );
 // if ( ! isset( $parts['path'] ) )
 // {
 // 	if ( ! isset( $parts['fragment'] ) )
 // 	{
 // 		$this->log()->taxonomy_validation( "3.5.3.7.2", "The href of the locator is not valid",
 // 			array(
 // 				'linkbase' => $linkbaseName,
 // 				'href' => $href,
 // 			)
 // 		);
 //
 // 		return false;
 // 	}
 //
 // 	// The locator points to a reference that has already been loaded.  Just check that it has.
 // 	$result = isset( $this->linkbaseIds[ basename( $linkbaseHRef ) ][ trim( $parts['fragment'], '#' ) ] );
 // 	return $result;
 // }
 //
 // if ( XBRL::endsWith( $parts['path'], '.xml' ) )
 // {
 // 	// It's a linkbase reference
 // 	if ( isset( $this->linkbaseIds[ $parts['path'] ] ) )
 // 	{
 // 		return true;
 // 	}
 //
 // 	$linkbaseRef = array(
 // 		'type' => (string) $xlinkAttributes->type,
 // 		// BMS 2017-10-27 This makes the linkbase relative to the location of the schema file which is not correct
 // 		// 'href' => XBRL::resolve_path( $taxonomy->getSchemaLocation(), $href ),
 // 		'href' => XBRL::resolve_path( $this->schemaLocation, $parts['path'] ),
 // 		'role' => XBRL_Constants::$anyLinkbaseRef,
 // 		'arcrole' => \XBRL_Constants::$arcRoleLinkbase,
 // 		'title' => '',
 // 		'base' => '',
 // 	);
 //
 // 	$this->processPresentationLinkbase( $linkbaseRef );
 // 	$this->processLabelLinkbase( $linkbaseRef );
 // 	$this->processDefinitionLinkbase( $linkbaseRef );
 // 	$this->processCalculationLinkbase( $linkbaseRef );
 // 	// Handle custom linkbases
 // 	$this->processCustomLinkbaseArcRoles( $linkbaseRef );
 //
 // 	return true;
 // }
 //
 // /**
 //  * @var XBRL $taxonomy
 //  */
 // $taxonomy = $parts['path'] == $this->getTaxonomyXSD()
 // 	? $this
 // 	: $this->getTaxonomyForXSD( $parts['path'] );
 //
 // if ( ! $taxonomy )
 // {
 // 	// If the linkbase is 'label' look in the labels
 // 	if ( $linkbaseName == 'labels' )
 // 	{
 // 		$labelsHref =& $this->context->labels[ XBRL_Constants::$defaultLinkRole ]['labelshref'];
 // 		if ( ! isset( $labelsHref[ basename( $parts['path'] ) ] ) ||
 // 			 ! isset( $labelsHref[ basename( $parts['path'] ) ][ $parts['fragment'] ] ) )
 // 		{
 // 			$result = false;
 // 		}
 // 	}
 // 	else
 // 	{
 // 		// Look for the taxonomy and include its contents in the DTS
 // 		$xsd = $this->resolve_path( $this->getSchemaLocation(), $href );
 // 		$xsd = strpos( $xsd, '#' ) ? strstr( $xsd, '#', true ) : $xsd;
 //
 // 		$taxonomy = XBRL::withTaxonomy( $xsd );
 // 		// $taxonomy = $this->getTaxonomyForXSD( $xsd );
 // 	}
 // }
 //
 // if ( $taxonomy )
 // {
 // 	// BMS 2018-04-16	This is required by the XBRL 2.1 specification (see test 2012 V-02)
 // 	$element =& $taxonomy->getElementById( $parts['fragment'] );
 // 	if ( ! $element )
 // 	{
 // 		$this->log()->taxonomy_validation( "3.5.3.9.2", "The concept of the locator does not exist in the DTS",
 // 			array(
 // 				'href' => $href,
 // 				'linkbase' => $linkbaseName,
 // 			)
 // 		);
 // 		$result = false;
 // 	}
 // }
 // else
 // {
 // 	$this->log()->taxonomy_validation( "3.5.3.7.2", "The document of the locator does not exist in the DTS",
 // 		array(
 // 			'href' => $href,
 // 			'linkbase' => $linkbaseName,
 // 		)
 // 	);
 // 	$result = false;
 // }
 return $ result ; }
Validate the existence of XLink properties for locators

@param SimpleXMLElement $xlinkAttributes
@param string $linkbaseName
@param array $linkbaseHRef
@return boolean
Validate the existence of XLink properties for locators