158 CHAPTER 4 XPATH, XPOINTER, XINCLUDE, AND THE FUTURE Listing 4-8. XML Document Using XLink XPath 1.0 Specification XLink Specification Within the document, you should first notice the declaration of the XLink namespace associated with the xlink prefix. The description elements within this document are using xlink attributes, which define link behavior. Many more XLink attributes exist than the ones used here, but those are out of the scope of this book. The following sections will only briefly cover the type, href, and show attributes. type Attribute The type attribute specifies the type of link the element represents. This attribute is mandatory for an element using xlink. The possible values for this attribute are simple, extended, locator, arc, resource, title, and none. The only two values I ll explain here are simple and none, because the remaining values require much more in-depth knowledge of XLink than that provided in this chapter. Using the value none, the element has no XLink meaning. All xlink attributes are skipped, and the element is processed as a normal XML element. The value simple represents a simple link similar to an HTML anchor tag. The remaining values offer more extended functionality. href Attribute The href attribute provides the location for an XLink application to find the remote resource. Its value is a URI, and it works similarly to an hreftag on an HTML anchor element. show Attribute The show attribute indicates where the link should be opened for presentation. Its value may be one of new, replace, embed, other, or none. This attribute is similar to the target attribute for an anchor tag but provides some additional values. The value of new will open the resource in a new window or frame. This is equivalent to a target attribute with the value _blank. The value replace, which is also the default value when not set, will replace the current window or frame with the content. Its HTML target equivalent is _self. The value embedwill embed the contents of the resource within the document. This value is similar to using an image tag, IMG, in HTML.
Note: If you are looking for good and high quality web space to host and run your application check Lunarwebhost Cheap Web Hosting services
No comments yet.
Sorry, the comment form is closed at this time.