Separating Content from Presentation: Easier Said Than Done

July 24, 2002, 11:00 PM —  ITworld — 

We say it so often we don't even listen to the words any more. "Separate
content from presentation" with XML. Information should not be
inter-twingled with any one presentation as the presentations may
(indeed will) change over time. New browsers, new devices of all sorts,
oodles of document formats -- all can be targeted from a single source
XML document. So sayeth the fundamental lore of XML.

Although this works fine for the most part, there are some situations
where it is not really possible in practice. There are some cases where
the content and the presentation are so deeply intertwined that
separating one from the other is far from straightforward.

Four cases spring to mind: graphics, tables, mathematics, and advanced
typography.

Lets deal with the graphics problem first. Graphics come in two main
flavors -- vector and bitmap. Vector graphics are quite in keeping with
the ethos of separating content from presentation espoused by XML.
Vectored formats concentrate on capturing the semantics of an image --
in terms of fundamental units such as lines, circles, fills and so on.
The objects are laid out on a virtual space. At the point on rendering,
a mapping between the virtual space and the physical space is made to
achieve the best possible rendering given the limitations of the
rendering device e.g. area in pixels, color depth and so on.

Bitmapped graphics on the other hand, are intimately tied to a
particular rendering in terms of pixel area and color depth. Bad things
typically happen if you try and resize bitmapped images as the pixels in
the image do not encode any semantics about what the image represents.
In short, they cannot be repurposed to different shapes, sizes or color
schemes without significant loss in quality.

So, surprise, surprise, when it comes to graphics and XML, vector
formats are much more in tune with the ethos of separating content from
presentation. However, there are times when a bitmapped approach is the
only one available. The images may represent facsimiles of documents
that have a legal status and therefore must be reproducible *exactly*.
No amount of philosophical twaddle about the benefits of generating
renderings from logical representations of the information will cut it
in a court of law.

We turn now to tables. If I had a penny for every second by cerebral
cortex has pondered the mysteries of tables, I would be writing this
from my hideaway Island in the Pacific via a dedicated 1GB satellite
link.

Tables have a quantum feel to them. The more you look, the more the act
of looking seems to affect their very nature. At first glance, it would
seem possible to dissect most tables into semantic structures but as you
look closer, this possibility typically sails into the sunset leaving
you with a model of rows and columns and alignments and tab stops and
vertical offsets and spans and ... So much for separating the content
from the presentation!

Sign up for ITworld's Daily newsletter
Follow ITworld on Twitter @IT_world

I like it!
Post a comment
The content of this field is kept private and will not be shown publicly.
  • Allowed HTML tags: <a> <em> <strong> <cite> <code> <ul> <ol> <li> <dl> <dt> <dd>
  • Lines and paragraphs break automatically.
peer-to-peer

Esther Schindler
If the comments are ugly, the code is ugly

claird
SVG a graphics format for 21st century

pasmith
Take Chrome OS for a test spin

Sandra Henry-Stocker
Solaris Tip: Have Your Files Changed Since Installation?

sjvn
64-bits of protection?

jfruh
Android fragments vs. the iPhone monolith

mikelgan
What Gizmodo missed about the Pro WX Wireless USB disk drive

 

Sidekick: The Good News & the Bad News
Either way you look at it Microsoft Data Center management did not follow standards or best practices in this failure. In which case it makes me wonder more about the outsourcing of corporate data much less personal data.
- mburton325

Join the conversation here

The Daily Tip

The Daily TipQuick, practical advice for IT pros. Made fresh daily.

Hot tips:

Want to cash in on your IT savvy? Send your tip to tips@itworld.com. If we post it, we'll send you a $25 Amazon e-gift card.

Newsletters

Subscribe to ITWORLD TODAY and receive the latest IT news and analysis.

I would like to receive offers via email from ITworld partners.
By clicking submit you agree to the terms and conditions outlined in ITworld's privacy policy.
Featured Sponsor

AISO founders envisioned a Web hosting company that was environmentally friendly. While the company employed energy-efficient innovations like solar panels, its infrastructure produced unacceptable power and cooling requirements. Find out how AISO leveraged AMD technology to overcome their challenge in this case study white paper.

In this whitepaper, Scalar explores the opportunity to change the landscape with respect to mission critical databases built around Oracle. Leveraging technologies such as Linux, high-end commodity processing power and Oracle RAC technology to architect, design, build and maintain database infrastructure that delivers maximum availability, reliability and performance at a fraction of traditional cost.

On a typical day, weather.com, the Web site for The Weather Channel in Atlanta, serves up between 15 million and 20 million page views. But in September 2004, when back-to-back hurricanes ransacked Florida, the peak traffic on one day more than tripled: over 70 million page views by more than 7 million unique visitors. Read the full success story now.

Marketplace