Towards a DTD for Documenting Patterns and Pattern Languages in XML

introduction

Since you've come this page, you probably already know that:

  1. The eXtenisble Markup Language (XML) is a newly endorsed standard for creating and exchanging structured documents. It is similar to HTML, except that it goes even further in separating presentation and content. [The XML 1.0 specification was released as a W3C Recommendation on February 10, 1998. More information can be found at www.w3.org/XML/ (the World Wide Web Consortium) or www.xml.com (the "XML commune")].

  2. Patterns and pattern languages are problem-solving and solution-documenting techniques that can be traced to the architect Christopher Alexander. Patterns are increasingly popular in software design, due in large part to the "Gang-of-Four", who wrote a book entitled Design Patterns: Elements of Reusable Object-Oriented Software in 1994. [The Hillside Group's "patterns home page" at www.hillside.net/patterns/patterns.html is probably the best hub for software related pattern activity on the web.]

Below you'll find my first stab at creating a document type definition (DTD) for documenting patterns in XML. A similar document has been created by Steve Roggenkamp. It can be found at www.infinet.com/~sroggen/patterns/patlangdtd.html.

An example of using this DTD to mark-up a pattern, together with some example renderings of that markup is available.

why am i doing this?

Recently I have been looking into creating a "pattern server" for the company I work for. (The Planet Group, check us out at www.pg.net.) This server would allow Planeteers to publish, search and cross reference software and organizational patterns online, resulting in all those great pattern-sharing benefits.

Given the design philosophy, the already structured format of patterns and pattern languages, and the power and utility of XML, creating and using a DTD for patterns seems like a natural choice. I wrote up some notes, sent them to the patterns-discussion mailing list and solicited comments and suggestions. (This is also how I was pointed to Steve's page.) I have incorporated many of those suggestions here.

Given the importance of collaboration and exchange in the patterns community, it seems to me that this should be a group effort. For this reason I am publishing my draft here. Please feel free to comment on, improve, or steal the DTD entirely--just let me know what you do with it. We (the pattern community) would all benefit from a standard format for pattern exchange. Consider this a request for comments.

In any case, I am pushing ahead with the "pattern server" work. I'd be willing to share code, if you're interested you can email me at rod@pg.net or rwald@hotmail.com.

the design philosophy

When I first began to consider the idea of a pattern server, largely using the wiki server (www.c2.com/cgi/wiki) as a prototype, I came up with the following desirata:

Clearly XML is a natural choice for this. In practice, my pattern server will likely be a collection of Java Servlets that can parse the XML documents and spit out HTML (since there is little client-side XML support) as well as query and report upon the document store. Regardless, using a well-formed XML DTD will make it easier to utilize these documents as pure XML.

A few XML-specific requirements are worth noting:

some open questions

The DTD below contains a number of comments and indications of areas in need of work, but in this section we outline some issues in need of particular attention.

the dtd

The latest draft (Revision 0.2 1998.06.22) is pat_dtd_0_2.html.

Previous versions include:

Feel free to commment to rod@pg.net or rwald@hotmail.com.

When you write, be sure to mention whether or not you want your comments added to the comment archive; otherwise, I'll assume you don't mind being listed.

to do