`
`
`
`
`
`Merrill Communications LLC
`d/b/a Merrill Corporation
`Exhibit 1006 pt. 6
`
`
`
`XML Linking
`anguage(Xlink
`
`I Linking and addressing
`
`I Simple links
`
`I Extended links
`
`© 1 998 T HE XML HANDBOOKTh'
`
`
`
`-
`
`Chapter __ ___,
`
`14
`
`ertext links are the backbone of the World Wide Web.
`Documents were shuffled around the Internet long before
`today's Web existed, but it was the ease of moving from page
`to page with hypertext links that made rhe Web into the mass market
`phenom non it is today.
`es. The
`However, despire rheir cenrralicy Web link have many weakn
`linking system rhar we u e today i essentially unchanged from the earliest
`ver ion o the Web. Unfonunately, market inertia has prevenred anything
`more powerful from coming along ... until now.
`The second specification in the XML family is XLink. It allows links that
`go far beyond those provided by HTML. XLinks can have multiple end
`points, be traversed in multiple directions, and be stored in databases and
`groups independently of the docum ents they refer to.
`
`©I Y Y 8 T 1-1 E X M L
`
`I.J AN 11 11 ll ' ' f-:
`
`'!."
`
`499
`
`
`
`500
`
`CHAPTER 34 I XML LINKING LANGUAGE(XLINK
`
`XLink is exciting, but we cannot take full advantage of it yet. It is still
`being refined by the World Wide Web consortium.
`
`Note
`The current version of XLink, and its companion
`specification, XPointer, are working drafts and will change before
`they are completed. The basic concepts are well understood and
`will not change, but the specifics may change between now and
`then. We will cover only the parts we consider most stable.
`
`it. I 1 Basic concepts
`
`The most important (and sometimes subtle) distinction in any discussion
`of hyperlinking is that of linking versus addressing. Linking is simply declar(cid:173)
`ing a relationship between two things. If we say "George Washington and
`Booker T. Washington share a last name" then we have linked those two
`people in some way.
`
`Addressing, on the other hand, is about describing how to find the two
`things being linked. There are many kinds of addresses, such as mail
`addresses, email addresses and URLs. When you create a link in XML, you
`declare a relationship between two objects referred to by their addresses
`(URis). We refer to these objects as resources. We will discuss the addresses
`(URis) more in 34.3, ''Addressing", on page 511 .
`
`If you have created Web pages before, you are probably familiar with
`HTML:s simple A element. Whether or n you are familiar with HTML,
`that link is a good starting point for under tanding hyperlinking in general.
`
`The A stands for anchor. Anchor is essentially the HTML term for
`resource. An HTML link has two ends, termed the source and destination.
`When you click on the source end, (designated with an A el m nr and HREF
`attribute), the Web browser transports you to the other end. Example 34-1
`shows how this works.
`
`Example 34-1. An HTML (not XML) link
`<A HREF="http: //www. mys ite.corn" >Go t o my site!</A>
`
`© I 9 9 8 T H E X M l H A N D B 0 0 K 1 M
`
`
`
`34.1
`
`I BASI C CONCEPTS
`
`501
`
`a link, and it HREF amibute
`In thi case, the A element itself describ
`poin ts ·co one of th e resources (the d.esrination). As we know, linl s connect
`resources,
`there must b at lea t one mor resource involved. The other
`resource d1e source, is actually the text that forms the concent of the A de(cid:173)
`ment. As we will see, XML simple links also use the content of the link as
`one of the resources.
`The destination of the link in Example 34-1 does not necessarily know
`rhat it is a destination. If you want to link to the Disney horne page, you do
`i ney. If a panicular document has fifty A elements
`not need to inform
`with HREF attributes then you know that it has fifty links our. Bu the Web
`provides no way to know how many links into it there are.
`In the more general extended link case, we will link two things such that
`neither end will "know" that it is being linked. The link exists in some third
`location (or fourth, or fifth, for multi-ended links). This is intuitive if you
`go back to the definition of linking as defining a relationship. In a real(cid:173)
`world sense, I can ''link" Jenny Jones and Oprah Winfrey just by speaking
`of them in the same sentence. Unless they are interested in careers as web(cid:173)
`masters, they will probably never know. XLink provides a standardized way
`to express this in markup.
`We might even want to link something that is not explicitly labeled. For
`instance, we might want to link the third paragraph of the fourth sub-point
`of the second section of a legal document to the transcript of a relevant
`court case.
`This is analogous to the real world situation where you can either send
`omething to a labeled location ("Pleas cake rhis ro the White House.') or
`you can give dire tions to th destination. In hyperlinking terms, we would
`to be an "address." Obviously there must be
`consider either one of thes
`some way of locating a resource from a link, but it could be either an
`address, a label or a combination of the two: "The building is 5 blocks
`down the street from the White House."
`
`Jt.l. l Sin~ple links
`
`Although XLink allows more flexible links than does HTML, it also offers
`simple links that are not much more complicated than HTML's links are.
`This sorr of link is referred to as a simple link. A simple link has two ends, a
`source and a destination, just like an HTML link. One end has content
`
`<Di<J 'JH TilE XML H ANDil<Hll( 1·"
`
`
`
`50 2
`
`CHAPTER 34 I XML LINKING LANGUAGE(XLINK
`
`that represents a resource (usually the source) and it refers to the other end
`through a URI.
`
`Example 34-2. XML Simple Link
`. . . for more information, consult
`<c itation xml:link="simple" href="http://www.uw.ca/paper.xml">
`Biemans(1997)
`< /mylink>
`
`The biggest difference between this link and the HTML link is that this
`element is not designated a link by its element type name. It is not called A
`or any special element type name specified in the XML specification. You
`can call your linking elements whatever you want to. This is an important
`feature, because it allows you to have many different types of linking ele(cid:173)
`ments in a document, perhaps with different declarations, attributes and
`behaviors. Just as XML allows you to use any element-type name for para(cid:173)
`graphs or figures, it allows you flexibility in your linking element-type
`names.
`The link is actually designated an XML link by its :xml: link attribute.
`The :xml: prefix indicates that this attribute's allowed values and semantics
`are specified by the World Wide Web consortium. This attribute describes
`what kind of link it is. In this case, it is a simple link.
`
`J4. 1.2 Link roles
`
`ITML, link resources are either sources or destinations. The element
`[n
`that des ribes the link is always the source. The resource referred to is
`always the destination. In XM , thi rigid dis incti n is not hard~wi.recL An
`appli cation an make either or both links into sources or destinations. C n(cid:173)
`sidcr, 6 r instance, if a Web browser made it possible co crea e notes about
`sam one else's Web ite and " tick" lhem on co it like Post-It notes. These
`annotations might be represented as XLink extended links.
`In chis case, we acrually wanr the application ro mal e some form of lick(cid:173)
`able "hotspot" ar the other end, on the newspapers Web page. Of cour ewe
`r else they
`don't wam them to have control of th actual linking element,
`might just ch ose no to show our link. So we want the link co exist in one
`
`©!998 THE XML HANDB OOK™
`
`
`
`3 4 . 1
`
`B A S I C C 0 N L: E I' T S
`
`503
`
`Example 34-3. XLiuk annotationso
`~an notat ion xml: link-" extended"
`href= "h ttp: I /ww1.v. mynewspaper . com " >
`As usual, your edito ria l is filled with the k ind of c laptrap and
`wi Uywag tha t giv es me the heeb ie - jeebi es !
`</annotation>
`
`spot and create a "hotspot" at another. This is the opposite of traditional
`HTMLlinks.
`In order to reverse linking roles, we must somehow tell the application
`chat we want it to do so. One way would be to use an element-type name
`that the application is hard-coded to understand as having that semantic.
`For instance an "annotation server" might only deal with annotation ele(cid:173)
`ments, or perhaps a few different variants, and would thus know exactly
`how to handle it.
`Another way would be to usc some form of stylesheet. But you would still
`need to have som ething special in the document that would differentiate
`annotations from other links (perhaps the annotation element-type name).
`The stylesheet would provide an extra level of transl ation to allow your pri·(cid:173)
`vate clement-type names to be interpreted as annotations by software.
`Yet another way to solve this problem would be to provide an attribute
`that describes the role of the link in the document and hypertext system.
`Any of these are valid implementation approaches, and the XLink specifica(cid:173)
`tion provides a special role attribute to handle the last case. Example 34-4
`is an example of that attribute in action.
`
`Example 34--·1. Uolc attdlmtc
`<hlink role= "annotati o n "
`xml : l ink="extended "
`hre f ='"htLp://www.mynewspaper . com">
`As usual, yo ur edito r ial is f i lled with the kind o f claptrap and
`willywag that giv es me the heebi e-je eb ies!
`</hl i n l':>
`--~-------------------------------------------------------------
`
`In this cas~, th e role design ati n has moved hom the elem ent--type name
`(now h link instead of annotation) to the role attribute. Which is more
`appropriate will depend on your DTD, your software and your taste. XLink
`c.ould perhaps dictate one style or the other, but real world usage is not that
`Sitnple. For instance you might need to use an industry standard DTD and
`
`~) l 9 l) 8 ·r H 1·: X M L
`
`1-l r\ N I) 1\ () l ) ~~ 'I ,\ I
`
`
`
`5 04
`
`CHAPTER 34 I XML LINKING LANGUAGE(XLINK
`
`thus have no control over element-type names. In another application, you
`might need to constrain the occurrence of certain kinds oflinking elements,
`and thus need to use element-type names and content models.
`
`J4. 1.J Is this for real?
`
`You might well ask whether all of this annotation stuff is likely to happen.
`After all, there are all sorts of social, technical and financial difficulties
`related to being able to annotate someone else's Web page. Imagine annota(cid:173)
`tion spam: "Tired of reading this boring technical Web page? Click here for
`HOT PICS!!!" It turns out that early versions of the pre-Netscape Mosaic
`browser allowed remote annotations (using a proprietary linking scheme),
`and you could share your annotations with friends or co-workers, but nor
`with everybody on the Web. There are various other experim ntal services
`and produ ts that provide rh arne ability for the modern-day Web. How(cid:173)
`ever, ea.ch uses a distinct link description no ration so that th y cannot hare.
`We may or may not get to the point where everybody can publish anno(cid:173)
`tations to the whole world, but we already have the tech no logy to create
`annotations that can be shared by other people we know. Unfortw1arely,
`this technology has never been widely deployed. Perhaps XLink will solve
`the link in ompatibility problem and allow Web pages o be orne readable,
`writeable, and even more linkable.
`So what can you do without a world-wide link database? Well let's say
`that y ur organization wru con idering buying a very expensive software
`produ t. You and your a-workers might agree ro submit your opinions of
`the product specifications published on the vendor' Website. You could
`make a bun h of external links from the vendor's text to your comments on
`it and submit that to your organizational link database. When your co(cid:173)
`workers go to see rhe page, their br wsers can fetch your links and actually
`display them as if they were part of the original document. When your co(cid:173)
`workers click on them, the browser will take them to your annotations.
`In fact, with a reasonably big link database, you could annotate any Web
`page you came upon in this manner. When others from your organization
`came upon the pag , they would ec your annotations. In one sense, you are
`editing the entire Web! Of course, d1e bigger your organization is, the more
`points of view you can see n each page. On the other hand, sometimes you
`might not want to share all of your omments with the entire company, so
`you might have a smaller departmental database which is separate, and only
`
`©1 9 98 T H E XML H AND B OO K TM
`
`
`
`34.1
`
`I 13/\SIC CONC EP TS
`
`505
`
`shared by your direct co-workers. And of course at the oppo ire end of the
`spectrum there might b a database for everyo.ne on the Web (if we can
`make link database software that scales appropnately and find som one to
`run it).
`External links can be useful even without a link database. Without such a
`database, there is no easy way to distribute your links to other people, so
`you must commttnicate the link ' existence in some other way. For instance,
`you could includ a critique of a Web page a an actachment to an email.
`You could also build a documem fuU of links that annotated one of your
`own Web pages with links to glossary and bibliographic information. We
`might term each collection a link sheet. Depending on which link sheet the
`reader used, he would get either the glossary links or the bibliographic links
`or both sets of links overlapping.
`If it makes sense to "project" a link from your home computer onto an
`existing Website, rh n surely it makes just as much sense w link tw exist(cid:173)
`ing Websites. For instance, we could make a li nk that is targeted towards
`member of the SGML newsgroup that links the World Wide Web consor(cid:173)
`tium's XML Web page to a related page we know about on the Web. This
`link would still have two ends, but both could be sources and destinations
`at the same time. If so, we would term that link bidirectional, because you
`could traverse it from either end. Because the link would exist on your Web
`site, but link two other pages, we would call it out-ofline. And if it makes
`sense to link two pages, then why not three, or four, or five? Extended links
`allow this.
`
`J4.1.4 Link behaviors
`
`XML authors usually go out of their way to avoid putting information
`about formatting and other types of document behavior into XMI , docu(cid:173)
`ments. We've already been through all of the benefits of keeping your infor(cid:173)
`mation "pure". As we have said, if you just mark up your documents
`according to their abstractions, you can apply formatting and other behav(cid:173)
`ior through stylesheets.
`
`On the other hand, there arc a few link behaviors that are so common -
`almost universal -
`that the XML working group decided that it would be
`easier to provide some attributes to specify them directly. This takes a layer
`of abstraction out and thus makes hyperlinking a little bit easier. The con-
`
`® I 9 9 R T II IC X M l. H A N l) 1\ () "
`
`I( ' 1".\1
`
`
`
`506
`
`CHAPTER 34 I XML LINKING LANGUAGE(XLINK
`
`ceprs of hyperlink.ing are already abstract, so anything that makes life a little
`bit easier will belp XLink to becom popular.
`The most imeresri.ng type of link behavior is traversal. Wh n you dick
`on a hyperl.ink, you are traversing it. If a li nk i .intended ro em bed informa(cid:173)
`ti.on fr m one re ource in another, then rh process of actually accomplish(cid:173)
`ing the emb dding is a traversal.
`The behavioral descriptions are still "abstract enough" to allow a variety
`of specific behaviors, depending on the situation. The XLink spec says:
`
`Spec. Reference 34-1. Behavior
`The mechanism that XL.ink provides allows link authors to signaJ certain
`intentions as to the timing and effects of traversal. Such intentions can be
`expressed along two axes, labeled show and actuate. These are used to
`express policies rather than mechanisms; any link-processing application
`software is free to devise its own mechanisms, best suited to the user envi(cid:173)
`ronment and processing mode, to implement the requested policies.
`
`What this means is that different types of software applications are
`allowed to interpret these suggestions differently. For instance, you might
`not think of a printer as a machine that would care about hyperlinks, but it
`might be useful to have a printer that could directly print Web pages and
`their annotations, or that could resolve graphics embedded through XLink.
`
`34.1 .4.1
`
`Show
`
`As the name implies, the show attribute describes how the results of a link
`traversal should be shown. When you click on a Web link, that is a link tra(cid:173)
`initiated by your click. On the other hand, if you have ever
`versal - on
`been ro a ire where a Web page comes up and says: "You wLIJ be forwarded
`ro an ther page in just a few seconds", then rhat is a link rraversal tbat is
`au omatic. Typically on the Web, when a link is traver ·ed (manually or
`automatically) it replaces the previous docum nr in rhe Web browser win(cid:173)
`dow. XLin k allows an au ho r to request this behavim with the repl aoe
`value of the show attribute:
`For example:
`Occasi nally you will also come across a link that actually opens a new
`window, so that after traversal there is a window for the new page in front
`
`© 1 99 8 T H E X ML HA NDBO OK™
`
`
`
`34.1
`
`I BASIC CONCEPTS
`
`507
`
`Spec. Reference 34-2. Replace
`"replace" indicates that upon traversal of the link, the designated resource
`should, for the purposes of display or processing, replace the resource where
`the traversal started.
`
`Example 34-5. A replace link
`<A xml:link- "s impl e " show- "repla ce" href-"http://www.gop.org/">
`c lick here t o vis i t the GOP< /A>
`
`of the window for the old page. XLink allows this through the new value of
`the show attribute.
`
`Spec. Reference 34-3. New
`"new" indicates that upon traversal of the link, the designated resource
`should be displayed or processed in a new context, not affecting that of the
`resource where the traversal started.
`
`Example 34-6. A new link
`<A xml:link="simple" show="new" href="http://www.democ r ats.o r g/">
`Click h e re t o launc h a n e w window and visit t he the Dems.</A>
`
`As we discussed before, a link can in fact represent any relationship. Con(cid:173)
`sider the relationship between a document and an embedded graphic or
`even text fragment. This can be represented as a link also! Of course there
`are ways to embed graphics and text using only XML entities, but XLink
`provides another way of doing the same thing, which can be used in situa(cid:173)
`tions where the entity mechanism is not expressive enough by itself
`In this case, you can use the embed value:
`
`Spec. Reference 34-4. Embed
`"embed" indicates char upon traversal of the link, the designated resource
`should be embedded, for the purposes of display or processing, in the body
`of the resource and at the location where the traversal started.
`
`Example 34-7. An embed link
`<A xml:link= "s imple" show="embe d"
`h re f="h t tp://www.de mo crat s . o rg/l ogo.gif">
`
`© 1 9 ~ H T lj c X M L H A N D il ll o h: nr
`
`
`
`50 8
`
`CHAPTER 34 I XML LINKING LANGUAGE(XLINK
`
`J4. 1.5 Actuate
`
`The actuate attribute allows the author to describe when the link traversal
`should occur. For instance it could be user-triggered, such as by a mouse
`click or a voice command. Or else it could be automatic, such as the auto(cid:173)
`matic embedding of a graphic, or an automatic forward to another Web
`page (e.g. "This page has moved. You will be directed to the new page
`momentarily.")
`The user value indicates that the traversal should be user-triggered.
`When it is combined with a a show attribute of replace, it is a typical,
`dick-here-to-go-there link, at least in a graphical browser. On a text-based
`browser, it might be a type-this-number-to-go-there link. On a spoken(cid:173)
`word browser it might be a say-this-number-to-go-there link.
`When it is combined with a value of new it opens a new "context" (usu(cid:173)
`ally a browser window) at user command and leaves the old one open.
`When it is combined with a value of embed, it would make a link that
`expands into the embedded object. For instance a footnote or graphic
`might expand in-place when you click on them.
`The auto value of the actuate attribute is used to specifY that traversal
`should be automatic. For instance, most show=" embed" links would specifY
`automatic traversal. If you combine show="new" with actuate="auto",
`then you can create a Web page that immediately opens another Web page.
`Perhaps with a stylesheet or other attribute, you could make them be side
`by side. The final combination is show=" replace" with actuate=" auto".
`You would use this to set up a "forwarding" link, such as the one we have
`described, and thus forward users from one page to another.
`
`J4.1.6 Behavior
`
`XLink also provides a behavior attribute for specifYing more precise behav(cid:173)
`iors than the policies described above. You could fill this attribute with
`commands provided by a browser vendor, or with "hooks" to invoke rules
`in your stylesheet.
`You should be careful with an attribute that is as vaguely defined as this
`one. Wait until some conventions for its use arise before you fill your docu(cid:173)
`ments with markup that could be misinterpreted by confused software.
`
`(<) 1 9 '! H T f I l'. X M L H A N D ll o < l K rM
`
`
`
`34 .2 I EXTENDED LINKS
`
`509
`
`Spec. Reference 34-5. Behavior attribute
`A link author can also optionally use an artriblrt'e call~d b~h.;viot--ro-~~~;;~
`municate detailed instructions for traversal behavior. The contents, format,
`and meaning of this attribute are Wlconstrained.
`-------
`
`~4.2 1 Extended links
`
`In rh.is section, we will discuss mor features of the extended links. One thar
`we have already dis ussed is he abiliLy co specifY
`them out-of-line.
`Extended links also allow form re link ends, more advanced link roles, and
`other good stuff. We will also b able tore-describe ch
`imple links that we
`have already seen in the terminology of the more general extended link ys(cid:173)
`tem.
`
`Jt.'l.l Locator eletnents
`
`The first extension we will undertake is links with more than two link ends.
`Consider, for exam ple, tbar you are reclirecting users to several different
`interpretations of a texr. For instance if there were two competitive schools
`Qf thought on a topic, each hotspot in the document might allow traversal
`to a clifferem interpretation of the topic. Now you have rhree link ends, one
`for the sow-ce and one for each of rhe interpretations of it. Ju as in real
`life, XLink allows you to make logi cal links among two or more concepts.
`
`T be first big difference between imple links and extended links is that
`we need to .figure out how to specify the address of more than one destina(cid:173)
`tion link. We do this by putting locator sub-element into the extended link
`element. Here is an example:
`
`Example 34-8. Multi-ende1llink
`<commentary xrnl: li nk= " e xt ended" >
`<lo ca t o r href= "roberts . xrnl" ro l e= "Rober t s " />
`<locator h re f = "beam . xml " role =" Beam" />
`<l oca to r href = "goodwin. xrnl"
`.r ol e = "Go odwin" />
`<P>Hy fel l ow Americ ans, this speech wi ll go down in h i story .. ,
`</commentary>
`
`@ I
`
`~JlJ~ ·r ]IF XM L HANDI\ouK 1·\I
`
`
`
`5 1 0
`
`CHAPTER 34 I XML LINKING LANGUAGE(XLINK
`
`In this case, the three locators each address a resource. A sufficiently
`sophisiticated browser displaying this document might represent each with
`an icon or supply a popup menu that allows access to each of the resources.
`It could even open a small window for each interpretation when the
`hotspot is selected. This could be controlled by a stylesheet or a behavior
`attribute. As you can see, each locator can have a different role, but they
`could also share roles. The role just specifies a semantic for processing the
`resource when processing the link, not some sort of unique identifier.
`Locators can also have some other associated attributes. They can have
`titles, specified through a title attribute. These provide information for
`human consumption. The browser does not act on them. It merely passes
`them on to the human in some way, such as a popup menu, or text on the
`status bar. Locators can also have show, actuate and behavor attributes
`with the same semantics as for a simple link. Locators seem very similar to
`simple links because a simple link is a combination of a link and a locator.
`In fact, this is how they are defined in the XML spec:
`
`Spec. Reference 34-6. Simple links
`Simple links can be used for purposes that approximate the functionality of
`a basic HTML A link, but they can also support a limited amount of addi(cid:173)
`tional functionality. Simple links have only one locator and thus, for conve(cid:173)
`nience, combine the functions of a linking element and a locator into a
`single element. As a result of this combination, the simple linking element
`offers both a locator attribute and all the link and resource semantic
`attributes.
`
`It is both useful and convenient that simple links combine these two
`things, but it means that we must be careful to keep the ideas separate in
`our heads. The link describes a relationship. The locators say what resources
`are being related. A simple link uses its content as one resource and the tar(cid:173)
`get of its href as the other.
`
`i4.t.t Link groups
`
`It is often useful to be able to process a group ofhyperlinked document all
`together. For instance, if one document contains some text and another
`
`© 199 8 TH E XML HAN D BO OK ™
`
`
`
`3 ,+ . -~
`
`1 A D ll J( lc s s 1 N c
`
`5 11
`
`contains a rebuttal of the text, the browser might want to show them "side
`by side". lt could also allow link traversals in one window to trigger the cor(cid:173)
`rect portion of the rebuttal in the other.
`
`Such processing can only work if the browser knows about both docu(cid:173)
`ments at the same time. Extended link groups allow you to tell the browser
`about all of the nodes that should be processed together.
`
`An extmded linle group element is a special kind of extended link. ft
`describes a list of other documents that should be seen to be in this fill/;:
`group. Here is an example of such a link:
`
`Example 34-H. :Extemlctllink group
`::rel ated- document s xTnl: link-- "group " >
`<doc x ml : l ink= "do cumen t " href= " anno t ati on.h t ml" >
`<doc xmJ :l i nk= "document" href = "rebuttal.html">
`<doc xml:ljnk= "do cument " hr ef= " suppo rt .html ">
`</ re l a t ed-do cument s>
`
`ln one sense, a link group is a small database of hyperlinks. A browser,
`editor or other application could look in the link group to see which ele(cid:173)
`m ·n t.'> are hyperli nk resources and what their behaviors and roles are.
`
`Jt.J I Addressing
`
`Now that you know how to make all kinds of neat-o links, you might won(cid:173)
`der if XML also featmes neat-o addressing. Good guess! Of course, XML
`allows the usual kinds of URLs that you usc to navigate the Web. But now
`that those have found their way onto cveryLhing fi·orn milk cartons to tele(cid:173)
`vision advertisments, it is time for something new: XPointers. XPoimers
`allow sophisticated addressing into the contents of XM-L documents. That
`means that you can make a link to an element, or even a span of elements,
`based on things like position, elemem type and TD.
`Like XLink and XSL, XPointers are still under development. But the
`~onceprs are not likely to change much. They are well established in exist(cid:173)
`lllg projects like the 'Text Encoding hzitit?tive nd the HyTimr: International
`Standard .
`-
`
`~~ l 'llJ ·"' T HI~ X M L
`
`l-1 .. \ 1-1 ll 11 ~) n I<
`
`l,\r
`
`
`
`5 12
`
`CHAPTER 34 I XML LINKING LANGUAGE(XLINK
`J4.4 1 Uniform Resource Identifier
`(URI)
`
`The basic form of address for XLink is a URI, which stands for Uniform
`Resource Identifier. Today's most important form of URI is an extended
`form of the URL or Uniform Resott1'Ce Locat01: 1
`URLs are uniform, in that they have the same basic syntax no matter
`is being
`what specific type of resource (e.g. Web page, newsgroup)
`addressed or what mechanism is described to fetch it. They describe the
`locations of Web resources much as a physical address describes a person's
`location. URLs are hierarchical, just as most physical addresses are. A land
`mail address is resolved by sending a letter to a particular country, and from
`there to a local processing station, and from there to an individual. URLs
`are similar.
`The first part of a URL is the protocol. It describes the mechanism that
`the Web browser or other client should use to get the reso urce. Think of it
`as the difference between Federal Express, UPS, and the other courier ser(cid:173)
`vices. The most common such protocol is http which is essentially the
`"official" protocol of the World Wide 'WI b. The f t p file transfer protocol i
`also widely used, chiefly for large downloads such as new browser versions.
`After the protocol, there is a hostname and then a datapath. The darapath
`i broken inm chunk eparated by slash ("/") characters, as you have no
`doubt seen in hundreds of URLs. Technically, a URL ends at that point.
`In a URI, the URL can be followed by an optional query and then an
`optional fragment identifier. For instance you may have seen links into
`HTML documents that look like this:
`http://www.megabank.com/banking#about
`"#about" is a fragment identifier. It refers to a particular HTML element.
`XPointers are a imilar concept for XML documents, but they are much
`more flexible. Essentially, XPointers are an extension to URLs to allow you
`to poinr nor just to a documem, bm imo the content of one.
`For instance, on today's Web, if you wanced ro quote a particular para(cid:173)
`graph out of another documen , you would go to that documenr and cut
`and paste the text inro yours. rr, in th furure, the tex n the Web hanges,
`
`1. When URis are finalized by the Internet Engineering Task Force (IETF RFC
`1738 and IETF RFC 1808), they will also allow Universal Resource Names,
`which aren't location-dependent and perhaps will reduce the number of bro(cid:173)
`ken links.
`
`©1998 THE XML HANDB O OK™
`
`
`
`'I 4 . 5
`
`I R E F E R R I N (; T 0
`
`I D s
`
`5 13
`
`yow·s does not. If that is what you want, bat is fine. But XPointcrs allow
`you to construct a "living document" r.hat quotes and refer · to the very lac(cid:173)
`est version of the paragraph. You can understand how imp rtant chis abiUty
`is for the types of annotations we have discussed. Wirhour ir, you co uld
`only annotate complete documents.
`
`Jf,S 1 Referring to IDs
`
`The simplest form of XPointer allows you to refer to a particular element
`named with an lD. This is also the most robust form ofXPointer, because it
`does not at all depend on the location of the referenced text within its doc(cid:173)
`ument. Consider this XML document:
`c?xml ver s ion= "l .O " ?>
`c !DOCTYPE HEATWAVE SYSTEM "he atwave. dtd ">
`<HEATWAVE>
`<WAVE I D= "summer.9 2 " >
`<DURATION >July 22 t o August 2 </ DURA'ri ON>
`<TEMPERATURE>lOl Degrees< /TEMPERATURE >
`</WAVE>
`<WAVE I D= "summe r. 96 " >
`<DURATI ON>June 15 to July 1 8</DURAT I ON>
`<TEMPERATURE>103 Degrees< /TEMPERATURE>
`</WAVE >
`</HEATWAVE>
`If this document resides at http: I /www . h otdays. com/heatwave .:xml,
`then we could refer to the second HEATWAVE with this URI:
`http: I /www. hotdays. com/ heatwave . xml# i d( summer . 92)
`The XPointer is the last little bit of the URI, after the pound-sign ("#").
`An important thing to note is that this XPointer does not do anything. It
`refers to something. Whether the object is included, hyperlinked, or down(cid:173)
`loaded is competely a function of the context of reference.
`For instance, you could use the XPoin er in an XLink co crea e a hyper(cid:173)
`link to som thing, o r in a browser to download a particular object. It is also
`up to the software to decide whether the referred r element is r turned
`alone, or in the context of its document. For instance, if you use an
`XPointer in a browser window, it would probably present the whole docu(cid:173)
`~11ent and highlight the referenced element. But if you use it in an XLink to
`Include a paragraph, it would probably take that paragraph out of its con(cid:173)
`text and present it alone in the new context.
`
`© ll)t)?{ T ilE XMl, l-li\NI)B\lfl K I,\I
`
`
`
`5 14
`
`CHAPTER 34 I XML LINKING LANGUAGE(XLINK
`
`J4.6 1 Location terms
`
`In the URI:
`http: //www .hotdays.com/heatwave.xml#id(summer.92)
`The string id (summer. 9 2) is called a location term. Another simple
`XPoint