Presentational XML
Like most armchair webmasters, I struggle to craft the right CSS file that is capable of dealing with the idiosyncracies of various web browsers. I quietly and secretly pine, like most webmasters, for the return to the days of table-ful designs, without being jumped on by the semantic folks. I herewith present: Presentational Layout Markup Language.
Presentational layout markup language utilizes the full power of XML to combine semantic information and layout information on a single file. The combination of semantic and layout information is critical for documents which may be of legal significance. If the fine print is hidden in (-200px, 0px), one has no chance to view it. PML + XHTML is a reasonable approach for this end.
Example:
<?xml version="1.0"?>
<html xmlns="http://www.w3.org/1999/html"
xmlns:p="http://tempuri.org/pml" >
<p:table p:width="100%">
<p:tr>
<p:td>
<h1>Presentational Layout Markup is to html is like saccharine is to sugar</h1>
<p>Sweet but without the guilt!</p>
</p:td>
</p:tr>
</p:table>
<html>
Tongue-in-cheek aside, there is ample justification for this approach:
- Designs tend to move from low level to higher level, which allows a person to express layout in a manner most straightforward to them. Bugginess of CSS implementations and the fact that there are so many implementations of browsers around dictate that developers work in the most reliable and expressive medium – tables.
- Like Moore’s law, bandwidth will become cheaper each year. So we should not focus on saving bandwidth, but concentrate on developer productivity. I can assure you as things stand, one is more productive with tables than with CSS, just as one is more productive with a high level programming language compared to assembly. Optimizing for bandwidth is like optimizing for CPU – doomed for extinction.
- Semantic information is preserved through the wonders of XML namespaces. After all, any self-respecting semantic web parser should understand namespaces.
- We all gave CSS a chance but it just didn’t work out well with layout. The so called semantic HTML coming out of web houses still have presentational <DIV>s which do nothing but help layout text and images. Some have nasty nested DIVs to do rounded corners. This is not a critique of the web-designers, but a critique of CSS itself. CSS was pretty straightforward for fonts, but for layout… well it just tried to fix something that wasn’t broken with tables. Namespaces would have solved it. It would have been tonnes easier for browsers to implement PML compared to CSS.
About this entry
You’re currently reading “ Presentational XML ,” an entry on Chui's Counterpoint
- Published:
- 5.11.05 / 8pm
- Category:
- General, Thinking IT
No comments
Jump to comment form | comments rss [?] | trackback uri [?]