McGraw-Hill/Irwin © 2004 by The McGraw-Hill Companies, Inc. All rights reserved. Linking XML Documents Ellen Pearlman Eileen Mullin Programming the Web.

Slides:



Advertisements
Similar presentations
The Web Wizards Guide to HTML Chapter Four All About Hyperlinks.
Advertisements

Copyright © 2003 Pearson Education, Inc. Slide 6-1 Created by Cheryl M. Hughes, Harvard University Extension School Cambridge, MA The Web Wizards Guide.
Applications of XSLT. generating Word documents WordML provides formatting and content elements Word 2003 can read WordML files XSLT can be used to transform.
XML: Extensible Markup Language
Tutorial 1: Developing a Basic Web site
Cascading Style Sheets Understanding styles. The term cascading describe the capability of a local style to override a general style. CSS applies style.
Multi Platform Applications XML, XPath, XSLT transform.
HTML Hypertext Markup Language –First proposed by CERN in 1989 –It is non-linear so it allows you to jump from place to place –Markup refers to the structure.
Internet Technologies1 XLink The Wonderful World of Oz example and its DTD are from “XML in a Nutshell” by Elliotte Rusty Harold.
Visual Web Information Extraction With Lixto Robert Baumgartner Sergio Flesca Georg Gottlob.
1 Linking in XML A way of creating hyperlinks in XML documents, Internal-Link and External-Link.
XLink Van Lepthien CSCI 7818 Fall Overview What is XLink? W3C Stuff XLink Elements Linkbases Traversals Implementations Comments References.
1 XML Linking Language (XLink) W3C Working Draft - 3/3/1998.
XLink: Open Linking Standard XML / XSL separate  data semantics  presentation semantics Need to also separate out  navigation semantics Single unique.
1 The World Wide Web. 2  Web Fundamentals  Pages are defined by the Hypertext Markup Language (HTML) and contain text, graphics, audio, video and software.
McGraw-Hill/Irwin © 2004 by The McGraw-Hill Companies, Inc. All rights reserved. Creating Document Type Definitions (DTDs) Ellen Pearlman Eileen Mullin.
Tutorial 3: Adding and Formatting Text. 2 Objectives Session 3.1 Type text into a page Copy text from a document and paste it into a page Check for spelling.
Chapter 2 Introduction to HTML5 Internet & World Wide Web How to Program, 5/e Copyright © Pearson, Inc All Rights Reserved.
National Coastal Data Development Center A division of the National Oceanographic Data Center Please a list of participants at each location to
ECA 228 Internet/Intranet Design I Intro to XSL. ECA 228 Internet/Intranet Design I XSL basics W3C standards for stylesheets – CSS – XSL: Extensible Markup.
CPSC 203 Introduction to Computers Lab 39, 40 By Jie (Jeff) Gao.
CpSc 462/662: Database Management Systems (DBMS) (TEXNH Approach) HTML Basics James Wang.
16-1 The World Wide Web The Web An infrastructure of distributed information combined with software that uses networks as a vehicle to exchange that information.
McGraw-Hill/Irwin © 2004 by The McGraw-Hill Companies, Inc. All rights reserved. Schemas Ellen Pearlman Eileen Mullin Programming the Web Using XML.
Xpath Xlink Xpointer Xquery Sources:
XP New Perspectives on XML Tutorial 6 1 TUTORIAL 6 XSLT Tutorial – Carey ISBN
XP 1 CREATING AN XML DOCUMENT. XP 2 INTRODUCING XML XML stands for Extensible Markup Language. A markup language specifies the structure and content of.
WORKING WITH XSLT AND XPATH
Session II Chapter 2 – Chapter 2 – XSLhttp://
All Web pages are written with some form of HTML (HyperText Markup Language). HTML documents are saved as Text Only files so virtually any computer can.
Programming in HTML.  Programming Language  Used to design/create web pages  Hyper Text Markup Language  Markup Language  Series of Markup tags 
 2008 Pearson Education, Inc. All rights reserved Introduction to XHTML.
Chapter 27 The World Wide Web and XML. Copyright © 2004 Pearson Addison-Wesley. All rights reserved.27-2 Topics in this Chapter The Web and the Internet.
XP New Perspectives on The Internet, Sixth Edition— Comprehensive Tutorial 8 1 Creating Effective Web Pages Creating HTML Documents Tutorial 8.
28 October 2008CIS 340 # 1 Topics To define XML as a technology To place XML in the context of system architectures Online support:
Winter 2006Keller, Ullman, Cushing18–1 Plan 1.Information integration: important new application that motivates what follows. 2.Semistructured data: a.
McGraw-Hill/Irwin © 2004 by The McGraw-Hill Companies, Inc. All rights reserved. SMIL Ellen Pearlman Eileen Mullin Programming the Web Using XML.
XML A web enabled data description language 4/22/2001 By Mark Lawson & Edward Ryan L’Herault.
 2008 Pearson Education, Inc. All rights reserved Introduction to XHTML.
McGraw-Hill/Irwin © 2004 by The McGraw-Hill Companies, Inc. All rights reserved. Scripting with the DOM Ellen Pearlman Eileen Mullin Programming the Web.
Processing of structured documents. XML Linking Language (XLink) zCreate and describe links between resources zboth basic unidirectional links and more.
Part One Review Policy Intro to ISO Levels of Metadata Data Discovery.
McGraw-Hill/Irwin © 2004 by The McGraw-Hill Companies, Inc. All rights reserved. Applying eXtensible Style Sheets (XSL) Ellen Pearlman Eileen Mullin Programming.
XLinks Praveen Polishetty. Contents : XLink Capabilities XLink Concepts XLink Core Properties XLink Semantic Properties XLink Behavior Properties XLink.
Chapter 27 The World Wide Web and XML. Copyright © 2004 Pearson Addison-Wesley. All rights reserved.27-2 Topics in this Chapter The Web and the Internet.
McGraw-Hill/Irwin © 2004 by The McGraw-Hill Companies, Inc. All rights reserved. Understanding How XML Works Ellen Pearlman Eileen Mullin Programming the.
HTML Basic. What is HTML HTML is a language for describing web pages. HTML stands for Hyper Text Markup Language HTML is not a programming language, it.
 2008 Pearson Education, Inc. All rights reserved Document Object Model (DOM): Objects and Collections.
COMP9321 Web Application Engineering Semester 2, 2015 Dr. Amin Beheshti Service Oriented Computing Group, CSE, UNSW Australia Week 4 1COMP9321, 15s2, Week.
XML A Language Presentation. Outline 1. Introduction 2. XML 2.1 Background 2.2 Structure 2.3 Advantages 3. Related Technologies 3.1 DTD 3.2 Schemas and.
SNU OOPSLA Lab. Hypertext links(XLL) © copyright 2001 SNU OOPSLA Lab.
Introducing XLink and XPointer ©NIITeXtensible Markup Language/Lesson 10/Slide 1 of 23 Objectives In this lesson, you will learn to: * Identify the types.
Hypertext. Hypertext History (1) Many early attempts to organize human knowledge Many early attempts to organize human knowledge Thesaurus (Roget) Thesaurus.
Interoperability How to Build a Digital Library Ian H. Witten and David Bainbridge.
HTML Comprehensive Concepts and Techniques Second Edition Project 2 Creating a Web Site with Links.
XP Review 1 New Perspectives on JavaScript, Comprehensive1 Introducing HTML and XHTML Creating Web Pages with HTML.
Basic HTML Document Structure. Slide 2 Goals (XHTML HTML5) XHTML Separate document structure and content from document formatting HTML 5 Create a formal.
Processing of structured documents Part 7. XML Linking Language (XLink) zCreate and describe links between resources zboth basic unidirectional links.
 XML derives its strength from a variety of supporting technologies.  Structure and data types: When using XML to exchange data among clients, partners,
Jackson, Web Technologies: A Computer Science Perspective, © 2007 Prentice-Hall, Inc. All rights reserved Chapter 7 Representing Web Data:
Digital Multimedia, 2nd edition Nigel Chapman & Jenny Chapman Chapter 14 This presentation © 2004, MacAvon Media Productions XML.
XML Extensible Markup Language
XML Schema – XSLT Week 8 Web site:
Getting Started with CSS
XML Related Technologies
Chapter Eight Interoperability How to Build a Digital Library
Basic HTML Document Structure
Introduction of Week 11 Return assignment 9-1 Collect assignment 10-1
Chapter 16 The World Wide Web.
Tutorial 7 – Integrating Access With the Web and With Other Programs
Presentation transcript:

McGraw-Hill/Irwin © 2004 by The McGraw-Hill Companies, Inc. All rights reserved. Linking XML Documents Ellen Pearlman Eileen Mullin Programming the Web Using XML

9-2 Learning Objectives 1.Learn how to use XLink to link between XML documents and specific parts within them 2.See how both single-direction links like those in HTML documents and multi- directional links can be added to XML documents 3.Define XLink elements in an XML DTD 4.Use XPointer to point to any part of a target document on local or remote Web servers

9-3 Introduction to Linking in XML Documents XLink lets you insert elements into XML documents in order to create links between XML documents. XPointer provides a way to link into the internal structures of XML documents, including elements, attributes, and actual content.

9-4 Introducing XML Linking Language (XLink) With the XML Linking Language, or XLink, you can add elements within XML documents that create and link not only to other XML documents, but also to many components that might appear in an XML document, such as images, query results, or even other types of files or applications. The syntax used by XLink is reminiscent of HTML in many respects: Index

9-5 Hyperlinking Within HTML Documents

9-6 Hyperlinking Within XML Documents

9-7 Traversal and Linkbases All of the details about what happens when a link is followed – or a resource is accessed – using XLink comes under the comprehensive term traversal. Another useful XLink benefit is that you can create a collection of links for a series of documents in an ongoing database, known as a linkbase, which can be filtered or sorted as you desire.

9-8 Linking Elements To create XLink-based links, you need to define a linking element, which is an XML element recognized as having linking powers. There are two types of linking elements you can create with Xlink: –Simple links are designed to point to one target page only. –Extended links essentially offer a fork in the road: you could visit one of multiple potential destination pages.

9-9 Types of XLink Elements XLink elements can be one of six different types. Two of them are the linking elements (simple and extended) described previously. The other four elements let you construct a kind of “smart link.” These include: –locator –resource –arc –title

9-10 Global Attributes XLink provides global attributes that you use to declare your links’ details and special qualities. These include: –type –href –role –arcrole –title –show –actuate –label –from –to

9-11 Sample Simple Link <publisher xmlns:xlink=" xlink:type="simple" xlink:href=" xlink:show="new" xlink:actuate="onRequest" >About McGraw-Hill

9-12 Using XLink to Link to an Object <my-image xmlns:xlink=" xlink:type="simple" xlink:href=" xlink:show="embed" xlink:actuate="onLoad" />

9-13 Using XLink to Link to an External File <imported-legal xmlns:xlink=" xlink:type="simple" xlink:href=" xlink:show="onLoad" xlink:actuate="embed" />

9-14 Extended Links An extended link is intended to link to any number of resources. It defines a set of arcs – containing information about where links are used and where they should go – between several resources. Extended links are most important in situations where the participants have access to the resources under discussion. Another potential use is when the resources appear in formats that don’t typically allow for clickable, embedded links – for example, audio or video files.

9-15 Remote Resources Connected Through an Extended Link

9-16 Extended-Type Elements and Their Child Elements The extended-type element can contain child elements with any of the following type attributes: –locator-type elements, which list what remote resources are participating in the link –arc-type elements, which provide traversal rules among the link’s participating resources –title-type elements, which apply labels to make it easy for people to understand what each link is for –resource-type elements, which indicate the local resources that participate in the link

9-17 Creating XLinks in DTDs Start by declaring a straightforward simple link element in a DTD. It appears as an !ATTLIST component specifically because it is within a DTD : <!ATTLIST schedule xmlns:xlinkCDATA#FIXED " xlink:type(simple)#FIXED "simple" xlink:hrefCDATA#IMPLIED xlink:show(new)#FIXED "new" xlink:actuate(onRequest)#FIXED "onRequest"> In your XML document, you might add a link as follows: Current class schedule

9-18 Introducing XPointer While XLink can be very useful, as you've seen, it only lets you refer to another document. It’s likely that you may want to refer to a specific part within another document. XPointer allows you to do this with a capability similar to the concept of named anchors in HTML pages. This is especially useful for search engines, and in cataloging large documents.

9-19 A Sample XPointer Elements can have an ID attribute, which is meant to be used for linking and pointing: An XPointer that specifically points to the W3C Notes entry on the W3C’s Technical Reports and Publications page – where The ID assigned to this section is "Notes” – would appear as follows:

9-20 Linking with XPointer

9-21 Caveats to Bear in Mind When Linking With XPointer The resource you link to must be an XML document. The resource must remain online. The ID must not change. If the value of the element’s ID attribute changes, any links you've made using XPointer would need to be updated in kind; otherwise, the link will not work correctly. The application has to support XPointers. Browser support for XPointer has plodded along even further behind that for XLink.

9-22 Location Paths XPath lets you locate a node (elements or character data), or set of nodes, at any level of an XML document tree using what's called a location path. A location path can be an absolute path, which describes a location in reference to the root node. Or, a location path could be a relative path, which means you can point to elements that are relative to other elements.

9-23 Path to an XPointer Within a sample XML document called filmdb.xml: Raising Arizona 1987 Joel Coen …an XPointer could link directly to the data for "Raising Arizona" via the film's "id" attribute: Raising Arizona

9-24 The End