O'reilly Xpath and Xpointer.Pdf

Total Page:16

File Type:pdf, Size:1020Kb

O'reilly Xpath and Xpointer.Pdf XPath and XPointer John E. Simpson Publisher: O'Reilly First Edition August 2002 ISBN: 0-596-00291-2, 224 pages Referring to specific information inside an XML document is a little like finding a needle in a haystack. XPath and XPointer are two closely related Table of Contents languages that play a key role in XML processing by allowing developers Index to find these needles and manipulate embedded information. By the time Full Description you've finished XPath and XPointer, you'll know how to construct a full Reviews XPointer (one that uses an XPath location path to address document Reader reviews content) and completely understand both the XPath and XPointer features it Errata uses. 1 Table of Content Table of Content ............................................................................................................. 2 Preface............................................................................................................................. 4 Who Should Read This Book?.................................................................................... 4 Who Should Not Read This Book?............................................................................. 4 Organization of the Book............................................................................................ 5 Conventions Used in This Book ................................................................................. 5 Comments and Questions ........................................................................................... 6 Acknowledgments....................................................................................................... 7 Chapter 1. Introducing XPath and XPointer................................................................... 8 1.1 Why XPath and XPointer?.................................................................................... 8 1.2 Antecedents/History.............................................................................................. 9 1.3 XPath, XPointer, and Other XML-Related Specs .............................................. 12 1.4 XPath and XPointer Versus XQuery .................................................................. 15 Chapter 2. XPath Basics ............................................................................................... 17 2.1 The Node Tree: An Introduction......................................................................... 17 2.2 XPath Expressions .............................................................................................. 18 2.3 XPath Data Types ............................................................................................... 24 2.4 Nodes and Node-Sets.......................................................................................... 27 2.5 Node-Set Context................................................................................................ 38 2.6 String-Values ...................................................................................................... 40 Chapter 3. Location Steps and Paths............................................................................. 43 3.1 XPath Expressions .............................................................................................. 43 3.2 Location Paths..................................................................................................... 45 3.3 Location Steps..................................................................................................... 48 3.4 Compound Location Paths Revisited.................................................................. 63 Chapter 4. XPath Functions and Numeric Operators.................................................... 64 4.1 Introduction to Functions.................................................................................... 64 4.2 XPath Function Types......................................................................................... 66 4.3 XPath Numeric Operators................................................................................... 92 Chapter 5. XPath in Action........................................................................................... 95 5.1 XPath Visualiser: Some Background.................................................................. 95 5.2 Sample XML Document..................................................................................... 97 5.3 General to Specific, Common to Far-Out........................................................... 99 Chapter 6. XPath 2.0................................................................................................... 122 6.1 General Goals.................................................................................................... 123 6.2 Specific Requirements ...................................................................................... 126 Chapter 7. XPointer Background................................................................................ 141 7.1 XPointer and Media types................................................................................. 141 7.2 Some Definitions .............................................................................................. 143 7.3 The Framework................................................................................................. 146 2 7.4 Error Types ....................................................................................................... 147 7.5 Encoding and Escaping Characters in XPointer ............................................... 148 Chapter 8. XPointer Syntax ........................................................................................ 153 8.1 Shorthand Pointers............................................................................................ 153 8.2 Scheme-Based XPointer Syntax ....................................................................... 154 8.3 Using XPointers in a URI ................................................................................. 163 Chapter 9. XPointer Beyond XPath............................................................................ 165 9.1 Why Extend XPath?.......................................................................................... 165 9.2 Points and Ranges............................................................................................. 167 9.3 XPointer Extensions to Document Order ......................................................... 174 9.4 XPointer Functions ........................................................................................... 178 Appendix A. Extension Functions for XPath in XSLT .............................................. 187 A.1 Additional Functions in XSLT 1.0................................................................... 187 A.2 EXSLT Extensions........................................................................................... 188 Colophon..................................................................................................................... 197 3 Preface XML documents contain regular but flexible structures. Developers can use those structures as a framework on which to build powerful transformative and reporting applications, as well as to establish connections between different parts of documents. XPath and XPointer are two W3C-created technologies that make these structures accessible to applications. XPath is used for locating XML content within an XML document; XPointer is the standard for addressing such content, once located. The two standards are not typically used in isolation but in support of two critical extensions to the core of XML: Extensible Stylesheet Language Transformations (XSLT) and XLink, respectively. They are also finding wide use in other applications that need to reference parts of documents. These two closely related technologies provide the underpinning of an enormous amount of XML processing. Who Should Read This Book? Presumably, if you're browsing a book like this, you already know the rudiments of XML itself. You may have experimented with XSLT but, if so, haven't completely mastered it. (You can't do much in XSLT without first becoming comfortable with at least the basics of XPath.) Similarly, you may have experimented with XLinks; in this case, you've probably focused on linking to entire documents other than the one containing the link. XPointer will be your tool of choice for linking to portions of documents — external to or within the document where the XLink reference is made. As support for XPath is integrated into the Document Object Model (DOM), DOM developers may also find XPath a convenient alternative to walking through document trees. Finally, developers interested in hypertext and other applications where references may have to cross node boundaries will find a thorough explanation of XPointer, the leading technology for creating those references. You need not be an XML document author or developer to read this book. The XPath standard is fairly mature, and therefore is already incorporated in a number of high-level tools. XPointer, by contrast, is not yet a final standard; for this reason, the use of XPointers will probably be limited to experimental purposes in the short term. Regardless of whether you're coming at the subject as primarily a document author or designer, or as a developer, XPath and XPointer can be revisited as often as you need it: for reference or as a refresher. Who Should Not Read This Book? If you don't yet understand XML (including XML
Recommended publications
  • Toward the Discovery and Extraction of Money Laundering Evidence from Arbitrary Data Formats Using Combinatory Reductions
    Toward the Discovery and Extraction of Money Laundering Evidence from Arbitrary Data Formats using Combinatory Reductions Alonza Mumford, Duminda Wijesekera George Mason University [email protected], [email protected] Abstract—The evidence of money laundering schemes exist undetected in the electronic files of banks and insurance firms scattered around the world. Intelligence and law enforcement analysts, impelled by the duty to discover connections to drug cartels and other participants in these criminal activities, require the information to be searchable and extractable from all types of data formats. In this overview paper, we articulate an approach — a capability that uses a data description language called Data Format Description Language (DFDL) extended with higher- order functions as a host language to XML Linking (XLink) and XML Pointer (XPointer) languages in order to link, discover and extract financial data fragments from raw-data stores not co- located with each other —see figure 1. The strength of the ap- Fig. 1. An illustration of an anti-money laundering application that connects proach is grounded in the specification of a declarative compiler to multiple data storage sites. In this case, the native data format at each site for our concrete language using a higher-order rewriting system differs, and a data description language extended with higher-order functions with binders called Combinatory Reduction Systems Extended and linking/pointing abstractions are used to extract data fragments based on (CRSX). By leveraging CRSX, we anticipate formal operational their ontological meaning. semantics of our language and significant optimization of the compiler. Index Terms—Semantic Web, Data models, Functional pro- II.
    [Show full text]
  • Annotea: an Open RDF Infrastructure for Shared Web Annotations
    Proceedings of the WWW 10th International Conference, Hong Kong, May 2001. Annotea: An Open RDF Infrastructure for Shared Web Annotations Jos´eKahan,1 Marja-Riitta Koivunen,2 Eric Prud’Hommeaux2 and Ralph R. Swick2 1 W3C INRIA Rhone-Alpes 2 W3C MIT Laboratory for Computer Science {kahan, marja, eric, swick}@w3.org Abstract. Annotea is a Web-based shared annotation system based on a general-purpose open RDF infrastructure, where annotations are modeled as a class of metadata.Annotations are viewed as statements made by an author about a Web doc- ument. Annotations are external to the documents and can be stored in one or more annotation servers.One of the goals of this project has been to re-use as much existing W3C technol- ogy as possible. We have reacheditmostlybycombining RDF with XPointer, XLink, and HTTP. We have also implemented an instance of our system using the Amaya editor/browser and ageneric RDF database, accessible through an Apache HTTP server. In this implementation, the merging of annotations with documents takes place within the client. The paper presents the overall design of Annotea and describes some of the issues we have faced and how we have solved them. 1Introduction One of the basic milestones in the road to a Semantic Web [22] is the as- sociation of metadata to content. Metadata allows the Web to describe properties about some given content, even if the medium of this content does not directly provide the necessary means to do so. For example, ametadata schema for digital photos [15] allows the Web to describe, among other properties, the camera model used to take a photo, shut- ter speed, date, and location.
    [Show full text]
  • Advanced XHTML Plug-In for Iserver
    Advanced XHTML Plug-in for iServer Semester work Stefan Malaer <[email protected]> Prof. Dr. Moira C. Norrie Dr. Beat Signer Global Information Systems Group Institute of Information Systems Department of Computer Science 12th October 2005 Copyright © 2005 Global Information Systems Group. Abstract The iServer architecture is an extensible cross-media information platform enabling links between arbitrary typed objects. It provides some fundamental link concepts and is based on a plug-in mechanism to support various media types. The goal of this semester work was to develop a XHTML plug-in for iServer which enables links from XHTML documents to other XHTML documents as well as parts of them. The resulting iServext is a Firefox extension for iServer which provides visualization and authoring functionality for XHTML links. Furthermore, we investigated research in the area of link augmentation and provide an overview of recent technologies. iii iv Contents 1 Introduction 1 2 Augmented Linking 3 2.1 Need for augmented linking ........................... 3 2.1.1 Current link model ............................ 3 2.1.2 Approaches for link augmentation ................... 5 2.2 Related work .................................... 6 2.2.1 Chimera .................................. 6 2.2.2 Hyper-G/Hyperwave ........................... 6 2.2.3 Distributed Link Service ......................... 6 2.2.4 DHM/WWW and Extend Work ..................... 6 2.2.5 HyperScout ................................. 7 2.2.6 Link Visualization with DHTML ..................... 7 2.2.7 Amaya project ............................... 8 2.3 Link integration and authoring ......................... 9 2.4 Link visualization .................................. 11 2.4.1 Today’s link visualization ......................... 11 2.4.2 Possible presentations of link information .............. 11 2.4.3 Examples of link visualization .....................
    [Show full text]
  • Dynamic and Interactive R Graphics for the Web: the Gridsvg Package
    JSS Journal of Statistical Software MMMMMM YYYY, Volume VV, Issue II. http://www.jstatsoft.org/ Dynamic and Interactive R Graphics for the Web: The gridSVG Package Paul Murrell Simon Potter The Unversity of Auckland The Unversity of Auckland Abstract This article describes the gridSVG package, which provides functions to convert grid- based R graphics to an SVG format. The package also provides a function to associate hyperlinks with components of a plot, a function to animate components of a plot, a function to associate any SVG attribute with a component of a plot, and a function to add JavaScript code to a plot. The last two of these provides a basis for adding interactivity to the SVG version of the plot. Together these tools provide a way to generate dynamic and interactive R graphics for use in web pages. Keywords: world-wide web, graphics, R, SVG. 1. Introduction Interactive and dynamic plots within web pages are becomingly increasingly popular, as part of a general trend towards making data sets more open and accessible on the web, for example, GapMinder (Rosling 2008) and ManyEyes (Viegas, Wattenberg, van Ham, Kriss, and McKeon 2007). The R language and environment for statistical computing and graphics (R Development Core Team 2011) has many facilities for producing plots, and it can produce graphics formats that are suitable for including in web pages, but the core graphics facilities in R are largely focused on static plots. This article describes an R extension package, gridSVG, that is designed to embellish and transform a standard, static R plot and turn it into a dynamic and interactive plot that can be embedded in a web page.
    [Show full text]
  • Bibliography of Erik Wilde
    dretbiblio dretbiblio Erik Wilde's Bibliography References [1] AFIPS Fall Joint Computer Conference, San Francisco, California, December 1968. [2] Seventeenth IEEE Conference on Computer Communication Networks, Washington, D.C., 1978. [3] ACM SIGACT-SIGMOD Symposium on Principles of Database Systems, Los Angeles, Cal- ifornia, March 1982. ACM Press. [4] First Conference on Computer-Supported Cooperative Work, 1986. [5] 1987 ACM Conference on Hypertext, Chapel Hill, North Carolina, November 1987. ACM Press. [6] 18th IEEE International Symposium on Fault-Tolerant Computing, Tokyo, Japan, 1988. IEEE Computer Society Press. [7] Conference on Computer-Supported Cooperative Work, Portland, Oregon, 1988. ACM Press. [8] Conference on Office Information Systems, Palo Alto, California, March 1988. [9] 1989 ACM Conference on Hypertext, Pittsburgh, Pennsylvania, November 1989. ACM Press. [10] UNIX | The Legend Evolves. Summer 1990 UKUUG Conference, Buntingford, UK, 1990. UKUUG. [11] Fourth ACM Symposium on User Interface Software and Technology, Hilton Head, South Carolina, November 1991. [12] GLOBECOM'91 Conference, Phoenix, Arizona, 1991. IEEE Computer Society Press. [13] IEEE INFOCOM '91 Conference on Computer Communications, Bal Harbour, Florida, 1991. IEEE Computer Society Press. [14] IEEE International Conference on Communications, Denver, Colorado, June 1991. [15] International Workshop on CSCW, Berlin, Germany, April 1991. [16] Third ACM Conference on Hypertext, San Antonio, Texas, December 1991. ACM Press. [17] 11th Symposium on Reliable Distributed Systems, Houston, Texas, 1992. IEEE Computer Society Press. [18] 3rd Joint European Networking Conference, Innsbruck, Austria, May 1992. [19] Fourth ACM Conference on Hypertext, Milano, Italy, November 1992. ACM Press. [20] GLOBECOM'92 Conference, Orlando, Florida, December 1992. IEEE Computer Society Press. http://github.com/dret/biblio (August 29, 2018) 1 dretbiblio [21] IEEE INFOCOM '92 Conference on Computer Communications, Florence, Italy, 1992.
    [Show full text]
  • Interactive Topographic Web Mapping Using Scalable Vector Graphics
    University of Nebraska at Omaha DigitalCommons@UNO Student Work 12-1-2003 Interactive topographic web mapping using scalable vector graphics Peter Pavlicko University of Nebraska at Omaha Follow this and additional works at: https://digitalcommons.unomaha.edu/studentwork Recommended Citation Pavlicko, Peter, "Interactive topographic web mapping using scalable vector graphics" (2003). Student Work. 589. https://digitalcommons.unomaha.edu/studentwork/589 This Thesis is brought to you for free and open access by DigitalCommons@UNO. It has been accepted for inclusion in Student Work by an authorized administrator of DigitalCommons@UNO. For more information, please contact [email protected]. INTERACTIVE TOPOGRAPHIC WEB MAPPING USING SCALABLE VECTOR GRAPHICS A Thesis Presented to the Department of Geography-Geology and the Faculty of the Graduate College University of Nebraska in Partial Fulfillment of the Requirements for the Degree Master of Arts University of Nebraska at Omaha by Peter Pavlicko December, 2003 UMI Number: EP73227 All rights reserved INFORMATION TO ALL USERS The quality of this reproduction is dependent upon the quality of the copy submitted. In the unlikely event that the author did not send a complete manuscript and there are missing pages, these will be noted. Also, if material had to be removed, a note will indicate the deletion. Dissertation WWisMng UMI EP73227 Published by ProQuest LLC (2015). Copyright in the Dissertation held by the Author. Microform Edition © ProQuest LLC. All rights reserved. This work is protected against unauthorized copying under Title 17, United States Code ProQuest LLC. 789 East Eisenhower Parkway P.O. Box 1346 Ann Arbor, Ml 48106-1346 THESIS ACCEPTANCE Acceptance for the faculty of the Graduate College, University of Nebraska, in Partial fulfillment of the requirements for the degree Master of Arts University of Nebraska Omaha Committee ----------- Uf.A [JL___ Chairperson.
    [Show full text]
  • Extended Link Visualization with DHTML: the Web As an Open Hypermedia System
    Extended Link Visualization with DHTML: The Web as an Open Hypermedia System Glenn Oberholzer and Erik Wilde Computer Engineering and Networks Laboratory Swiss Federal Institute of Technology, Z¨urich TIK Report 125 January 2002 Abstract The World Wide Web is by far the most successful hypermedia system, its name often being used synonymously for the Internet. However, it is based on a rather restricted hy- permedia model with limited linking functionality. Even though underlying systems may provide a richer data model, there is still the question of how to present this informa- tion in a Web-based interface in an easily understandable way. Assuming an underlying system similar to Topic Maps, which allows storing, managing, and categorizing meta data and links, we propose a presentation of extended links. We try to provide a usable way for users to handle the additional functionality. The mechanism is based on already available technologies like DHTML. It is one facet of our approach to make the Web more interconnected and to work towards a more richly and openly linked Web. Keywords: Electronic publishing (020), Graphic design (029), Hypermedia (036), Internet (045), World Wide Web (084), XLink, Linkbases, DHTML 1 Introduction Compared to many other hypermedia systems [24,11,16], the linking capabilities of the World Wide Web are rather limited. It only makes use of a few concepts of hypermedia. In recent years, however, new recommendations issued by the W3C like XML [3], XLink [10], and XPointer [9], or ISO/IEC’s Topic Maps [19] have tried to overcome this shortcoming. Due to the popularity of the Web, efforts have to be made to integrate and improve the current system with more sophisticated hypermedia concepts.
    [Show full text]
  • SMIL 2.0 — Interactive Multimedia on the Web Lloyd Rutledge
    SMIL 2.0 — Interactive Multimedia on the Web Lloyd Rutledge Multimedia and Human-Computer Interaction Group CWI, Amsterdam, The Netherlands W3C SYMM working group Lynda Hardman, Jacco van Ossenbruggen: CWI Dick Bulterman, Jack Jansen, Sjoerd Mullender: Oratrix W3C SYMM working group http://www.cwi.nl/~media/SMIL/Tutorial/{SMIL-4hr.html} Includes material from the upcoming book "SMIL 2.0 — Interactive Multimedia on the Web" Copyright © 2002, Lloyd Rutledge Synchronized Multimedia Integration Language (SMIL) Main Points Pronounced smile Multimedia for the Web — for multimedia what HTML is for hypertext Integration format for presentable mono-medium formats Structure SMIL 1.0 — W3C Recommendation on 15th June 1998 SMIL 2.0 "meta-language" W3C Recommendation on 7th August 2001 SMIL 2.0 family formats SMIL Profile and SMIL Basic released with SMIL 2.0 SMIL 2.0 family format XHTML+SMIL comes after SMIL 2.0 Main Themes Powerful timing and synchronization Adaptive to users and systems Models a flexible but consistent presentation and user interface SMIL Isn't Flash — Flash is mono-medium animation on steriods MPEG-{4 / 7 / 21} — MPEG looks at content and coding, and player architecture and a whole lot more, but is more media centric than web centric D-HTML — D-HTML uses scripted definitions of local behaviors, without a notion of the presentation's context SMIL 2.0 Profiles What is a Profile? A language for which a browser can be built A combination of modules from the SMIL 2.0 "meta-language" Possibly non-SMIL constructs with SMIL constructs
    [Show full text]
  • XML Projects in Japan and Fujitsu's Approach to Xlink/Xpointer
    UDC 621.395.74:651.55:681.32 XML Projects in Japan and Fujitsu’s Approach to XLink/XPointer VToshimitsu Suzuki VMasatomo Goto (Manuscript received June 2, 2000) The Extensible Markup Language (XML)1) is a markup language developed in response to a recommendation by the World Wide Web Consortium (W3C).2) It is a meta lan- guage used to make an information structure. XML’s original specification is the Stan- dard Generalized Markup Language (SGML).3) Now, XML is used not only as a format language but also as a framework in various areas beyond the SGML field. This paper describes the XML technology trends, the current state of XML technology, and some case studies in Japan and at Fujitsu. This paper also describes HyBrick,4) which is an XML/SGML browser that was demonstrated at SGML’97, and the XLink5)/XPointer6) technology. 1. Introduction verified through these experiments. The specification of XML has been in use by Up to now, XML has been related to infor- the W3C since 1996. XML version 1.0 was released mation technology (IT), and because of the IT as a W3C recommendation in February 1998. revolution it is becoming a secure part of the foun- XML is a meta language for marking up informa- dation of new IT systems. Last year, a lineup of tion. XML’s original specification is the Standard XML parsers and other XML basic software ap- Generalized Markup Language (SGML), which is peared, establishing a development environment used to mark up documents for archiving and re- for application software.
    [Show full text]
  • What Are... Xlink and Xpointer?
    What Are... XLink and XPointer? Brian Kelly explains XLink and XPointer. This article appears in the Web, and not the print version of Ariadne. Background The What Is ...? article in the last edition of Ariadne gave an introduction to XML, the Extensible Markup Language [1]. XML has been developed to overcome HTML's lack of extensibility - with XML you will be able to define your own element tags. We have already seen a variety of communities defining element tags for use within their community, such as MathML [2] and MusicML [3]. Besides lacking extensibility, HTML is also limited in its hyperlinking functionality. XLink and XPointer are currently being developed in order to address these limitations. XLink In HTML hyperlinking is normally achieved using the <A> (anchor) element. This provides a simple uni- directional link: normally clicking on a hypertext link will cause the current document to be replaced by a new document. XLink [4] provides much richer hyperlinking functionality which the hypertext community have argued is needed in order to provide a richer web infrastructure. XLink enables multiple destinations to be provided. For example consider the XML portion illustrated below. <p>What is an <a xml:link="extended"> <locator href="glossary.xml" role="Glossary definition"> <locator href="http://www.w3.org/TR/" role="XML Link specification"> <locator href="tutorial.xml" role="Tutorial"> <locator href="quiz.xml" role="Quiz">XLink?</a></p> This could be rendered by a conforming XML browser as shown in Figure 1. XLink also enables a variety of link behaviours to be specified, including embedding the resource in the original document, replacing the original document and creating a new window.
    [Show full text]
  • Web Engineering § Easy to Author for Non-Computer-Experts
    HTML – Design Goals ¨ simple Web Engineering § easy to author for non-computer-experts Prof. Dr. Dr. h.c. mult. Gerhard Krüger, Albrecht Schmidt ¨ application independent § any application should be possible Universität Karlsruhe ¨ platform independent Fakultät für Informatik § focus on content not on presentation Institut für Telematik ¨ defined by means of SGML Wintersemester 2000/2001 § HTML DTD from version HTML 2.0 on Prof. Dr. Dr. h.c. mult . Gerhard Krüger, Albrecht Schmidt: Web Engineering, WS00/01 page 1 Prof. Dr. Dr. h.c. mult . Gerhard Krüger, Albrecht Schmidt: Web Engineering, WS00/01 page 3 Example-Document <html> <head> <meta name="Author" content="Albrecht Schmidt"> <title>Web Engineering - Homepage</title> </head> <body bgcolor="#000000" text="#FFFFFF" link="#999999" Web Engineering vlink="#CCCCCC" alink="#666666"> <h1> Web Engineering - Homepage< br> ... <a href="/lehre/webe/unterlagen.html"><br> Chapter 3: The Web – An Information System <img SRC="/lehre/webe/unterlagen .gif" height=40 width=140 alt="Unterlagen" border=0 align=ABSCENTER></a> .... <h3>Art der Veranstaltung: Vorlesung, 2 SWS</h3> ... &nbsp; ... </body></html> Prof. Dr. Dr. h.c. mult . Gerhard Krüger, Albrecht Schmidt: Web Engineering, WS00/01 page 2 Prof. Dr. Dr. h.c. mult . Gerhard Krüger, Albrecht Schmidt: Web Engineering, WS00/01 page 4 HTML - Development HTML - HEAD ¨ 1990 HTML ¨ HEAD § CERN - first implementation § TITLE ¨ 1991 HTML+ § LINK § Implementation in the Arena Browser ¨ link to other documents, e.g. Style Sheet ¨ 1994 HTML 2.0 ¨ specifying relation to other Documents § Combined features from Mosaic, Arena and other browsers § META ¨ e.g. Forms § SCRIPT § then Netscape was founded – browser are ahead of definitions § STYLE ¨ 1997 HTML 3.2 ¨ embedded Style Sheet § when published far behind the state of the art § functionality ¨ z.B.
    [Show full text]
  • XML Pointer Language
    wilde/lowe-47194 book June 28, 2002 9:37 6 XML Pointer Language XPath, described in detail in the previous chapter, provides a common foundation for other standards that need to address into XML documents. One such standard, and the most interesting with regard to implement- ing hypermedia based on XML technologies, is the XML Pointer Language (XPointer) [DeRose+ 01a], which is used for fragment identifiers for XML resources. According to RFC 3023 [Murata+ 01], XML documents are asso- ciated with a numberof MIME types. 1 Forall these different types of XML resources, it is possible to specify a fragment identifier, which is separated from the URI of the resource itself by a crosshatch (#) character. As defined in RFC 2396 [Berners-Lee+ 98] (the standard for URI syntax), a fragment identifieris not an actual partof a URI but is often used in conjunction with one in the so-called URI reference. Thus, XPointercan be used forspecifying referencesthat point to parts of an XML document, and not to the whole document. As a sim- ple example, while the URI http://www.w3.org/TR/ references the tech- nical reports page of the W3C (as shown in Figure 6.1), the URI refer- ence http://www.w3.org/TR/#xpointer(id('xptr')) specifically points to the entryforthe XPointerstandardon that page. 2 This mechanism makes it possible to create links that are much more specific than through the use of URIs only. There are, however, several things to keep in mind, as follows: • The resource must be XML. XPointeris a mechanism foraddressing into XML documents, so the resource identified by the URI must be 1The Multipurpose Internet Mail Extensions (MIME) [Borenstein & Freed 92] define (in addition to a multitude of otherthings not relevant in this context) a mechanism foridenti- fying types of resources by means of a media type (e.g., text) and a subtype (e.g., html).
    [Show full text]