The Elements of XML Style

By Erik Wilde
September 18, 2008 | Comments: 5

Recently, I have been approached to consider writing a small book to be called The Elements of XML Style. My initial reaction was that I liked the title and my personal interpretation of it. My idea is that a book like this should be about best practices and established patterns around XML usage, it definitely should not be an introductory text. So I am not thinking about a book that teaches any specific technology, but rather one that assumes knowledge of technologies (or the willingness to look them up). While the book would be rather brief and thus should be something not taking a year or so, I am still wondering how much demand there would be.

What I think should be covered in a book like this would be things like the following subjects (this list is definitely incomplete, suggestions to complete it are very welcome):

  • When to use elements, when to use attributes.
  • How to choose names for elements and attributes.
  • How to deal with sets of interlinked XML documents (Entities, XML Catalogs, XInclude).
  • How to deal with non-XML data associated with XML documents.
  • How to use and describe namespaces.
  • How to design XML schemas if the data model is not inherently tree-based.
  • How to combine schema languages for more powerful validation and how to choose the appropriate schema languages.
  • When to use XSLT, when to use XQuery, and when to use general-purpose programming languages.

In essence, the book should be for somebody who just learned all core XML technologies (for example, those covered in my XML course), and is now wondering how to apply them to real-world problems. Usually, it is hard to teach this kind of real-world grounding, because it depends a lot on the specific world that people get into once they start using what they have learned. Ideally, The Elements of XML Style could help them to get answers to questions that will inevitably surface once they start applying their theoretical knowledge.

So, I am wondering who is having an opinion about a book like this. I guess one way to look at it would be to say that there is no need for this. However, if there is a need, what should be part of such a book? What would be essential, what would be optional?


You might also be interested in:

5 Comments

It sounds like the two areas of the book are 1. designing XML documents 2. working with existing XML document designs. Both are good, but I believe #2 reaches a wider audience.

Two subjects to add to the list, though these may be too complex and implementation-specific: XML serialization to/from programming language objects; XML documents in web services (contrasting rpc vs. doc, encoded vs. literal, SOAP/WSDL vs. XML-RPC vs. XMPP vs. APP).

@reedo: it is a good point that there should be these two clearly distinct use cases of schema design and document creation. and you are right that there are many more document creators than there are schema designers. also, schema design is a real snake pit, because a schema almost always is simply the XML surface of some underlying application-level model, and writing a book about this would not be a concise guide; it would more likely be a 5-volume handbook, with specific volumes for ER-models, UML users, RDF users, and others. what i want to say that it would be important to have clearly defined focus, and the schema design and model-to-schema mappings very likely should not be part of that focus, if there should be any hope to write a rather small guide.

I've found both "Effective XML", Harold (2003) and "XML and SGML Cookbook", Jelliffe (1998) to be useful in this space, but getting old and not as comprehensive (esp. regarding processing) as what you are suggesting. I think such a book is sorely needed. I'll be first in line to pre-order :-).

thanks for the book pointers, peter! i just made amazon.com a little bit happier... i have to admit that i don't know both books because i simply stopped following the XML book flood at some point in time, but both authors definitely are good authors to look at for inspiration!

Hello,
for a long time I have been following your contributions on the web in order to prepare a format for data and text that works in multilingual research in the humanities. I am a researcher, not a computer specialist, so developing such a framework needs a lot more effort from myself than your "normal" readers.
The questions you raise as central topics for your book are exactly what I have been struggling with over the last months. I hope to have come to good solutions, while the last question: When to use XSLT or XQuery? ist still unsolved.
I would certainly love to read your book.
Best,
M.Sh.

News Topics

Recommended for You

Got a Question?