Introduction to XLink Transparency No. 1 Introduction to XML Linking Language (XLink) Cheng-Chia Chen.

Slides:



Advertisements
Similar presentations
Copyright © 2003 Pearson Education, Inc. Slide 6-1 Created by Cheryl M. Hughes, Harvard University Extension School Cambridge, MA The Web Wizards Guide.
Advertisements

XML III. Learning Objectives Formatting XML Documents: Overview Using Cascading Style Sheets to format XML documents Using XSL to format XML documents.
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
Document Type Definition DTDs CS-328. What is a DTD Defines the structure of an XML document Only the elements defined in a DTD can be used in an XML.
XLink & XPointer ShengWu. Contents Covered XLink –XLink Versus HTML links –Linking Elements –Simple Links –Link Behavior –Extended Links.
Internet Technologies1 XLink The Wonderful World of Oz example and its DTD are from “XML in a Nutshell” by Elliotte Rusty Harold.
Introduction to XLink Transparency No. 1 XML Information Set W3C Recommendation 24 October 2001 (1stEdition) 4 February 2004 (2ndEdition) Cheng-Chia Chen.
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 COS 425: Database and Information Management Systems XML and information exchange.
XLINK A mechanism to link xml documents. Fujitsu’s free xlink processor xwand/activity/xbrltools/xlip/index.htmlhttp://software.fujitsu.com/en/interstage-
Introduction to XLink Transparency No. 1 How the Minimum Set of Platform Plugins Are Related Cheng-Chia Chen.
1 XML Linking Language (XLink) W3C Working Draft - 3/3/1998.
Sunday, June 28, 2015 Abdelali ZAHI : FALL 2003 : XML Schemas XML Schemas Presented By : Abdelali ZAHI Instructor : Dr H.Haddouti.
XLink: Open Linking Standard XML / XSL separate  data semantics  presentation semantics Need to also separate out  navigation semantics Single unique.
XML –Query Languages, Extracting from Relational Databases ADVANCED DATABASES Khawaja Mohiuddin Assistant Professor Department of Computer Sciences Bahria.
September 15, 2003Houssam Haitof1 XSL Transformation Houssam Haitof.
Introduction to XML This material is based heavily on the tutorial by the same name at
4/20/2017.
XML TOPIC MAP JUNG J. W.. SNU OOPSLA Lab. contents What ’ s XTM? Why XTM? Element of XTM XTM Conceptual Model DTD Introduction to XTM Syntax.
XP New Perspectives on XML Tutorial 4 1 XML Schema Tutorial – Carey ISBN Working with Namespaces and Schemas.
XML Validation I DTDs Robin Burke ECT 360 Winter 2004.
Tutorial 3: XML Creating a Valid XML Document. 2 Creating a Valid Document You validate documents to make certain necessary elements are never omitted.
XP New Perspectives on XML Tutorial 3 1 DTD Tutorial – Carey ISBN
XML Anisha K J Jerrin Thomas. Outline  Introduction  Structure of an XML Page  Well-formed & Valid XML Documents  DTD – Elements, Attributes, Entities.
Introduction to XML cs3505. References –I got most of this presentation from this site –O’reilly tutorials.
Why XML ? Problems with HTML HTML design - HTML is intended for presentation of information as Web pages. - HTML contains a fixed set of markup tags. This.
Dr. Azeddine Chikh IS446: Internet Software Development.
XML CPSC 315 – Programming Studio Fall 2008 Project 3, Lecture 1.
Xpath Xlink Xpointer Xquery Sources:
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.
XML Language Family Detailed Examples Most information contained in these slide comes from: These slides are intended.
Document Type Definitions Kanda Runapongsa Dept. of Computer Engineering Khon Kaen University.
What is XML?  XML stands for EXtensible Markup Language  XML is a markup language much like HTML  XML was designed to carry data, not to display data.
Processing of structured documents Spring 2002, Part 2 Helena Ahonen-Myka.
1 Tutorial 13 Validating Documents with DTDs Working with Document Type Definitions.
XML A web enabled data description language 4/22/2001 By Mark Lawson & Edward Ryan L’Herault.
1 Chapter 10: XML What is XML What is XML Basic Components of XML Basic Components of XML XPath XPath XQuery XQuery.
XML Part 2 Josh Steele CS 6704, Spring XML Part 2 XSL/XSLT –Structure Revisited –Definition –Example –Components XML’s Linking Languages XML’s Uses.
XML Extensible Markup Language Aleksandar Bogdanovski Programing Enviroment LABoratory
New Perspectives on XML, 2nd Edition
Processing of structured documents. XML Linking Language (XLink) zCreate and describe links between resources zboth basic unidirectional links and more.
Lecture 16 Introduction to XML Boriana Koleva Room: C54
Part One Review Policy Intro to ISO Levels of Metadata Data Discovery.
XLinks Praveen Polishetty. Contents : XLink Capabilities XLink Concepts XLink Core Properties XLink Semantic Properties XLink Behavior Properties XLink.
XML 2nd EDITION Tutorial 4 Working With Schemas. XP Schemas A schema is an XML document that defines the content and structure of one or more XML documents.
1 Tutorial 14 Validating Documents with Schemas Exploring the XML Schema Vocabulary.
Tutorial 13 Validating Documents with Schemas
INFSY 547: WEB-Based Technologies Gayle J Yaverbaum, PhD Professor of Information Systems Penn State Harrisburg.
COMP9321 Web Application Engineering Semester 2, 2015 Dr. Amin Beheshti Service Oriented Computing Group, CSE, UNSW Australia Week 4 1COMP9321, 15s2, Week.
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.
UML Basics and XML Basics Navigating the ISO Standards.
XML Linking Language (XLink) Yi-Hui Lin. What is XLink? XLink is short for the XML Linking Language XLink is a language for creating hyperlinks in XML.
Games: XML Presented by: Idham bin Mat Desa Mohd Sharizal bin Hamzah Mohd Radzuan bin Mohd Shaari Shukor bin Nordin.
Interoperability How to Build a Digital Library Ian H. Witten and David Bainbridge.
XML Validation II Advanced DTDs + Schemas Robin Burke ECT 360.
McGraw-Hill/Irwin © 2004 by The McGraw-Hill Companies, Inc. All rights reserved. Linking XML Documents Ellen Pearlman Eileen Mullin Programming the Web.
Lecture 23 XQuery 1.0 and XPath 2.0 Data Model. 2 Example 31.7 – User-Defined Function Function to return staff at a given branch. DEFINE FUNCTION staffAtBranch($bNo)
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
 2002 Prentice Hall, Inc. All rights reserved. 1 XLink and XPointer Outline 1Introduction 2XML Linking Language (XLink) 2.1 Simple Links 2.2 Extended.
Unit 4 Representing Web Data: XML
Chapter Eight Interoperability How to Build a Digital Library
Chapter 7 Representing Web Data: XML
New Perspectives on XML
Presentation transcript:

Introduction to XLink Transparency No. 1 Introduction to XML Linking Language (XLink) Cheng-Chia Chen

Introduction to XLink Transparency No. 2 XLink, XPointer, XPath, Xinclude and XML Base XLink: 27 June 2001, Recommendation a generalization of the HTML link concept higher abstraction level (intended for general XML - not just hypertext) more expressive power (multiple destinations, special behaviours, out- of-line links,...) uses XPointer to locate resources XPointer : 11 September 2001, Candidate recommendation an extension of XPath suited for linking specifies connection between XPath expressions and URIs XPath: November 16, Specification a declarative language for locating nodes and fragments in XML trees used in both XPointer (for addressing) and XSL (for pattern matching) XInclude :: 17 September 2002, Candidate recommendation embeds a document identified by a URI inside an XML document. XMLBase:27, June 2001, Recommendation defines the URI against which relative URIs are resolved

Introduction to XLink Transparency No. 3 XML Base A URI identifies a resource: is an absolute URI somefile.xml is a relative URI XML Base provides a uniform way of resolving relative URIs. Inspired by the mechanism in HTML, In the following example: the value of href attribute can be interpreted as the absolute URI the xml namespace prefix is hardwired by the Namespace specification with uri: xml:base has lexical scope (as namespace declarations) the URI used to access the document is used as default URI base Future XML parsers will support XML Base.

Introduction to XLink Transparency No. 4 An XInclude example A document containing: … where somewhere.xml contains:... is equivalent to:... is the official XInclude namespace the include element name in that namespace is an inclusion directive right after parsing and before other processing, an XInclude processor performs the inclusion (tree substitution) the original and the resulting document should be considered equivalent it is an error to have cyclic includes

Introduction to XLink Transparency No. 5 The HTML link model The HTML link model: a hyperlink to the aia2001 anchor of the course URI characteristic: binary, unidirectional link definition = link source. sourcedestination link

Introduction to XLink Transparency No. 6 Problems of HTML link model 1.Link syntax and semantics is not defined separately from rest of HTML: In HTML, links are recognized by element names (A, IMG,..) - we want a generic XML solution. - we want link to be defined at places other than A,IMG. The "semantics" of a link is completely defined in the higher-level specification - we want control of general semantic features, e.g. of link actuation. 2.HTML links are too simple: All Links are binary (one source and one destination) - we want links with multiple sources and destinations. The traversal rule is unidirectional. (dead link problem) - we want multi-directional links possible.

Introduction to XLink Transparency No. 7 Problems with HTML links (cont’d) 2. support outbound link(link definition is also the link source) only - We need inbound and third-party links("link databases"). Links are anonymous -we want human-readable labels. An anchor must be placed at every link destination (problem with read-only documents) : - we want to express relative locations (XPointer!). Only individual nodes can be linked to - we want links to whole tree fragments.

Introduction to XLink Transparency No. 8 The XLink linking model The world wide web is composed of a lot of resources. Each is identified (URN) or addressed (URL) by a string called its URI (reference). There are a lot of relationships existing among these resources, which we need to make explicit in order for applications to make use of them. Ex: family, course : Teacher, TAs, students, newsgroup, course web pages, … resource

Introduction to XLink Transparency No. 9 XML linking model resource Link U (the universe) = def the collection of all resources. a relation R (not restricted to binary or fixed arity relation) is any subset of U k>0 U k. A link asserts(or declares) the existence of a member tuple (r1,r2,…, rk) of a relation.

Introduction to XLink Transparency No. 10 XML linking model Resource which is a link or a child of a link is called the local resource of the link. other resources are remote resources. remote resource local resource remote resource remote resource Link arc

Introduction to XLink Transparency No. 11 XML linking model traversal: Using or following a link for any purpose. always binary, from one starting source to one ending resource of an arc. An arc identify a possible (or allowable) set of traversals. remote resource local resource remote resource remote resource Link arc

Introduction to XLink Transparency No. 12 Information associated with a link structural information: participating local/remote sources. traversal (behavior) information used arcs semantic information title : human readable information about the (meaning of the ) link role : an URI uniquely identifying the relation the link belongs to. Ex:

Introduction to XLink Transparency No. 13 information associated with a resource structural information: location (URI) of the resource (needed for remote source only) semantic information: title : human readable description about the meaning ? of the resource. Note: it is unclear from the spec that the title information should describe either the set the resource is a member of or the property the resource plays in the link. role: a RUI reference uniquely identifying the property the resource play in the link. ex: v.s. Auxiliary information: label: identifying a group the resource belong to.

Introduction to XLink Transparency No. 14 information associated with an arc structural information from : a label identifying all staring resources to: a label identifying all ending resources semantic information: title: human readable information about the meaning of the arc. arcrole: a URI reference identifying a resource which describe the intended property (meaning or relation) of the arc. ex: an arc from TA  students’ homeworks may have a arcrole value of behavior information: show : what the system should behave when the arc is traversed ? possibe values: new | replace | embed | none | other actuate: when should the arc be traversed ? possible values: onLoad | onRequest | none | other

Introduction to XLink Transparency No. 15 How Xlink describe links in an XML document Entities that need to be represented: link ( simple # / extended # ) : title #!, role !, resource ( local # / resource # )  title #!, role !, location !, label ! arc !  title #!, arcrole !, from!, to !, show !, actuate ! Notes: 1. # means represented by element 2. ! means represented by global attributes 3. Any element asserting existence of a link in XLink is called an [XLink] linking element. there are 2 linking elements 4. Any elements related to XLink is called a Xlink element. 5. There are 6 Xlink elements, two linking elements, two for resource, one for title and one for arc.

Introduction to XLink Transparency No. 16 How Xlink describe links in an XML document 1.Adopt the XML namespace approach instead of HTML’s approach. no elements invented simply for the need of Xlink. (cf. A and IMG in HTML) 2.Define a set of 10 global attributes under the Xlink namespace with URI: x:type : simple | extended | locator | resource |title | role each identify a different kind of xlink elements. x:href : a URI reference identifying a resource x:role, x:arcrole : URI reference x:title : strings (CDATA) x:show, x:actuate : x:from, x:to : a label defined in a resource x:label: NCName

Introduction to XLink Transparency No. 17 How Xlink describe links in an XML document 3. use the value of the global attribute x:type to identifying an xlink (related) element and its kind. ex: … Then : e1 is an extended-type link, and in general we call e2 an xxx -type element, where xxx is any possible value of x:type : simple | extended | locator | resource | title | role Note: 1. e1 and e2 can has its own attributes and contents. 2. Xlink behaves more like interface than class in java in the sense that it can be embeded on all existing elements.

Introduction to XLink Transparency No. 18 How Xlink related information is represented 4. entity type representation link simple link simple -type element extended link extended -type element resource local resource resource -type element remote resource locator -type element arc arc -type element title [link, resource, arc] x:title, title -type element role [link and resource]x:role arcrole x:arcrole starting resources x:from ending resources x:to arc target x:label

Introduction to XLink Transparency No. 19 Notes: 1.Each information item associated with an entity (i.e., link or resource or arc) is represented either as one of its attributes or as one of its child elements. 2.Title information can be represented by the attribute x:title and/or by multiple child title-type elements. Ex: <remoteResource1 x:type=“locator” x:href=“…” x:title=“AboutRemoteResource1”/> … English description about link1 Link1 的中文說明 This is not a title of link1 since it is not a title-type element … … Note:Neither title3 nor x:title of title4 is a title of link1.

Introduction to XLink Transparency No. 20 Required and optional attributes in an xlink element simpleextendedlocatorresourcetitlearc typeRRRRRR hrefOR roleOOOO arcroleOO titleOOOOO showOO actuateOO labelOO fromO toO R: required O: optional

Introduction to XLink Transparency No. 21 possible children and attributes of an Xlink Element xlink elementAllowable xlink children allowable xlink attributes simple --type, href?, role?, arcrole?, title?, show?, actuate? extended locator*, arc*, resource*, title* type, role?, title? locator title*type, href, role?, title?, label? arc title*type, arcrole?, title?, show?, actuate?, from?,to? resource --type, role?, title?, label? title --type Note: * : zero or more; ?: zero or one ; otherwise: exactly once.

Introduction to XLink Transparency No. 22 Basic XLink terminology Resource: any addressable unit of information or service [RFC2396]. (i.e., have an URI)  Examples: files, images, documents, programs, and query results. Link: Explicit relationship between two or more resources. Linking element: An XML element that asserts the existence and describes the characteristics of a link. A local resource comes from the linking element's own content or is the linking element itself. Locator: An identification of a remote resource that is participating in the link. - one linking element defines a set of traversable arcs between some resources. Out-of-line link: link with no local resource. Inline link: link with local resource.

Introduction to XLink Transparency No. 23 Example The XLink namespace : The use of XLink elements and attributes requires declaration of the XLink namesapce:...

Introduction to XLink Transparency No. 24 Example1: a simple link <my:crossReference xmlns:my=" xmlns:x=" x:type="simple" x:href="students.xml" x:role="studentlist" x:title="Student List" x:show="new“ x:actuate="onRequest"> Current List of Students Note: Simple link is Xlink’s analog of the A element of HTML. It serves at the same time as a binary link, a remote resource, a local resource (itself) and an outbound arc.

Introduction to XLink Transparency No. 25 Use Attribute value default to eliminate redundancy <!ATTLIST my:crossreference xmlns:my CDATA #FIXED “ xmlns:x CDATA #FIXED x:type CDATA #FIXED "simple" x:show CDATA "new“ x:actuate CDATA "onRequest“ > Simplfied instance: <my:crossReference x:href="students.xml" x:role="studentlist" x:title="Student List"> Current List of Students

Introduction to XLink Transparency No. 26 Examle2: an example of crossreference with non XLink attributes <my:crossReference xmlns:my=" my:lastEdited=" " xmlns:xlink=" xlink:type="simple" xlink:href="students.xml"> Current List of Students

Introduction to XLink Transparency No. 27 Example3: an extended-type element and its subelements The DTDs 1. 2.<!ATTLIST courseload 3. xmlns:xlink CDATA #FIXED 4. xlink:type (extended) #FIXED "extended" 5. xlink:role CDATA #IMPLIED 6. xlink:title CDATA #IMPLIED> 7. 8.<!ATTLIST tooltip 9. xlink:type (title) #FIXED "title" 10. xml:lang CDATA #IMPLIED> Notes: 1. 3 & 4 means courseload is an extended link by default and hence need not specify these attributes explicitly in document instances. 2. Similarly, tooltip is a title-type element.

Introduction to XLink Transparency No. 28 Example3: (the DTDs continued) xlink:type (locator) #FIXED "locator" 4. xlink:href CDATA #REQUIRED 5. xlink:role CDATA #IMPLIED 6. xlink:title CDATA #IMPLIED 7. xlink:label NMTOKEN #IMPLIED> xlink:type (locator) #FIXED "locator" 11. xlink:href CDATA #REQUIRED 12. xlink:role CDATA #FIXED " 13. xlink:title CDATA #IMPLIED 14. xlink:label NMTOKEN #IMPLIED> Note: Both person and course are remote resources.

Introduction to XLink Transparency No. 29 Example3: (the DTDs continued) xlink:type (resource) #FIXED "resource" 4. xlink:role CDATA #FIXED 5. " 6. xlink:title CDATA #IMPLIED 7. xlink:label NMTOKEN #IMPLIED> xlink:type (arc) #FIXED "arc" 11. xlink:arcrole CDATA #IMPLIED 12. xlink:title CDATA #IMPLIED 13. xlink:show (new |replace |embed |other |none) #IMPLIED 14. xlink:actuate (onLoad |onRequest |other |none) #IMPLIED 15. xlink:from NMTOKEN #IMPLIED 16. xlink:to NMTOKEN #IMPLIED>

Introduction to XLink Transparency No. 30 Examle3 : an instance courseload element Course Load for Pat Jones 3. <person xlink:href="students/patjones62.xml“ 4. xlink:label="student62“ 5. xlink:role=“ 6. xlink:title="Pat Jones" /> 7. <person xlink:href="profs/jaysmith7.xml“ 8. xlink:label="prof7“ 9. xlink:role=“ 10. xlink:title="Dr. Jay Smith" /> <course xlink:href="courses/cs101.xml" 13. xlink:label="CS-101" 14. xlink:title="Computer Science 101" />

Introduction to XLink Transparency No. 31 Examle3 : an instance courseload element 1. <go xlink:from="student62" xlink:to="PatJonesGPA" 2. xlink:show="new" xlink:actuate="onRequest" 3. xlink:title="Pat Jones's GPA" /> 4. <go xlink:from="CS-101“xlink:to="student62" 5. xlink:arcrole= 6.xlink:show="replace" xlink:actuate="onRequest" 7. xlink:title="Pat Jones, auditing the course" /> 8. <go xlink:from="student62“xlink:to="prof7" 9. xlink:arcrole= 10. xlink:show="replace" xlink:actuate="onRequest" 11. xlink:title="Dr. Jay Smith, advisor" /> 12.

Introduction to XLink Transparency No. 32 Example4: Sample resource -Type Element Declarations and Instance DTD 1. 2.<!ATTLIST gpa 3. xlink:type (resource) #FIXED "resource“ 4. xlink:role CDATA #FIXED xlink:title CDATA #IMPLIED 7. xlink:label NMTOKEN #IMPLIED> Instance

Introduction to XLink Transparency No. 33 Example5: Sample locator -Type Element Declarations and Instance DTDs 1. 2.<!ATTLIST person 3. xlink:type (locator) #FIXED "locator“ 4. xlink:href CDATA #REQUIRED 5. xlink:role CDATA #IMPLIED 6. xlink:title CDATA #IMPLIED 7. xlink:label NMTOKEN #IMPLIED> 8. 9.<!ATTLIST course 10. xlink:type (locator) #FIXED "locator“ 11. xlink:href CDATA #REQUIRED 12. xlink:role CDATA #FIXED 13. " 14. xlink:title CDATA #IMPLIED 15. xlink:label NMTOKEN #IMPLIED>

Introduction to XLink Transparency No. 34 Example5: Sample locator -Type Element Declarations and Instance Instances 1.<person 2. xlink:href="students/patjones62.xml“ 3. xlink:label="student62“ 4. xlink:role = 5. " 6. xlink:title="Pat Jones" /> 7.<person xlink:href="profs/jaysmith7.xml“ 8. xlink:label="prof7“ 9. xlink:role= 10. " xlink:title="Dr. Jay Smith" /> 11.<course xlink:href="courses/cs101.xml“ 12. xlink:label="CS-101" 13. xlink:title="Computer Science 101" />

Introduction to XLink Transparency No. 35 label, from and to attributes

Introduction to XLink Transparency No. 36 label, from and to attributes label attributes declared at locator or resources can be used to identify the starting (from) or ending(to) resource of an arc. Ex: <go xlink:type="arc" xlink:from="A" xlink:to="B" /> <go xlink:type="arc" xlink:from="C" xlink:to="B" /> Note: Both from and to are optional attributes of arc element. If omitted, it means all resources are starting (or ending) resources.

Introduction to XLink Transparency No. 37 Example6:... <go xlink:type="arc" xlink:from="parent“ xlink:to="child" />  included traversals: {p1,p2}  {c1,c2,c3}, i.e.,  p1  c1, p1  c2, p1  c3, p2  c1, p2  c2, and p2  c3:

Introduction to XLink Transparency No. 38 Examle6 (continued) from omitted => {p1, p2, c1,c2, c3}  {c1, c2, c3} from and to omitted => {p1,p2,c1,c2,c3}  {p1,p2,c1,c2,c3}

Introduction to XLink Transparency No. 39 Example 7: Sample arc -Type Element Declarations and Instance DTDs 1. 2.<!ATTLIST go 3. xlink:type (arc) #FIXED "arc" 4. xlink:arcrole CDATA #IMPLIED 5. xlink:title CDATA #IMPLIED 6. xlink:show 7. (new |replace |embed |other |none) #IMPLIED 8. xlink:actuate 9. (onLoad |onRequest |other |none) #IMPLIED 10. xlink:from NMTOKEN #IMPLIED 11. xlink:to NMTOKEN #IMPLIED>

Introduction to XLink Transparency No. 40 Example 7: Sample arc -Type Element Declarations and Instance Instances 1.<go xlink:from="student62“xlink:to="PatJonesGPA" 2. xlink:show="new“xlink:actuate="onRequest“ 3. xlink:title="Pat Jones's GPA" /> 4.<go xlink:from="CS-101“ xlink:to="student62" 5. xlink:show="replace" xlink:actuate="onRequest" xlink:title="Pat Jones, auditing the course" /> 6.xlink:arcrole=" tor" 7.<go xlink:from="student62“ xlink:to="prof7" 8. xlink:show="replace" xlink:actuate="onRequest" 9.xlink:arcrole=" sor" 10.xlink:title="Dr. Jay Smith, advisor" />

Introduction to XLink Transparency No. 41 Example 8: Sample title -Type Element Declarations and Instance the DTDs <!ATTLIST advisorname xlink:type (title) #FIXED "title" xml:lang CDATA #IMPLIED> A instance Dr. Jay Smith

Introduction to XLink Transparency No. 42 Linkbases Types of arcs: outbound arcs, inbound arcs, third-party arcs Examples of outbound arc: HTML A and IMG elements. Typically, a link contains only one kind of arc, and might be referred to as an inbound, outbound, or third-party link. Documents containing collections of inbound and third- party links are called link databases, or linkbases. Note: Linkbase behaves like index in database. outboundinboundthird-party starting resourcelocalremote ending resourceremotelocalremote

Introduction to XLink Transparency No. 43 Locating Linkbases (Special Arc Role) The problem: to traverse an arc, we need to locate the staring resource and the link. Not a problem for outbound arcs since the starting resource is either the linking element itself or a child of the linking element. But how could the XLink application find both pieces for inbound and third-party arcs ? Solution: Collect related inbound and third-party linking elements into many related linkbases. A document that need traverse may declare special linkbase arcs (whose arcrole is predefined by Xlink to be ) linking to potential linkbases of which the document or contents of it is a starting resource of an arc. When the document is loaded (or on request) the xlink application can traverse linkbase arcs and retrieve all potential links in advance.

Introduction to XLink Transparency No. 44 Example 9: Annotating a Specification The DTDs : an extended link that specializes in providing linkbase arcs: xlink:type (extended) #FIXED "extended"> xlink:type (locator) #FIXED "locator“ 7. xlink:href CDATA #REQUIRED 8. xlink:label NMTOKEN #IMPLIED> xlink:type (locator) #FIXED "locator" 12. xlink:href CDATA #REQUIRED 13. xlink:label NMTOKEN #IMPLIED>

Introduction to XLink Transparency No. 45 The DTDs (continued) xlink:type (arc) #FIXED "arc" 4. xlink:arcrole CDATA #FIXED 5. " 6. xlink:actuate (onLoad |onRequest |other |none) #IMPLIED 7. xlink:from NMTOKEN #IMPLIED 8. xlink:to NMTOKEN #IMPLIED> Note: for linkbase arc, the show attribute has no effect since its default behavior is, according to the spec, that the XLink application should extract links from the linkbase.

Introduction to XLink Transparency No. 46 Example 9: Annotating a Specification Usage 1: <startrsrc xlink:label="spec“ 3. xlink:href="spec.xml" /> 4. <linkbase xlink:label="linkbase“ 5. xlink:href="linkbase.xml" /> 6. <load xlink:from="spec" 7. xlink:to="linkbase" 8. actuate="onLoad" /> 9. Note:This link indicate that when spec.xml is loaded, linkbase.xml should automatically be loaded as well, possibly necessitating re- rendering of the entire specification document to reveal any regions within it that serve as starting resources in the links found in the linkbase.

Introduction to XLink Transparency No. 47 Usage 2: <startrsrc xlink:label="spec“ 3. xlink:href="spec.xml#string-range(//*, 4. 'Click here to reveal annotations.')" /> 5. 6.<load xlink:from="spec" xlink:to="linkbase" 7. actuate="onRequest" /> 8. Notes: 1.The remote resource is not spec.xml but a portion of it. 2.linkbase.xml would be loaded only on request (possibly a click on the remote resource: 'Click here to reveal annotations.'.

Introduction to XLink Transparency No. 48 spec.xml: this is a … word1.. normal text … word2 … linkbase.xml: <source x:href= x:label=“word”/> word1 means … <arc x:from=“word” x:to=“meaning” x:show=“…” x:actuate=“…” /> … basesloaded Relation among basesloaded, spec.xml and linkebase.xml load

Introduction to XLink Transparency No. 49 Simple Links ( simple -Type Element) A simple link is a link that associates exactly two resources, one local and one remote, with an arc going from the local to the remote. simple link is always an outbound link.

Introduction to XLink Transparency No. 50 Simple Links ( simple -Type Element) A simple link combines all the features above (except for the types and labels) into a single element. The features missing from simple links: Supplying arbitrary numbers of local and remote resources Specifying an arc from its remote resource to its local resource title of the earc role or title of the local resource role or title of the link Meaning of attributes in a simple link: x:href : URI ref of remote resource x:role, x:title : role and title of remote resource x:arctitle, x:show, x:actuate: … of the arc

Introduction to XLink Transparency No. 51 Example 10: simple link dtds: 1. 2.<!ATTLIST studentlink 3. xlink:type (simple) #FIXED "simple" 4. xlink:href CDATA #IMPLIED 5. xlink:role NMTOKEN #FIXED 6. “ 7. xlink:arcrole CDATA #IMPLIED 8. xlink:title CDATA #IMPLIED 9. xlink:show (new|replace|embed|other|none) #IMPLIED 10. xlink:actuate(onLoad|onRequest|other|none) #IMPLIED> instance: … Pat Jones is popular around the student union.

Introduction to XLink Transparency No. 52 Allowable value of the locator attribute (href) must be a URI reference as defined in [IETF RFC 2396], or must result in a URI reference after the escaping procedure described below is applied. The procedure is applied when passing the URI reference to a URI resolver. characters disallowed in URI references, even if they are allowed in XML; (section 2.4 IETF RFC 2396) all non-ASCII characters ( > 7F), control : 00-1F, 7F, space(20), delims = " " | "#" | "%" | unwise = "{" | "}" | "|" | "\" | "^" | "[" | "]" | "`" except for (#) and (%) and the square bracket characters re-allowed in [IETF RFC 2732].

Introduction to XLink Transparency No. 53 escape procedure Disallowed characters must be escaped as follows:must 1.Each disallowed character is converted to UTF-8 [IETF RFC 2279] as one or more bytes.[IETF RFC 2279] 2.Any bytes corresponding to a disallowed character are escaped with the URI escaping mechanism (that is, converted to % HH, where HH is the hexadecimal notation of the byte value). 3.The original character is replaced by the resulting character sequence.

Introduction to XLink Transparency No. 54 UTF-8 Definition UCS-4 range (hex.) UTF-8 octet sequence (binary) F 0xxxxxxx FF 110xxxxx 10xxxxxx FFFF 1110xxxx 10xxxxxx 10xxxxxx F FFFF 11110xxx 10xxxxxx 10xxxxxx 10xxxxxx FF FFFF xx 10xxxxxx 10xxxxx 10xxxxxx 10xxxxxx FFF FFFF x 10xxxxxx... 10xxxxxx