public static function IndexToContext( $index )
	{
		$result = array();
		foreach ( $index as $dimension => $members )
		{
			foreach ( $members as $memberQName => $member )
			{
				if ( is_array( $member ) )
				{
					$x = array( $memberQName => $member );
					// Remove the dimension from the member
					foreach ( $x as $key => $xml )
					{
						// $x[ $key ] =  str_replace( "</$memberQName>", "", str_replace( "<$memberQName>", "", $xml ) );
					}
					$result[] = array( 'dimension' => $dimension, 'member' => $x );
				}
				else
				{
					$result[] = array( 'dimension' => $dimension, 'member' => $member );
				}
			}
		}

		return $result;
	}