XBRL.php
private function getNonExemptArcAttributes( $arc )
	{
		$arcAttributes = array( 'order' => array( // 3.5.3.9.5 If the order attribute is not defined then it defaults to 1
				'name' => 'order',
				'type' => 'order',
				'namespace' => null,
				'prefix' => "",
				'value' => 1 )
		);

		// Use the DOM classes because they expose the node properties and will enumerate all attributes
		$domNode = dom_import_simplexml( $arc );
		if ( $domNode->hasAttributes() )
		{
			foreach( $domNode->attributes as $attrKey => $attrNode )
			{
				// 'use', 'priority' and the xlink attributes are exempted from the arc equivalency tests
				if ( in_array( $attrNode->localName, array( 'priority', 'use' ) ) || $attrNode->namespaceURI == XBRL_Constants::$standardPrefixes[ STANDARD_PREFIX_XLINK ] ) continue;

				$qname = new QName( $attrNode->prefix, $attrNode->namespaceURI, $attrNode->localName );
				$arcAttributes[ $qname->clarkNotation() ] = array(
					'name' => $attrNode->localName,
					'type' => $attrNode->nodeName,
					'namespace' => $attrNode->namespaceURI,
					'prefix' => $attrNode->prefix,
					'value' => $attrNode->nodeValue
				);

				if ( ! $attrNode->nextSibling ) break;
				$attrNode = $attrNode->nextSibling;
			}
		}

		return $arcAttributes;
	}
private function getNonExemptArcAttributes( $arc )
	{
		$arcAttributes = array( 'order' => array( // 3.5.3.9.5 If the order attribute is not defined then it defaults to 1
				'name' => 'order',
				'type' => 'order',
				'namespace' => null,
				'prefix' => "",
				'value' => 1 )
		);

		// Use the DOM classes because they expose the node properties and will enumerate all attributes
		$domNode = dom_import_simplexml( $arc );
		if ( $domNode->hasAttributes() )
		{
			foreach( $domNode->attributes as $attrKey => $attrNode )
			{
				// 'use', 'priority' and the xlink attributes are exempted from the arc equivalency tests
				if ( in_array( $attrNode->localName, array( 'priority', 'use' ) ) || $attrNode->namespaceURI == XBRL_Constants::$standardPrefixes[ STANDARD_PREFIX_XLINK ] ) continue;

				$qname = new QName( $attrNode->prefix, $attrNode->namespaceURI, $attrNode->localName );
				$arcAttributes[ $qname->clarkNotation() ] = array(
					'name' => $attrNode->localName,
					'type' => $attrNode->nodeName,
					'namespace' => $attrNode->namespaceURI,
					'prefix' => $attrNode->prefix,
					'value' => $attrNode->nodeValue
				);

				if ( ! $attrNode->nextSibling ) break;
				$attrNode = $attrNode->nextSibling;
			}
		}

		return $arcAttributes;
	}
private function getNonExemptArcAttributes ( $ arc ) { $ arcAttributes = array ( 'order' => array ( // 3.5.3.9.5 If the order attribute is not defined then it defaults to 1
 'name' => 'order' , 'type' => 'order' , 'namespace' => null , 'prefix' => "" , 'value' => 1 ) ) ; // Use the DOM classes because they expose the node properties and will enumerate all attributes
 $ domNode = dom_import_simplexml ( $ arc ) ; if ( $ domNode -> hasAttributes ( ) ) { foreach ( $ domNode -> attributes as $ attrKey => $ attrNode ) { // 'use', 'priority' and the xlink attributes are exempted from the arc equivalency tests
 if ( in_array ( $ attrNode -> localName , array ( 'priority' , 'use' ) ) || $ attrNode -> namespaceURI == XBRL_Constants :: $ standardPrefixes [ STANDARD_PREFIX_XLINK ] ) continue ; $ qname = new QName ( $ attrNode -> prefix , $ attrNode -> namespaceURI , $ attrNode -> localName ) ; $ arcAttributes [ $ qname -> clarkNotation ( ) ] = array ( 'name' => $ attrNode -> localName , 'type' => $ attrNode -> nodeName , 'namespace' => $ attrNode -> namespaceURI , 'prefix' => $ attrNode -> prefix , 'value' => $ attrNode -> nodeValue ) ; if ( ! $ attrNode -> nextSibling ) break ; $ attrNode = $ attrNode -> nextSibling ; } } return $ arcAttributes ; }
Create a list of exempt attributes to be used in an arc equivalency test
2018-05-01 At the moment this function is only used on calculation link arcs but needs to be applied to all arc types
@param SimpleXMLElement $arc
@return array
Create a list of exempt attributes to be used in an arc equivalency test 2018 - 05 - 01 At the moment this function is only used on calculation link arcs but needs to be applied to all arc types