|By Molly E. Holzschlag||
|March 7, 2001 12:00 AM EST||
The XML developer doesn't have to be convinced of XML's strength. You've heard it a million times: it's all about the data. The same is true on the client side. XHTML strongly embraces the separation of content and presentation, and brings XML's syntactical logic, as well as extensible opportunities, to the client-side table.
XHTML 1.0, a reformulation of HTML as an XML application, has been the W3C's Web markup recommendation (www.w3.org/TR/xhtml1/) since January 26, 2000. That's more than a year now, but client-side authors and developers of popular authoring software have been slow on the take. Much of the problem lies in the fact that XHTML is misunderstood and not well publicized. Some client-side authors don't see it as having any special advantages, and many critics have claimed that XHTML simply won't be widely adopted. This may well be proven out. XHTML has been almost completely missed by the vast majority of entry- and mid-level professionals.
Ignoring or overlooking XHTML is problematic for the professional developer. Whether it's a useful client-side methodology remains a personal question. However, knowing what it is, why it is, and how it may or may not effectively aid the work you do allows you to make an informed, empowered decision about the technologies you choose to employ.
XHTML: What and Why
In simple terms, writing documents in XHTML means that instead of authoring that old familiar HTML, you are in essence writing XML. XML, in XHTML 1.0, employs HTML as its vocabulary. So elements and attributes are not arbitrary - they're drawn directly from HTML. Similarly, XML syntax rules are applied.
But how does this help client-side authors? The answer is simple. How many of you have honestly paid much attention to the HTML you generate? Some of you will certainly say you do, but most developers - like most Web designers - are guilty of a slapdash attitude toward HTML. It's not your fault. HTML has become sloppy, in part because it's been bent in many directions to accommodate the rapid growth of the Web. And browsers are extremely forgiving of poor markup. Nothing has demanded that you write clean documents because for the most part you haven't had to.
The problems resulting from this are manifold. First, there's no consistency in markup from one HTML author to the next. They've each got their own methodology - some write elements in uppercase, others in lowercase. Quotes are sometimes in use, sometimes not. Looking under the hood at even the most high-end site is usually not a pretty experience. So adding a little syntactical rigor to the mix via XHTML gets authors on the same page, if you'll pardon the pun. That can make for a much smoother workflow among teams.
XHTML 1.0 focuses heavily on getting markup cleaned up. But XHTML has another goal, too, and that's to extend to user agents beyond the Web browser: PDAs, smart phones, set-top boxes, and other alternative and wireless devices. Streamline and strengthen the markup, and you've got a stronger base from which to extend it. That's a logical and rational idea.
Another argument made in XHTML's defense - and it's a controversial one but I buy into it - is that it helps the client-side author who has XML phobia to begin moving into the XML arena via familiar means. I like this argument because as an educator, I've seen proof that it works. Take entry- or mid-level Web authors, teach them XHTML, and suddenly you can also teach them other XML applications: WML, SMIL, SVG. The light bulb goes on because they're operating in an environment that's familiar - HTML. The XML kind of sneaks in via document structure and syntactical rules.
Brass Tacks: XHTML
To gain a better idea of how XHTML 1.0 works, let's first examine its document structure.
Ideally, an XML document begins with an XML declaration:
<?xml version="1.0" encoding="UTF-8"?>But XHTML documents are most often viewed using popular Web browsers, which in some cases will render anything with an XML declaration as text. So for XHTML 1.0, the W3C recommends (but does not require) that the XML declaration be intact. Most Web authors leave it off.
Next comes the DTD, which is required. With XHTML 1.0, you can choose from three public DTDs: strict, transitional, or frameset. Developers working with HTML 4.0 will be familiar with these DTDs and know that the strict DTD uses the most limited set of elements and attributes of the three, basing much of its selection on the idea that presentation and structure must be separate. So you won't find the font element in a strict document. Transitional documents, however, are more flexible, understanding that Web authors must make some accommodations in order to achieve the best interoperability possible. Frameset documents are limited to framesets and can employ elements from strict or transitional DTDs.
For a strict XHTML 1.0 document, you'll use the following declaration:
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/ xhtml1-strict.dtd">
If you want to write your document in accordance with the transitional DTD, you'll use:
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/ xhtml1-transitional.dtd">Finally, if you're authoring a frameset, you'll use this declaration:
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Frameset//EN" "http://www.w3.org/TR/xhtml1/DTD/ xhtml1-frameset.dtd">It's important to remember that there are no exceptions to the rule here. You must declare the proper DTD in your XHTML 1.0 document.
Now it's time to add the namespace to the root. In XHTML 1.0 the root element is html. The root and namespace is also a requirement, and is written as follows:
<html xmlns="http://www.w3.org/1999/xhtml">Listing 1 shows a strict document template using the XML declaration. In Listing 2 I show a transitional document template using a meta workaround for document encoding should you choose not to use the XML declaration.
Get Tough: XHTML Syntax
Now that you've got the document structure down, it's time to explore the syntactical rules that XHTML 1.0 embodies:
- Must be well formed
- Is case specific
- Insists on closing tags for nonempty elements, and termination of empty elements with a trailing slash
- Demands that all attribute values be quoted Let's take a closer look.
Remember, Web browsers are built to forgive. That's one reason they're so bloated; they have to be able to interpret such a wide variety of markup styles. And most browsers will forgive ill-formed syntax. Try the following poorly formed bit of HTML in a browser:
<b><i>An ill-formed bit of HTML</b></i>In common browsers such as MSIE and NN, this markup will appear in both bold and italics. However, if you examine the HTML, you'll see that the tags are improperly nested. If this markup were well formed, the tags would nest properly:
<b><i>A well-formed bit of HTML</i></b>XHTML 1.0 must be well formed to be valid XHTML. A little trick I use to make sure I've nested my tags properly is to draw an imaginary line from the opening tag to its closing companion. If the lines don't intersect, it's properly nested and therefore well formed. Intersecting lines will indicate improperly nested, ill-formed markup.
As you're already aware, XML is case sensitive:
<product>are two different tag sets.
HTML, on the other hand, is not case specific:
<P align="right">XHTML is case specific. In every instance all elements and attribute names must be lower case:
</P> is the same as: <p ALIGN="right">
<p align="right">Note that attribute values can be in upper- or lowercase as necessary to accommodate file names, code strings, and URIs.
XHTML 1.0 adopts the XML method of closing all nonempty elements and terminating empty elements with a trailing slash. In HTML you can write the following:
<li>list item 1
<li>list item 2
<li>list item 3
but in XHTML, you must close the nonempty element:
<ul>One of the more obvious places this occurs is with the paragraph <p> tag. You must close all nonempty elements, no exceptions.
<li>list item 1</li>
<li>list item 2</li>
<li>list item 3</li>
If an element is empty (no content), it must terminate. In XML this is done by using a trailing slash as follows:
<br/>But many Web browsers will choke on this method and subsequently not render a page or render it improperly. a workaround is to add a space before the slash. This allows all empty elements to be properly rendered. A few examples:
<img />As with nonempty elements, there can be no exception to the rules. You must terminate the element accordingly.
Quoth the Attribute Value...
One of the more frustrating things about HTML - at least to my eye - is the arbitrariness of attribute value quoting. In HTML it's a now-you-see-it, now-you-don't phenomenon. So you can have:
<img src="my.jpg" border="1" width=400 height=200 alt="company logo">or any combination of attribute value quotations you like. In most instances a browser will properly render the markup whether you've quoted the attribute value or not.
XHTML insists that you quote all attribute values, leaving nothing to chance:
<img src="my.jpg" border="1" width="400" height="200" alt="company logo" />
Not so hard, really
as you can now see, XHTML 1.0 is really no great challenge. Does it mean employing a little more care when creating documents? Yes. Does it mean watching your syntax? Absolutely. But with a few minor adjustments you can have clean markup that works in today's browsers with as close-to-perfect interoperability as HTML and still complies with W3C recommendations.
Advancing Notions: Modularization of XHTML
So what's a little cleanliness, anyway? Critics of XHTML have pointed out that changing habits just to write cleaner documents doesn't provide much incentive. It's time consuming and why on earth would you want to go back and rewrite hundreds, possibly thousands, of Web documents just to comply with a W3C recommendation when those documents function perfectly well? I can't, and won't, argue this point. It's too strong an argument. But if you're interested in moving toward extensibility, want to create consistent documents organization-wide, and want to assist your client-side authors in expanding their markup horizons, working with XHTML makes sense.
While XHTML 1.0 offers little option for extensibility - you've got three set DTDs and a specific namespace - the modularization of XHTML does offer expansion. Modularization of XHTML, which allows for the use of XML DTDs and provides the means to create subsets and extensions to XHTML, takes XHTML 1.0 from its limited place closer to its goal of working for numerous user agents. As of this writing, modularization of XHTML is a Candidate Rec-ommendation of the W3C (www.w3.org/TR/2000/CR-xhtml-modularization-20001020/).
Modularization of XHTML is a decomposition of HTML as we know it today. Instead of lumping markup methods such as managing text, images, tables, and forms, modularization breaks these things into separate modules. Then, using XML DTDs (an implementation of XML schemas is also under discussion), authors can pull together a subset of XHTML using only those modules necessary to accomplish a given task.
If you put modularization in the context of alternative device design, the rationale for XHTML begins to make a lot of sense. Many alternative devices simply don't have the processing, RAM, and video power to handle HTML's original functions. So why have all the overhead? A streamlined markup language using only those modules necessary for the device means faster, customizable delivery to equally streamlined optimized user agents.
A perfect example of modularization exists in XHTML Basic (www.w3.org/TR/xhtml-basic/), a subset of XHTML 1.1, made up of specific modules that apply to wireless devices such as PDAs, smart phones, and smart pagers. These devices are limited in their processing power, so XHTML Basic supplies those modules only for markup that make sense, such as text, links, images, very basic tables, and forms. Frames or scripting demand processing power, so they're left out of the subset. XHTML Basic, at this writing a Proposed Recommendation of the W3C, looks just like XHTML, but of course any element that falls into a module not set forth in the recommendation can't be used in a valid XHTML Basic document. However, you can extend XHTML Basic if you want to. This enables the creation of additional subsets and extensions.
Listing 3 shows a simple XHTML Basic page suitable for display on a small, wireless device such as a PDA. The listing clearly illustrates how XHTML Basic uses the structural elements set forth in XHTML 1.0, only this time the DTD that's declared is for XHTML Basic itself. The namespace is the same, as are the syntactical methodologies.
Bring It On Home
The developer who's empowered with knowledge can make better decisions. Whether you embrace client-side XML in the form of XHTML is up to you. But a careful survey of your needs and directions will help answer the question of whether XHTML will be useful in your unique situation. Being aware of what's happening with XHTML and its goals will keep you at the ready should your circumstances require you to develop not only for the Web of tomorrow, but for the wireless world and beyond.
SYS-CON Events announced today that Streamlyzer will exhibit at the 19th International Cloud Expo, which will take place on November 1–3, 2016, at the Santa Clara Convention Center in Santa Clara, CA. Streamlyzer is a powerful analytics for video streaming service that enables video streaming providers to monitor and analyze QoE (Quality-of-Experience) from end-user devices in real time.
Oct. 20, 2016 05:30 PM EDT Reads: 828
The IoT has the potential to create a renaissance of manufacturing in the US and elsewhere. In his session at 18th Cloud Expo, Florent Solt, CTO and chief architect of Netvibes, discussed how the expected exponential increase in the amount of data that will be processed, transported, stored, and accessed means there will be a huge demand for smart technologies to deliver it. Florent Solt is the CTO and chief architect of Netvibes. Prior to joining Netvibes in 2007, he co-founded Rift Technologi...
Oct. 20, 2016 05:30 PM EDT Reads: 2,763
@ThingsExpo has been named the Top 5 Most Influential M2M Brand by Onalytica in the ‘Machine to Machine: Top 100 Influencers and Brands.' Onalytica analyzed the online debate on M2M by looking at over 85,000 tweets to provide the most influential individuals and brands that drive the discussion. According to Onalytica the "analysis showed a very engaged community with a lot of interactive tweets. The M2M discussion seems to be more fragmented and driven by some of the major brands present in the...
Oct. 20, 2016 05:15 PM EDT Reads: 10,946
Established in 1998, Calsoft is a leading software product engineering Services Company specializing in Storage, Networking, Virtualization and Cloud business verticals. Calsoft provides End-to-End Product Development, Quality Assurance Sustenance, Solution Engineering and Professional Services expertise to assist customers in achieving their product development and business goals. The company's deep domain knowledge of Storage, Virtualization, Networking and Cloud verticals helps in delivering ...
Oct. 20, 2016 03:45 PM EDT Reads: 876
Explosive growth in connected devices. Enormous amounts of data for collection and analysis. Critical use of data for split-second decision making and actionable information. All three are factors in making the Internet of Things a reality. Yet, any one factor would have an IT organization pondering its infrastructure strategy. How should your organization enhance its IT framework to enable an Internet of Things implementation? In his session at @ThingsExpo, James Kirkland, Red Hat's Chief Arch...
Oct. 20, 2016 03:00 PM EDT Reads: 5,861
SYS-CON Media announced today that @WebRTCSummit Blog, the largest WebRTC resource in the world, has been launched. @WebRTCSummit Blog offers top articles, news stories, and blog posts from the world's well-known experts and guarantees better exposure for its authors than any other publication. @WebRTCSummit Blog can be bookmarked ▸ Here @WebRTCSummit conference site can be bookmarked ▸ Here
Oct. 20, 2016 02:15 PM EDT Reads: 9,556
WebRTC defines no default signaling protocol, causing fragmentation between WebRTC silos. SIP and XMPP provide possibilities, but come with considerable complexity and are not designed for use in a web environment. In his session at @ThingsExpo, Matthew Hodgson, technical co-founder of the Matrix.org, discussed how Matrix is a new non-profit Open Source Project that defines both a new HTTP-based standard for VoIP & IM signaling and provides reference implementations.
Oct. 20, 2016 02:15 PM EDT Reads: 2,633
Virgil consists of an open-source encryption library, which implements Cryptographic Message Syntax (CMS) and Elliptic Curve Integrated Encryption Scheme (ECIES) (including RSA schema), a Key Management API, and a cloud-based Key Management Service (Virgil Keys). The Virgil Keys Service consists of a public key service and a private key escrow service.
Oct. 20, 2016 02:15 PM EDT Reads: 835
In his keynote at 19th Cloud Expo, Sheng Liang, co-founder and CEO of Rancher Labs, will discuss the technological advances and new business opportunities created by the rapid adoption of containers. With the success of Amazon Web Services (AWS) and various open source technologies used to build private clouds, cloud computing has become an essential component of IT strategy. However, users continue to face challenges in implementing clouds, as older technologies evolve and newer ones like Docke...
Oct. 20, 2016 01:45 PM EDT Reads: 2,127
@ThingsExpo has been named the Top 5 Most Influential Internet of Things Brand by Onalytica in the ‘The Internet of Things Landscape 2015: Top 100 Individuals and Brands.' Onalytica analyzed Twitter conversations around the #IoT debate to uncover the most influential brands and individuals driving the conversation. Onalytica captured data from 56,224 users. The PageRank based methodology they use to extract influencers on a particular topic (tweets mentioning #InternetofThings or #IoT in this ...
Oct. 20, 2016 01:45 PM EDT Reads: 7,844
You have great SaaS business app ideas. You want to turn your idea quickly into a functional and engaging proof of concept. You need to be able to modify it to meet customers' needs, and you need to deliver a complete and secure SaaS application. How could you achieve all the above and yet avoid unforeseen IT requirements that add unnecessary cost and complexity? You also want your app to be responsive in any device at any time. In his session at 19th Cloud Expo, Mark Allen, General Manager of...
Oct. 20, 2016 01:30 PM EDT Reads: 708
In his keynote at 18th Cloud Expo, Andrew Keys, Co-Founder of ConsenSys Enterprise, provided an overview of the evolution of the Internet and the Database and the future of their combination – the Blockchain. Andrew Keys is Co-Founder of ConsenSys Enterprise. He comes to ConsenSys Enterprise with capital markets, technology and entrepreneurial experience. Previously, he worked for UBS investment bank in equities analysis. Later, he was responsible for the creation and distribution of life sett...
Oct. 20, 2016 01:30 PM EDT Reads: 5,054
In the next five to ten years, millions, if not billions of things will become smarter. This smartness goes beyond connected things in our homes like the fridge, thermostat and fancy lighting, and into heavily regulated industries including aerospace, pharmaceutical/medical devices and energy. “Smartness” will embed itself within individual products that are part of our daily lives. We will engage with smart products - learning from them, informing them, and communicating with them. Smart produc...
Oct. 20, 2016 01:15 PM EDT Reads: 1,383
Just over a week ago I received a long and loud sustained applause for a presentation I delivered at this year’s Cloud Expo in Santa Clara. I was extremely pleased with the turnout and had some very good conversations with many of the attendees. Over the next few days I had many more meaningful conversations and was not only happy with the results but also learned a few new things. Here is everything I learned in those three days distilled into three short points.
Oct. 20, 2016 01:00 PM EDT Reads: 6,739
SYS-CON Events announced today that Coalfire will exhibit at the 19th International Cloud Expo, which will take place on November 1–3, 2016, at the Santa Clara Convention Center in Santa Clara, CA. Coalfire is the trusted leader in cybersecurity risk management and compliance services. Coalfire integrates advisory and technical assessments and recommendations to the corporate directors, executives, boards, and IT organizations for global brands and organizations in the technology, cloud, health...
Oct. 20, 2016 12:30 PM EDT Reads: 1,428
SYS-CON Events announced today that MathFreeOn will exhibit at the 19th International Cloud Expo, which will take place on November 1–3, 2016, at the Santa Clara Convention Center in Santa Clara, CA. MathFreeOn is Software as a Service (SaaS) used in Engineering and Math education. Write scripts and solve math problems online. MathFreeOn provides online courses for beginners or amateurs who have difficulties in writing scripts. In accordance with various mathematical topics, there are more tha...
Oct. 20, 2016 12:00 PM EDT Reads: 827
Cloud based infrastructure deployment is becoming more and more appealing to customers, from Fortune 500 companies to SMEs due to its pay-as-you-go model. Enterprise storage vendors are able to reach out to these customers by integrating in cloud based deployments; this needs adaptability and interoperability of the products confirming to cloud standards such as OpenStack, CloudStack, or Azure. As compared to off the shelf commodity storage, enterprise storages by its reliability, high-availabil...
Oct. 20, 2016 12:00 PM EDT Reads: 848
In the next forty months – just over three years – businesses will undergo extraordinary changes. The exponential growth of digitization and machine learning will see a step function change in how businesses create value, satisfy customers, and outperform their competition. In the next forty months companies will take the actions that will see them get to the next level of the game called Capitalism. Or they won’t – game over. The winners of today and tomorrow think differently, follow different...
Oct. 20, 2016 10:45 AM EDT Reads: 709
We all know the latest numbers: Gartner, Inc. forecasts that 6.4 billion connected things will be in use worldwide in 2016, up 30 percent from last year, and will reach 20.8 billion by 2020. We're rapidly approaching a data production of 40 zettabytes a day – more than we can every physically store, and exabytes and yottabytes are just around the corner. For many that’s a good sign, as data has been proven to equal money – IF it’s ingested, integrated, and analyzed fast enough. Without real-tim...
Oct. 20, 2016 10:00 AM EDT Reads: 3,846
SYS-CON Events announced today that Transparent Cloud Computing (T-Cloud) Consortium will exhibit at the 19th International Cloud Expo®, which will take place on November 1–3, 2016, at the Santa Clara Convention Center in Santa Clara, CA. The Transparent Cloud Computing Consortium (T-Cloud Consortium) will conduct research activities into changes in the computing model as a result of collaboration between "device" and "cloud" and the creation of new value and markets through organic data proces...
Oct. 20, 2016 08:15 AM EDT Reads: 1,204