public function getSimpleTypesFromUnion( $qname )
	{
		$name = $qname instanceof QName ? "{$qname->prefix}:{$qname->localName}" : $qname;

		while (true)
		{
			if ( ! $this->hasType( $name ) ) return array();

			$type = $this->getType( $name );
			if ( isset( $type['restrictionType'] ) && $type['restrictionType'] == 'union' )
			{
				return $type['types'];
			}

			if ( ! isset( $type['parent'] ) ) return array();
			$name = $type['parent'];

		}
	}