QuickBooks/SQL/Schema.php
static protected function _transform($curpath, $node, &$tables)
	{
		print('' . $curpath . '   node: ' . $node->name() . "\n");
		
		$table = '';
		$field = '';
		
		$this_sql = array();
		$other_sql = array();
		QuickBooks_SQL_Schema::mapToSchema($curpath . ' ' . $node->name(), QUICKBOOKS_SQL_SCHEMA_MAP_TO_SQL, $this_sql, $other_sql);
		
		foreach (array_merge(array( $this_sql ), $other_sql) as $sql)
		{
			$table = $sql[0];
			$field = $sql[1];
			
			/*
			if (!$sql[0] or !$sql[1])
			{
				print('		table for node: ' . $sql[0] . "\n");
				print('		field for node: ' . $sql[1] . "\n");
			}
			else
			{
				print("\n");
			}
			*/
			
			if ($table)
			{
				if (!isset($tables[$table]))
				{
					$tables[$table] = array(
						0 => $table, 
						1 => array(),		// fields
						2 => null, 			// primary key
						3 => array(), 		// other keys
						4 => array(  ), 		// uniques
						);
				}
			}
			
			if ($table and $field)
			{
				if (!isset($tables[$table][1][$field]))
				{
					$tables[$table][1][$field] = QuickBooks_SQL_Schema::mapFieldToSQLDefinition($table, $field, $node->data());
				}
			}
		}
		
		if ($node->childCount())
		{
			foreach ($node->children() as $child)
			{
				QuickBooks_SQL_Schema::_transform($curpath . ' ' . $node->name(), $child, $tables);
			}
		}
		
		return true;
	}
static protected function _transform($curpath, $node, &$tables)
	{
		print('' . $curpath . '   node: ' . $node->name() . "\n");
		
		$table = '';
		$field = '';
		
		$this_sql = array();
		$other_sql = array();
		QuickBooks_SQL_Schema::mapToSchema($curpath . ' ' . $node->name(), QUICKBOOKS_SQL_SCHEMA_MAP_TO_SQL, $this_sql, $other_sql);
		
		foreach (array_merge(array( $this_sql ), $other_sql) as $sql)
		{
			$table = $sql[0];
			$field = $sql[1];
			
			/*
			if (!$sql[0] or !$sql[1])
			{
				print('		table for node: ' . $sql[0] . "\n");
				print('		field for node: ' . $sql[1] . "\n");
			}
			else
			{
				print("\n");
			}
			*/
			
			if ($table)
			{
				if (!isset($tables[$table]))
				{
					$tables[$table] = array(
						0 => $table, 
						1 => array(),		// fields
						2 => null, 			// primary key
						3 => array(), 		// other keys
						4 => array(  ), 		// uniques
						);
				}
			}
			
			if ($table and $field)
			{
				if (!isset($tables[$table][1][$field]))
				{
					$tables[$table][1][$field] = QuickBooks_SQL_Schema::mapFieldToSQLDefinition($table, $field, $node->data());
				}
			}
		}
		
		if ($node->childCount())
		{
			foreach ($node->children() as $child)
			{
				QuickBooks_SQL_Schema::_transform($curpath . ' ' . $node->name(), $child, $tables);
			}
		}
		
		return true;
	}
Transform an XML document into an SQL schema

@param string $curpath
@param QuickBooks_XML_Node $node
@param array $tables
@return