All NT version of Windows (Win2k and Xp) and the later versions (Vista and Win7) can be installed in logical partitions. That is my setup as I have Win7, Xp, Vista and Win2k in sda6, sda7, sda8 and sda9 respectively.
All MS Windows can be installed in logical partitions "if" there is a primary partition to house their boot loaders. I use a Dos fat32 sda1. Why? because I can put Grub and install a Dos there too.
Check out
this thread for the arrangement.
Regarding OP task I suggest two methods
Method A - MS Windows way -easier
Just install Win7 in any disk or any partition. Its installer will find Xp and deposit Win7 boot loader bootmgr there. It will then replace Xp partition's boot sector with WIn7's version and nuke the Grub in the MBR. Bootmgr will boot Win7 directly and Xp indirectly by loading NTLDR if the user specifies an earlier version of MS Windows.
After both Xp and Win7 working normally, boot up Ubuntu CD and do a Grub-install (say Ubuntu is in sda3)
Code:
sudo mkdir /mnt/sda3
mount /dev/sda3 /mnt/sda3
grub-install --root-directory=/mnt/sda3 /dev/sda
Ubuntu's Grub2 will then work as before but if WIndows is chosen there is now a dual boot system for Xp and Win7 inside.
The work is Grub2 boots up Xp's boot secton (from "chainliader +1"). The residing boot sector code loads boogmgr. Win7 or Xp will then be selected by the user.
In this method the OP can see both MS partitions.
Method B - Linux way
Before installing Win7 hide the Xp partition, use any of the partitioning tool to change the partition Type 7 to 17. Create a primary partition, make it bootable and format it in Ubuntu by command, say it is sda2
Code:
mkfs.ntfs /dev/sda2
Install Win7 into it. Its installer will seize sda2 as it is the correct and only partition installable.
Boot up Ubuntu and put Grub2 back in the MBR (step as the above).
Amend grub.cfg
(a) Add Win7 partition to Grub2 menu with the "chainloader +1"
(b) hide Xp, unhide Win7 when booting Win7 and
(c) hide Win7, unhide xp when booting Xp
In this set up one Windows is hidden while booting the other. The advantage is each MS Windows has its own boot loader and not dependent on each other.