XBRL.php
private function validateAppInfo()
	{
		$nodes = $this->xbrlDocument->children( XBRL_Constants::$standardPrefixes[ STANDARD_PREFIX_SCHEMA ] );
		if ( property_exists( $nodes, 'annotation' ) )
		{
			$annotations = $nodes->annotation;
			foreach ( $annotations as $annotationKey => $annotation )
			{
				if ( property_exists( $annotation, 'appinfo' ) )
				{
					/**
					 * @var SchemaTypes $types
					 */
					$types = XBRL_Types::getInstance();

					$domNode = dom_import_simplexml( $annotation->appinfo );
					foreach( $domNode->childNodes as $element => /** @var DOMNode $node */ $node )
					{
						if ( $node->nodeType != XML_ELEMENT_NODE ) continue;

						if ( $node->localName == 'linkbase' )
						{
							$this->validateLinkbase( $node );
							continue;
						}

						// If there is no type then ignore the element
						$tax = $this->getTaxonomyForNamespace( $node->namespaceURI );
						// Non-existant or built-in ones like 'linkbase' will not return a taxonomy
						if ( ! $tax ) continue;
						$prefix = $tax->getPrefix();
						if ( ! ( $elementType = $types->getElement( $node->localName, $prefix ) ) ) continue;
						if ( ! isset( $elementType['types'][0] ) ) continue;

						// Check to see if the element type resolves to a decimal (such as an integer)
						if ( ! $types->resolvesToBaseType( $elementType['types'][0], array( 'xs:decimal' ) ) ) continue;

						// If it does, can the value be coerced to a numeric?
						if ( is_numeric( $node->nodeValue ) ) continue;

						$this->log()->taxonomy_validation( "4.9", "Element value type mismatch",
							array(
								'element' => $node->tagName,
								'value' => $node->nodeValue
							)
						);
					}
				}
			}
		}
	}
private function validateAppInfo()
	{
		$nodes = $this->xbrlDocument->children( XBRL_Constants::$standardPrefixes[ STANDARD_PREFIX_SCHEMA ] );
		if ( property_exists( $nodes, 'annotation' ) )
		{
			$annotations = $nodes->annotation;
			foreach ( $annotations as $annotationKey => $annotation )
			{
				if ( property_exists( $annotation, 'appinfo' ) )
				{
					/**
					 * @var SchemaTypes $types
					 */
					$types = XBRL_Types::getInstance();

					$domNode = dom_import_simplexml( $annotation->appinfo );
					foreach( $domNode->childNodes as $element => /** @var DOMNode $node */ $node )
					{
						if ( $node->nodeType != XML_ELEMENT_NODE ) continue;

						if ( $node->localName == 'linkbase' )
						{
							$this->validateLinkbase( $node );
							continue;
						}

						// If there is no type then ignore the element
						$tax = $this->getTaxonomyForNamespace( $node->namespaceURI );
						// Non-existant or built-in ones like 'linkbase' will not return a taxonomy
						if ( ! $tax ) continue;
						$prefix = $tax->getPrefix();
						if ( ! ( $elementType = $types->getElement( $node->localName, $prefix ) ) ) continue;
						if ( ! isset( $elementType['types'][0] ) ) continue;

						// Check to see if the element type resolves to a decimal (such as an integer)
						if ( ! $types->resolvesToBaseType( $elementType['types'][0], array( 'xs:decimal' ) ) ) continue;

						// If it does, can the value be coerced to a numeric?
						if ( is_numeric( $node->nodeValue ) ) continue;

						$this->log()->taxonomy_validation( "4.9", "Element value type mismatch",
							array(
								'element' => $node->tagName,
								'value' => $node->nodeValue
							)
						);
					}
				}
			}
		}
	}
private function validateAppInfo ( ) { $ nodes = $ this -> xbrlDocument -> children ( XBRL_Constants :: $ standardPrefixes [ STANDARD_PREFIX_SCHEMA ] ) ; if ( property_exists ( $ nodes , 'annotation' ) ) { $ annotations = $ nodes -> annotation ; foreach ( $ annotations as $ annotationKey => $ annotation ) { if ( property_exists ( $ annotation , 'appinfo' ) ) { /**
					 * @var SchemaTypes $types
					 */ $ types = XBRL_Types :: getInstance ( ) ; $ domNode = dom_import_simplexml ( $ annotation -> appinfo ) ; foreach ( $ domNode -> childNodes as $ element => /** @var DOMNode $node */ $ node ) { if ( $ node -> nodeType != XML_ELEMENT_NODE ) continue ; if ( $ node -> localName == 'linkbase' ) { $ this -> validateLinkbase ( $ node ) ; continue ; } // If there is no type then ignore the element
 $ tax = $ this -> getTaxonomyForNamespace ( $ node -> namespaceURI ) ; // Non-existant or built-in ones like 'linkbase' will not return a taxonomy
 if ( ! $ tax ) continue ; $ prefix = $ tax -> getPrefix ( ) ; if ( ! ( $ elementType = $ types -> getElement ( $ node -> localName , $ prefix ) ) ) continue ; if ( ! isset ( $ elementType [ 'types' ] [ 0 ] ) ) continue ; // Check to see if the element type resolves to a decimal (such as an integer)
 if ( ! $ types -> resolvesToBaseType ( $ elementType [ 'types' ] [ 0 ] , array ( 'xs:decimal' ) ) ) continue ; // If it does, can the value be coerced to a numeric?
 if ( is_numeric ( $ node -> nodeValue ) ) continue ; $ this -> log ( ) -> taxonomy_validation ( "4.9" , "Element value type mismatch" , array ( 'element' => $ node -> tagName , 'value' => $ node -> nodeValue ) ) ; } } } } }
Lax validation of the elements in the appinfo element
Lax validation of the elements in the appinfo element