Not all XML schemas represent information that will need to be presented in print or in some kind of browser, but many, especially those representing documents, have strong ties to presentation. XML doesn't provide any built-in vocabulary for formatting and presenting information, so XML Authority itself offers no formatting tools. However, a basic understanding of the kinds of tools available for presenting your XML documents may prove very important for some key aspects of schema architecture decision-making.
At present, there are three primary approaches to presenting XML information. The first is custom application construction, which may be useful if your schema is connecting to legacy interfaces for collecting or presenting information. Some schemas are built purely for exchanging information inside of applications, and the applications provide all the overhead needed to convey that information to users in an appropriate form. The other two approaches are more generic, providing formatting vocabularies that XML applications - browsers and other renderers - can use to present the information in a variety of media.
Cascading Style Sheets (CSS), originally developed for the Web, is a formatting standard that annotates XML document trees with formatting information. Elements can be assigned roles (and those roles can vary depending on their location in the document structure) describing how they should be presented. CSS assumes that all element content is presentable content (though it can be hidden), and that attribute content is meant to contain machine-readable information only. If you plan to use CSS to present your information, remember to store information meant for people to read as element content and use attributes only to annotate that content. CSS will not transform your document content (though positioning features do allow some visual transformation), so make certain that the information in your documents appears in a sequence human readers can understand.
Extensible Style Language (XSL), which is still in development at the World Wide Web Consortium (W3C), is a standard that uses transformation to convert your XSL into formatting objects which describe its presentation. Because XSL provides complete transformations of your document, your schema doesn't need to be as concerned with the final presentation, and information can be presented in any (appropriate) sequence. Attributes and element content may both be presented in the final transformed version, allowing developers to use elements and attributes however they like. XSL does require considerably more processing than CSS and is not yet stable, but promises a more flexible set of tools for presenting information.
(XSL and CSS can also be used together - XSL transformations can be used to convert XML documents to XML or HTML that uses CSS for styling.)
Depending on your particular needs, the impact of presentation on your schema architecture may be dramatic or non-existent. If your schema will be used in a presentation context, however, you may want to explore the style tools before building your schema.
Copyright 2000 Extensibility, Inc.
Suite 250, 200 Franklin Street, Chapel Hill, North Carolina 27516