Download PDF Home History |  | API Search Feedback FAQ

> ## Linking and Presentation Standards

> Arguably the two greatest benefits provided by HTML are the ability to link between documents and the ability to create simple formatted documents (and, eventually, very complex formatted documents). The following standards aim to preserve the benefits of HTML in the XML arena and add new functionality.

> ### XML Linking

> These specifications provide a variety of powerful linking mechanisms and may well have a big impact on how XML documents are used.

> XLink

> The XLink protocol is a specification for handling links between XML documents. This specification allows for some pretty sophisticated linking, including two-way links, links to multiple documents, expanding links that insert the linked information into your document rather than replace your document with a new page, links between two documents that are created in a third, independent document, and indirect links (so that you can point to an "address book" rather than directly to the target document; updating the address book then automatically changes any links that use it).

> XML Base

> This standard defines an attribute for XML documents that defines a base address that is used when evaluating a relative address specified in the document. (So, for example, a simple file name would be found in the base address directory.)

> XPointer

> In general, the XLink specification targets a document or document segment using its ID. The XPointer specification defines mechanisms for "addressing into the internal structures of XML documents," without requiring the author of the document to have defined an ID for that segment. To quote the spec, it provides for "reference to elements, character strings, and other parts of XML documents, whether or not they bear an explicit ID attribute."

> For more information on the XML Linking standards, see `http://www.w3.org/XML/Linking`.

> ### XHTML

> The XHTML specification is a way of making XML documents that look and act like HTML documents. Given that an XML document can contain any tags you care to define, why not define a set of tags that look like HTML? That's the thinking behind the XHTML specification, at any rate. The result of this specification is a document that can be displayed in browsers and also treated as XML data. The data may not be quite as identifiable as "pure" XML, but it will be a heck of a lot easier to manipulate than standard HTML, because XML specifies a good deal more regularity and consistency.

> For example, either every tag in a well-formed XML document must have an end tag associated with it, or it must end in `/>`. So you might see `<p>...</p>`, or you might see `<p/>`, but you will never see `<p>` standing by itself. The upshot of this requirement is that you never have to program for the weird kinds of cases you see in HTML--where, for example, a `<dt>` tag might be terminated by `</DT>`, by another `<DT>`, by `<dd>`, or by `</dl>`. That makes it a lot easier to write code.

> The XHTML specification is a reformulation of HTML 4.0 into XML. The latest information is at `http://www.w3.org/TR/xhtml1`.

Download PDF Home History |  | API Search Feedback FAQ

All of the material in The J2EE(TM) 1.4 Tutorial is copyright-protected and may not be published in other works without express written permission from Sun Microsystems.