This type of configuration is not supported in Apple's setup instructions....and I would never recommend it, but you might be able to do this if you really want to.
The main reason why you would not want to do this is that you will be setting up a "double hop" wireless connection for backups. Here's what I mean......
When your Mac backs up, the signal must travel all the way back to the main wireless router over wireless and then back again from the wireless router to the Time Capsule. This takes twice as long for the signal to travel and doubles the chances of an error occurring during a backup.
The Ethernet ports are not enabled on the Time Capsule when you set it up this way, so if you want to connect the Mac using Ethernet to the Time Capsule for a large backup to save time, you cannot do this.
Backing up this way will bring new meaning to the word SLOW.
Now that I've tried to convince you to not to do this, do you still want to try do this? (It will be even more difficult if you are using Mountain Lion on your Mac, since you will have to use a workaround to install old AirPort Utility software)