|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.
The 19th International Cloud Expo has announced that its Call for Papers is open. Cloud Expo, to be held November 1-3, 2016, at the Santa Clara Convention Center in Santa Clara, CA, brings together Cloud Computing, Big Data, Internet of Things, DevOps, Digital Transformation, Microservices and WebRTC to one location. With cloud computing driving a higher percentage of enterprise IT budgets every year, it becomes increasingly important to plant your flag in this fast-expanding business opportuni...
Jul. 23, 2016 10:15 PM EDT Reads: 2,400
From wearable activity trackers to fantasy e-sports, data and technology are transforming the way athletes train for the game and fans engage with their teams. In his session at @ThingsExpo, will present key data findings from leading sports organizations San Francisco 49ers, Orlando Magic NBA team. By utilizing data analytics these sports orgs have recognized new revenue streams, doubled its fan base and streamlined costs at its stadiums. John Paul is the CEO and Founder of VenueNext. Prior ...
Jul. 23, 2016 09:30 PM EDT Reads: 1,936
A critical component of any IoT project is what to do with all the data being generated. This data needs to be captured, processed, structured, and stored in a way to facilitate different kinds of queries. Traditional data warehouse and analytical systems are mature technologies that can be used to handle certain kinds of queries, but they are not always well suited to many problems, particularly when there is a need for real-time insights.
Jul. 23, 2016 08:45 PM EDT Reads: 1,637
CenturyLink has announced that application server solutions from GENBAND are now available as part of CenturyLink’s Networx contracts. The General Services Administration (GSA)’s Networx program includes the largest telecommunications contract vehicles ever awarded by the federal government. CenturyLink recently secured an extension through spring 2020 of its offerings available to federal government agencies via GSA’s Networx Universal and Enterprise contracts. GENBAND’s EXPERiUS™ Application...
Jul. 23, 2016 08:30 PM EDT Reads: 1,764
"My role is working with customers, helping them go through this digital transformation. I spend a lot of time talking to banks, big industries, manufacturers working through how they are integrating and transforming their IT platforms and moving them forward," explained William Morrish, General Manager Product Sales at Interoute, in this SYS-CON.tv interview at 18th Cloud Expo, held June 7-9, 2016, at the Javits Center in New York City, NY.
Jul. 23, 2016 08:30 PM EDT Reads: 2,010
Internet of @ThingsExpo, taking place November 1-3, 2016, at the Santa Clara Convention Center in Santa Clara, CA, is co-located with the 19th International Cloud Expo and will feature technical sessions from a rock star conference faculty and the leading industry players in the world and ThingsExpo Silicon Valley Call for Papers is now open.
Jul. 23, 2016 08:00 PM EDT Reads: 2,408
Big Data engines are powering a lot of service businesses right now. Data is collected from users from wearable technologies, web behaviors, purchase behavior as well as several arbitrary data points we’d never think of. The demand for faster and bigger engines to crunch and serve up the data to services is growing exponentially. You see a LOT of correlation between “Cloud” and “Big Data” but on Big Data and “Hybrid,” where hybrid hosting is the sanest approach to the Big Data Infrastructure pro...
Jul. 23, 2016 08:00 PM EDT Reads: 1,777
The IoT is changing the way enterprises conduct business. In his session at @ThingsExpo, Eric Hoffman, Vice President at EastBanc Technologies, discussed how businesses can gain an edge over competitors by empowering consumers to take control through IoT. He cited examples such as a Washington, D.C.-based sports club that leveraged IoT and the cloud to develop a comprehensive booking system. He also highlighted how IoT can revitalize and restore outdated business models, making them profitable ...
Jul. 23, 2016 07:15 PM EDT Reads: 1,863
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-ti...
Jul. 23, 2016 07:00 PM EDT Reads: 858
I wanted to gather all of my Internet of Things (IOT) blogs into a single blog (that I could later use with my University of San Francisco (USF) Big Data “MBA” course). However as I started to pull these blogs together, I realized that my IOT discussion lacked a vision; it lacked an end point towards which an organization could drive their IOT envisioning, proof of value, app dev, data engineering and data science efforts. And I think that the IOT end point is really quite simple…
Jul. 23, 2016 06:15 PM EDT Reads: 785
With 15% of enterprises adopting a hybrid IT strategy, you need to set a plan to integrate hybrid cloud throughout your infrastructure. In his session at 18th Cloud Expo, Steven Dreher, Director of Solutions Architecture at Green House Data, discussed how to plan for shifting resource requirements, overcome challenges, and implement hybrid IT alongside your existing data center assets. Highlights included anticipating workload, cost and resource calculations, integrating services on both sides...
Jul. 23, 2016 06:00 PM EDT Reads: 1,878
"We are a well-established player in the application life cycle management market and we also have a very strong version control product," stated Flint Brenton, CEO of CollabNet,, in this SYS-CON.tv interview at 18th Cloud Expo, held June 7-9, 2016, at the Javits Center in New York City, NY.
Jul. 23, 2016 05:30 PM EDT Reads: 1,713
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...
Jul. 23, 2016 05:00 PM EDT Reads: 934
Unless your company can spend a lot of money on new technology, re-engineering your environment and hiring a comprehensive cybersecurity team, you will most likely move to the cloud or seek external service partnerships. In his session at 18th Cloud Expo, Darren Guccione, CEO of Keeper Security, revealed what you need to know when it comes to encryption in the cloud.
Jul. 23, 2016 04:00 PM EDT Reads: 2,301
We're entering the post-smartphone era, where wearable gadgets from watches and fitness bands to glasses and health aids will power the next technological revolution. With mass adoption of wearable devices comes a new data ecosystem that must be protected. Wearables open new pathways that facilitate the tracking, sharing and storing of consumers’ personal health, location and daily activity data. Consumers have some idea of the data these devices capture, but most don’t realize how revealing and...
Jul. 23, 2016 04:00 PM EDT Reads: 1,974
What are the successful IoT innovations from emerging markets? What are the unique challenges and opportunities from these markets? How did the constraints in connectivity among others lead to groundbreaking insights? In her session at @ThingsExpo, Carmen Feliciano, a Principal at AMDG, will answer all these questions and share how you can apply IoT best practices and frameworks from the emerging markets to your own business.
Jul. 23, 2016 03:45 PM EDT Reads: 1,505
Basho Technologies has announced the latest release of Basho Riak TS, version 1.3. Riak TS is an enterprise-grade NoSQL database optimized for Internet of Things (IoT). The open source version enables developers to download the software for free and use it in production as well as make contributions to the code and develop applications around Riak TS. Enhancements to Riak TS make it quick, easy and cost-effective to spin up an instance to test new ideas and build IoT applications. In addition to...
Jul. 23, 2016 03:30 PM EDT Reads: 1,838
You think you know what’s in your data. But do you? Most organizations are now aware of the business intelligence represented by their data. Data science stands to take this to a level you never thought of – literally. The techniques of data science, when used with the capabilities of Big Data technologies, can make connections you had not yet imagined, helping you discover new insights and ask new questions of your data. In his session at @ThingsExpo, Sarbjit Sarkaria, data science team lead ...
Jul. 23, 2016 03:15 PM EDT Reads: 816
Extracting business value from Internet of Things (IoT) data doesn’t happen overnight. There are several requirements that must be satisfied, including IoT device enablement, data analysis, real-time detection of complex events and automated orchestration of actions. Unfortunately, too many companies fall short in achieving their business goals by implementing incomplete solutions or not focusing on tangible use cases. In his general session at @ThingsExpo, Dave McCarthy, Director of Products...
Jul. 23, 2016 03:00 PM EDT Reads: 1,652
Ask someone to architect an Internet of Things (IoT) solution and you are guaranteed to see a reference to the cloud. This would lead you to believe that IoT requires the cloud to exist. However, there are many IoT use cases where the cloud is not feasible or desirable. In his session at @ThingsExpo, Dave McCarthy, Director of Products at Bsquare Corporation, will discuss the strategies that exist to extend intelligence directly to IoT devices and sensors, freeing them from the constraints of ...
Jul. 23, 2016 02:30 PM EDT Reads: 1,702