HTML, to XHTML, to XML: Making the case for XML content markup

In the migration from HTML web design to XML based design, why wouldn't one choose to skip XHTML and go straight to the source, cut the middle-man and code content in XML?

It may come as a surprise or shock to hear this, just when we all thought that XHTML was the happy in-between buggy, irregular and bad HTML, and the neat, orderly, structurally valid XML. Many web designers have come to like the comfort ease of use that one finds in HTML. Besides the short-comings of badly structured HTML and the mix of presentational and layout markup (Believe me, we all know some web designers who refuse to embrace semantic markup and CSS), we can all admit to have liked the forgiving nature of HTML.

It is not more or less a universally accepted fact that HTML 4.x and its predecessors are not future-compatible enough to be used in creating valid and stable web content that is accessible, and that stays faithful to the web content presentation architecture of separating content from design, from mark-up.

XHTML in its various flavours of Transitional, Strict, and to a lesser extent Frameset are quickly becoming the standard markup languages for web content. XHTML is a representation of XML, and when valid, it is as good as any other XML document that is built upon a valid DTD especially when well written, strict and valid.

Client-side XML

XML, the term and the technology is talk about and used almost everywhere. It is thought and talked about by everyone. It is now arguably the de-facto method for presenting and exchanging data between applications, disparate technologies and products. Most of the noise is being made about server-side or inter and intra-application interfacing. for client-side use, this is mostly installed applications.

Making a case for Client-side XML

As a subset of XML, XHTML by definition and characteristics complies with formatting and structural architecture of XML. Technically,XHTML is XML. It even has a DTD (Document Type Definition). If browsers support XHTML, the it supports XML. Through my trials and research, I have found that more browser versions support XML, than these that support CSS 2.x . It is ironic that CSS is more widely used than XML markup, yet they at least have the same support. It should therefore makes sense for anyone who prefers pure XML for markup to go ahead and markup his/her content in XML as opposed to XHTML, and much less in HTML.

This document is one of many that discuss the use of XML in Web Design

http://www.cmsproducer.com/labs/xmlpagemarkup/idonnyxmlmarkup.xml

Comments

Comment viewing options

Select your preferred way to display the comments and click "Save settings" to activate your changes.

Calling CSS into XSLT

Calling CSS into XSLT An XSLT file very much resembles the static structure of the resultant document of the transformation. As such, when transforming into an XHTML file, the process one follows to embed a CSS file in the XSLT file is very similar to that one uses to call an exteranl CSS file in XHTML. Important: Make sure that you use strict XHTML rules when embedding the CSS file to avoid XSLT processor errors. <link rel="stylesheet" type="css/text" href="/whereismystyles/file.css" />

Alternatively, you can use the XML syntax for calling a stylesheet into the XML document. This code has to come at the beginning of yur XML document, and below are a few examples that can be used depending on what you want to achieve:

<?xml-stylesheet alternate="yes" title="mycss" href="first_option.css"
type="text/css"?>
<?xml-stylesheet alternate="yes" title="mycss" href="second_option.css"
type="text/css"?>
<?xml-stylesheet alternative="no" href="mainstyles.css" type="text/css"?>

NB:The specification of whther or not an entry is "alternative" is optional, and defaukts to "no" when not set.

Valid XHTML 1.0 Strict
This site is accepts Oped ID authentication for login
This Website is Built Using Semantic Markup and Cascading Style Sheets (CSS)
Some usage rights are reserved, please contact us for approval before using it