Awesome you are interesting in creating such a result format (I agree with Yaron that this is the right approach). If you need any help with or review of your code, feel free to poke me. You can find examples of existing formats in SRF, of which this one  is perhaps one of the more clear ones. I also encourage you to request commit access to the WMF SVN repository (which is where SMW and other extensions are developed), more info on that can be found here .
Jeroen De Dauw
Don't panic. Don't be evil.