I am in the early stages of creating an open source C# library that would allow developers to drop in the open SRD (http://www.d20srd.org/) into an existing project. Abstracted it is a complex set of tightly coupled business rules. Having previously worked on an adaptive object model project for health care risk management I began with that pattern in mind. Due to the high coupling of rules it is becoming apparent that the project may require some kind of scripting.

Have started researching DSL implementation I am now considering scrapping the adaptive object model for a domain specific language. I have not work with domain specific languages so my question is it reasonable to assume a domain specific language can be used to representing the open SRD?

1 Answer 1


It's reasonable and a DSL probably yield the neatest solution

For clarification, I'm assuming that your intention is to simply dump the latest version of the entire website as XHTML directly as a resource into your library. Your library will then evaluate this as a DSL and construct a suitable domain model of rules for consuming applications to use. Updates to the website will immediately translate into revised rulesets.

Given that you've already conducted some research, I imagine that you've already seen these articles and books, but here's a list of recommended reading nonetheless:

Your problem is somewhat simplified by the choice of XHTML for the website since it makes initial parsing somewhat easier.

  • I have been reading "Domain Specific Langauges" by Martin Fowler as well as some posts he has on his blog about language workbenches. I never thought about just parsing the whole website instead planned on providing tools. However it makes sense to parse since the Open SRD has also been converted to XML as well.
    – John Ruf
    Commented Feb 26, 2011 at 15:30

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.