Breaking Out of the Text Box
So you can put different kinds of content in a single document, plus foreign objects such as images, and have it all render to the screen. Finally there's a browser that fulfills the original purpose of the Webto publish engineering information about CERN's particle accelerator in Switzerland! SVG and MathML let technical people document their diagrams and mathematics.
What about the rest of the Web audience? Well, your creative boundaries just expanded greatly. Here's an example.
Anyone who's read Alice in Wonderland (Lewis Carroll) or The Demolished Man (Alfred Bester) knows that text documents needn't be a boring train of fully justified paragraphs. Text can go down the rabbit hole, criss-cross itself or fly away completely. Word games are a prime example. Here's a trivial HTML-only word puzzle:
The solution to this puzzle is "sandbox"an everyday term. This example is a typical abuse of HTMLthe box is a onecell table. Table borders aren't supposed to be used as boxes; they're supposed to be table borders. SVG is a much better choice for drawing a box. Example 3
has four similar puzzles that exploit Mozilla capabilities (remember that since IE is incapable of displaying the examples, Example 3 will show either an error or XML source code when viewed in IE). The solutions are at the bottom. If you examine the source code, you'll see that the tags beginning with <html:
, and <svg:
are deeply combined together, although they are still nested correctly as XML demands.
|Figure 3: These puzzles use only simple imagesthe code uses MathML to display the the mathematical formulas and SVG for some of the graphic content.|
For content such as these puzzles, you may need to reload regularly and oftenMozilla's not quite bug free yet. Do the SVG images remind you of a Macromedia Flash image? They shouldSVG is an emerging Flash competitor. Also note the DOCTYPE has changed slightly so that you can reference entities such as &Integral
directly. Unfortunately, there are no power tools yet that make multi-standard composition easy. Until they arrive, you'll have to hack through the standards.
By being able to render content from several different DTDs, Mozilla raises the bar on XML display in Web browsers, although standards coverage such as MathML and SVG still has some cracks and gaps. Even at this early stage though, Mozilla promises to be a definite win for specialised users such as those in universities and schools by letting developers compose richer documents.