XBRL.php
private function getCompleteDescendantElement( $element, $types )
	{
		$ancestor = $this->getAncestorElement( $element, $types );
		if ( ! $ancestor )
		{
			if ( XBRL::isValidating() )
			{
				$this->log()->taxonomy_validation( "5.1", "Unable to locate the ancestor element for the derived element",
					array(
						'concept' => $name,
					)
				);
			}
			return $element;
		}
		else
		{
			if ( XBRL_Instance::isEmpty( $element, 'type' ) ) unset( $element['type'] );
			if ( XBRL_Instance::isEmpty( $element, 'substitutionGroup' ) ) unset( $element['substitutionGroup'] );
			return array_merge( $ancestor, $element );
		}
	}
private function getCompleteDescendantElement( $element, $types )
	{
		$ancestor = $this->getAncestorElement( $element, $types );
		if ( ! $ancestor )
		{
			if ( XBRL::isValidating() )
			{
				$this->log()->taxonomy_validation( "5.1", "Unable to locate the ancestor element for the derived element",
					array(
						'concept' => $name,
					)
				);
			}
			return $element;
		}
		else
		{
			if ( XBRL_Instance::isEmpty( $element, 'type' ) ) unset( $element['type'] );
			if ( XBRL_Instance::isEmpty( $element, 'substitutionGroup' ) ) unset( $element['substitutionGroup'] );
			return array_merge( $ancestor, $element );
		}
	}
private function getCompleteDescendantElement ( $ element , $ types ) { $ ancestor = $ this -> getAncestorElement ( $ element , $ types ) ; if ( ! $ ancestor ) { if ( XBRL :: isValidating ( ) ) { $ this -> log ( ) -> taxonomy_validation ( "5.1" , "Unable to locate the ancestor element for the derived element" , array ( 'concept' => $ name , ) ) ; } return $ element ; } else { if ( XBRL_Instance :: isEmpty ( $ element , 'type' ) ) unset ( $ element [ 'type' ] ) ; if ( XBRL_Instance :: isEmpty ( $ element , 'substitutionGroup' ) ) unset ( $ element [ 'substitutionGroup' ] ) ; return array_merge ( $ ancestor , $ element ) ; } }
Return an element with attributes updated if necessary

@param array $element An array representing the current item
@param XBRL_Types $types A reference to the current types
@return array Either the descendant array with any missing pieces or the descendant array unchanged
Return an element with attributes updated if necessary