Presentation is loading. Please wait.

Presentation is loading. Please wait.

Internet Technologies1 XLink The Wonderful World of Oz example and its DTD are from “XML in a Nutshell” by Elliotte Rusty Harold.

Similar presentations


Presentation on theme: "Internet Technologies1 XLink The Wonderful World of Oz example and its DTD are from “XML in a Nutshell” by Elliotte Rusty Harold."— Presentation transcript:

1 Internet Technologies1 XLink The Wonderful World of Oz example and its DTD are from “XML in a Nutshell” by Elliotte Rusty Harold

2 Internet Technologies2 XLink XLink is a syntax that allows us to represent directed graphs. The vertices of the graph are documents (or other resources) and the edges are links between them. The vertices can be local or remote. Different applications may interpret the XLinks in a document differently. The programmer determines the meaning of the connection. For example, a web spider will probably treat the link much differently than a web browser or a publishing program.

3 Internet Technologies3 XLink Simple Links Define a one-way connection between two resources One resource is an xml element and the other is remote This is the only link that looks like the html anchor element Extended Links Define a collection of resources and links between them These may be used to define a directed, labeled graph

4 Internet Technologies4 Simple Links <novel xmlns:xlink= "http://www.w3.org/1999/xlink" xlink:type = "simple" xlink:href = "ftp://archive.org/pub/etext/my.txt"> The Wonderful Wizard of Oz L. Frank Baum 1900 Map some prefix to the xlink URI The xlink prefix is customary but not required.

5 Internet Technologies5 Simple Links <novel xmlns:xlink= "http://www.w3.org/1999/xlink" xlink:type = "simple" xlink:href = "ftp://archive.org/pub/etext/my.txt"> The Wonderful Wizard of Oz L. Frank Baum 1900 The type attribute is required. It has six possible values. The simple type is like HTML’s anchor element.

6 Internet Technologies6 Simple Links <novel xmlns:xlink= "http://www.w3.org/1999/xlink" xlink:type = "simple" xlink:href = "ftp://archive.org/pub/etext/my.txt"> The Wonderful Wizard of Oz L. Frank Baum 1900 The href attribute may be relative or absolute and points to the target resource.

7 Internet Technologies7 Simple Links <novel xmlns:xlink= "http://www.w3.org/1999/xlink" xlink:type = "simple" xlink:href = "ftp://archive.org/pub/etext/my.txt" xlink:actuate=“onRequest” xlink:show=“replace”> The Wonderful Wizard of Oz L. Frank Baum 1900 Many options exist. These are suggestions to the application.

8 Internet Technologies8 Simple Xlinks and DTD’s The Wonderful Wizard of Oz L. Frank Baum 1900 Some of the syntax can be placed in a DTD. We must define the attributes, the namespace and the type of link.

9 Internet Technologies9 Simple Xlinks (DTD) <!ATTLIST novel xmlns:xlink CDATA #FIXED "http://www.w3.org/1999/xlink" xlink:type (simple) #FIXED 'simple' xlink:href CDATA #REQUIRED>

10 Internet Technologies10 Extended Links Not like the HTML links of old. More general. Application dependent.

11 Internet Technologies11 Extended Links Extended links will normally contain the following: Local resources involved in the connections. These have type=“resource” Remote resources involved in the connections. These have type=“locator” Descriptions of the connections. These have type=“arc”

12 Internet Technologies12 Extended Links Extended links will normally contain the following: Local resources involved in the connections. These have type=“resource”. Give a name to a local element. Remote resources involved in the connections. These have type=“locator”. Give a name to a remote place. Descriptions of the connections. These have type=“arc”. State that a directed edge exists between two of the above.

13 Internet Technologies13 Extended Links Linear Algebra Linear Algebra II <prerequisite xlink:type=“arc” xlink:from=“LA100” xlink:to=“LA200” /> Linking resources that are part of the document.

14 Internet Technologies14 Extended Links <course xlink:type=“locator” xlink:label = “LA100” xlink:href=“http://someplace.else”> Linear Algebra <course xlink:type=“locator” xlink:label = “LA200” xlink:href=“http://anotherplace”> Linear Algebra II <prerequisite xlink:type=“arc” xlink:from=“LA100” xlink:to=“LA200” /> Linking remote resources.

15 Internet Technologies15 Third Party Links We can now define links between documents that we don’t control. Using Xlink, we can describe vertices and edges across the internet. If the vertices are XML documents, we can use XPointer (which builds on XPath) to establish links from particular places in remote documents to particular places in other documents, neither of which we control.


Download ppt "Internet Technologies1 XLink The Wonderful World of Oz example and its DTD are from “XML in a Nutshell” by Elliotte Rusty Harold."

Similar presentations


Ads by Google