public static function contextToIndex( $context, $explicit, $formula = null, $aspectDimension = null )
	{
		$result = array();

		foreach ( $context as $key => $dimension )
		{
			$qname = qname( $dimension['dimension'], $formula->xbrlInstance->getInstanceNamespaces() );
			if ( $qname->clarkNotation() != $aspectDimension ) continue;
			if ( $explicit )
			{
				$result[ $dimension['dimension'] ][ $dimension['member'] ] = $dimension['member'];
			}
			else
			{
				$result[ $dimension['dimension'] ] = $dimension['member'];
			}
		}

		return $result;
	}