CHAPTER 2 RELATED XML RECOMMENDATIONS Simple Links A simple link connects a single source to a single target, much like an XHTML link. Before you can include an XLink, the XML document that includes the XLink must also include a reference to the XLink namespace. You can do this in the document element as follows:
By convention, developers use xlink to preface this namespace. In XHTML, the element indicates a link. Web browsers understand the meaning of this element and display the link accordingly. In XML, you can add a link to any element within the XML document. Let s look at an example of a simple link: Here is a linked element This XLink provides a link to http://www.apress.com. It includes an xlink:type attribute indicating that it s a simple link. It uses the attribute xlink:href to provide the address of the link. The link has a title that is intended to be read by humans. The XLink includes an xlink:show behavior of replace, which indicates that the link should replace the current URL. You could also specify xlink:show = “new”, which is akin to the XHTML target=”_blank”. Other values include embed, other, and none. Choosing embed is similar to embedding an image in an XHTML page the target resource replaces the link definition in the source. A value of other leaves the link action up to the implementation and indicates that it should look for other information in the link to determine its behavior. The value none also leaves the behavior up to the implementation, but with no hints in the link. The xlink:activate attribute determines when the link opens. In this example, using onRequest indicates that the document will await user action before activating the link. The attribute could also use values of onLoad, other, or none. Setting the attribute value to onLoad causes the link to be followed immediately after the resource loads. You could use this value with xlink:show=”embed” to create a display from a set of linked source documents. The values other and none have the same meanings as in the xlink:showattribute. The preceding example creates a link that s very similar to a traditional XHTML link, with some additional capabilities. An extended XLink offers much more powerful capabilities.
Note: In case you are looking for affordable and reliable webhost to host and run your j2ee application check Vision best web hosting services
This entry was posted
on Monday, April 30th, 2007 at 9:19 pm and is filed under Tomcat.
You can follow any responses to this entry through the RSS 2.0 feed.
You can leave a response, or trackback from your own site.