| |
|
When comparing XML to HTML, XML’s huge data-centric feature set makes it an attractive alternative to HTML, as a standard document format. However, even when pairing XML with XSL’s formatting functionality, a feature-by-feature comparison of XML+XSL versus HTML will point out one major omission from XML’s list: hyperlinking. With HTML documents, adding hyperlinks is as easy as surrounding a piece of text with anchor (<a>) tags, and adding the link destination as a URL to the tag’s hyperlink reference (href) attribute, as follows:
|
|
Click <a href=”www.xmltc.com”>here</a> now.
|
|
This HTML statement is rendered as below, once displayed by a browser:
|
|
Click here now.
|
|
The underlined part of the text represents a link to the SOA Systems’ Web site. This simple ability to provide hyperlinks within a Web page text is arguably the Internet’s most powerful feature, yet an XML document (even when linked to an XSL style sheet) cannot provide this functionality on its own. This is why XLink was developed. Not only does XLink supply the ability to create HTML hyperlinks, its specification is equipped with an elaborate language that addresses many shortcomings of the HTML anchor tag.
|
|
For instance, with XLink, a document’s hyperlinks can be isolated in a separate link document. This centralizes link information the same way XSL style sheets centralize formatting information, and the benefits are very similar. If the destination address of a hyperlink changes, it only needs to be updated in one location. Also, in an HTML authoring environment, a document editor would need to have write permissions in order to add hyperlinks to a previously authored HTML document. This is no longer necessary, as the editor can now generate the links independently.
|
|
Additionally, with XLink developers can now add meta information to hyperlinks, which can provide the user with comprehensive information about the destination resource of a hyperlink, without having to visit it.
|
|
Finally, through the creation of a complex linking structure, XLink can even create linking associations between more than two resources.
|
|
XLink structures (regardless of whether they are embedded in XML documents or exist externally), can represent either “simple” or “extended” links (which is defined through the XLink type attribute). A simple link structure provides basic information to associate the origin and destination resources, as follows (note that the numbers on the left are line numbers):
|
1. <sample:linkelement xmlns:sample="http://www.samplereports.com/"
2. xmlns:xlink="http://www.w3.org/1999/xlink"
3. xlink:type="simple"
4. xlink:href="http://www.soasystems.com"
5. xlink:title="Report on SOA Systems Inc."
6. xlink:show="new">
7. SOA Systems Inc.
8. </sample:linkelement>
|
|
This XLink structure is really just an XML element definition with a series of attribute/value pairs. This first line:
|
|
xmlns:sample="http://www.samplereports.com/"
|
|
…defines the namespace within which this link file is active.
|
|
The second line:
|
|
xmlns:xlink="http://www.w3.org/1999/xlink"
|
|
…specifies the XLink specification used by the processor.
|
|
On the third line:
|
|
xlink:type="simple"
|
|
…the type attribute defines this structure as being of type “simple.”
|
|
|
return to homepage
SOA Design Patterns
by Thomas Erl

Foreword by Grady Booch.

With contributions from David Chappell, Jason Hogg, Anish Karmarkar, Mark Little, David Orchard, Satadru Roy, Thomas Rischbeck, Arnaud Simon, Clemens Utschig, Dennis Wisnosky, and others.
Web Service Contract Design & Versioning for SOA
by Thomas Erl, Anish Karmarkar, Priscilla Walmsley, Hugo Haas, Umit Yalcinalp, Canyang Kevin Liu, David Orchard, Andre Tost, James Pasley
SOA Principles of Service Design
by Thomas Erl

An in-depth guide dedicated to service engineering with a thorough exploration of the design principles that comprise the service-orientation design paradigm (including a comparison with object-orientation).
Service-Oriented Architecture:
Concepts, Technology, and Design
by Thomas Erl

The first "how-to" guide to building SOA, providing coverage of WS-* specifications, .NET and J2EE platforms, and step-by-step processes for service-oriented analysis and design.
Service-Oriented Architecture:
A Field Guide to Integrating XML and Web Services
by Thomas Erl

The best-selling guide to service-oriented integration, providing hundreds of integration strategies and over sixty best practices.

For more information about these books, visit: www.soabooks.com
|
SOA Certified Professional

The books in this series are part of the official curriculum for the SOA Certified Professional program.

For more information:

• www.soacp.com

• www.soaschool.com

|
| |