Home | Business News | Browse by Publication | X | XML Journal

Object-oriented XSLT: a new paradigm for content management. (Content Management).

Publication: XML Journal
Publication Date: 01-AUG-03
Format: Online - approximately 3814 words
Delivery: Immediate Online Access

Article Excerpt
What could be better for managing content than separating data from presentation? How about separating data from data? Believe it or not, XSLT can actually be used to allow for different levels of data abstraction. In practical terms, this can reduce the complexity of managing Web content by an order of magnitude and facilitate code reuse. In essence, what I'm talking about here is object-oriented XSLT, or to add to the alphabet soup: OOX (pronounced ooks).

Why Use OOX?

Isolating content from presentation was the original purpose of stylesheet languages. In the conventional approach, there is just one data layer (XML) and one presentation layer (HTML), with XSL transformations (XSLT) in between. This two-layer architecture simplifies Web site management by allowing content providers to edit their data without concern for stylistic issues, and, conversely, by permitting graphics designers to set the visual tone without regard for specific content. While the two-layer model has been fruitful, XSL transformations (XSLT) empower us to extend data abstraction through the use of multiple data layers. Toward this end, I have created a general-purpose XSLT that you can easily use to apply multiple serial XSL transformations to an XML data document. But before we delve into the details, let's consider why this might be useful.

Multiple data layers

Suppose you're developing a corporate Web site in which there are three types of documents that you wish to make available to your site visitors: white papers, press releases, and external reviews. Each document is stored as XML data in its own distinct format according to its respective schema, which defines its structure. For example, a press release usually contains a headline, release date, location, and contact information, whereas an external review document might contain a title, author, publication date, and hyperlink.

Despite the structural differences in these documents, you may see the utility in making their content available to site visitors in similar ways. For example, on the home page you might want to display headlines for the five most recent press releases as well as titles for the five most recent white papers. So even though press releases and white papers have different data structures, your goal is to present their header content in the same way.

Furthermore, your site visitors may wish to read a summary before embarking upon a full-length white paper or external review. Therefore, you will probably want to give them the ability to view either a white paper abstract or the synopsis of an external review. Here again we see the need to use the same presentation format for similar content elements that are embedded in structurally dissimilar data documents.

The old way

Using the canonical, two-layer approach, you would need to create one XSL transformation to convert each data document into each presentation format. In our example, we have discussed three data documents and two presentation formats. Therefore, you would need six (three times two) distinct XSL transformations (see Figure 1).

[FIGURE 1 OMITTED]

The new way: OOX

Using data abstraction, however, you can add an intermediate data layer to your architecture. The structure of data objects occurring in this layer might be defined by a "generic" schema, suitable for representing content from all text-based corporate documents. With the addition of this layer, the characteristics that normally distinguish different corporate documents are transparent to the presentation transformations. Each presentation transformation only needs to be aware of...

Read the FULL article now - Try Goliath Business News - FREE!   
You can view this article PLUS...

  • Over 5 million business articles
  • Hundreds of the most trusted magazines, newswires, and journals (see list)
  • Premium business information that is timely and relevant
  • Unlimited Access

Now for a Limited Time, try Goliath Business News - Free for 3 Days!
Tell Me More   Terms and Conditions

Get Goliath Business News for 1 year - Just $99 (Save 65%)
Tell Me More   Terms and Conditions

Already a subscriber? Log in to view full article



More articles from XML Journal
Content management, XML, and the promise of Web services: optimizing X..., August 01, 2003
Using XSLT to generate SQL: a simple, adaptable example to get you sta..., August 01, 2003
3rd annual web services edge conference & expo: delivering .NET, Java,..., August 01, 2003
Multipass validation with XSD and Schematron part 2: using Schematron ..., August 01, 2003
JavaOne 2003: focus on XML and Web services. (Show Report)., August 01, 2003

Looking for additional articles?
Search our database of over 3 million articles.

Looking for more in-depth information on this industry?
Search our complete database of Industry & Market reports by text, subject, publication name or publication date.

About Goliath
Whether you're looking for sales prospects, competitive information, company analysis or best practices in managing your organization, Goliath can help you meet your business needs.

Our extensive business information databases empower business professionals with both the breadth and depth of credible, authoritative information they need to support their business goals. Whether it be strategic planning, sales prospecting, company research or defining management best practices - Goliath is your leading source for accurate information.