If it is the same standard MSI, you could make a transform with an Installscript Custom Action that detects:
If version < 401, etc.. then install Win98transform.mst
But if version = 5-1, then install WinXPtransform.mst
OR... have a VBscript as the front end that checks the O/S version... if it equals Win98, then run the win98.msi, but if it is WinXP, then run the winxp.msi...
NOW...getting VBscript to run in Win98 will take extra work and extra files...but in WinXP, you can use wscript.exe or cscript.exe (built in)
If you used SMS or WinInstall, etc.. you could make an exe for windows 98....