if you partition the different logical drives into NTFS and FAT16/32, then you will be able to install XP on the NTFS logical drive, and Win98 on the FAT16/32 logical drive. but not the reverse.
have you decided what you want to install on your primary partition. you can keep your primary partition i.e. your C drive as NTFS and install WinXP on it, and format your D (logical drive) as FAT32 and install Win98. make sure your MBR displays both OS as options when your computer is loading up.
Picking pebbles on the shore of the networking ocean