Chapter 7. Serving Dynamic XML Content

So far, we have examined how AxKit can be used to transform static XML documents. Transforming such documents via XSLT stylesheets or another means that can alter, create, or include content conditionally provides a certain level of dynamism, but most modern web sites include features or resources that need to change for each unique request. An altered version of a static source is not enough, the source itself must be generated programatically.

By now, you are surely aware of the value of separating content from presentation, and how that value increases when the documents being served are marked up using semantically rich grammar that intimately captures (or communicates) the meaning of the information they contain. The same principle holds true when creating XML-based applications—the key difference is that markup generated in an application context should attempt to most accurately reflect the structure and roles of the resources associated with (or required by) the current state of the application, rather than those of a static narrative document.

By generating only the data relevant to the current state of the application, developers working on the backend libraries have simpler and better defined targets to hit. Since the markup being generated does not include any presentational elements, the grammar for the document being produced is usually greatly simplified. Among other things, this means that the generated content can be evaluated ...

Get XML Publishing with AxKit now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.