Presentation is loading. Please wait.

Presentation is loading. Please wait.

XML: a very brief introduction (and other related acronyms) John Miller, KU, February 28, 2002.

Similar presentations

Presentation on theme: "XML: a very brief introduction (and other related acronyms) John Miller, KU, February 28, 2002."— Presentation transcript:

1 XML: a very brief introduction (and other related acronyms) John Miller, KU, February 28, 2002

2 General outline: What is XML? How is it related to other stuff? the context other standards and tools Why is it potentially important to libraries? Examples Q & A


4 It’s an acronym soup... XML W3C RDF XSL SGML TEI XSLT HTML EAD DTD XHTML MARC XML Schema DOM VRA CSS PICS DC some of the ingredients

5 XML: What is it? e X tensible M arkup L anguage

6 Language? conveys meaning -- provides a meaning for others to understand your intent has rules has a syntax but... NOT a programming language

7 Markup? conveys meaning by “marking up” other text and data with tags for example John Miller Lawrence 13 generically: value

8 eXtensible? “capable of being extended” extend = “to increase the scope, meaning, or application of; broaden” not tied to a single model or data definition handles both text and data

9 What else is it? it is a family of technologies (more later) it is a “simplified” version or subset of SGML (more later) it is a means of separating the description of document structure from document appearance combined with style sheets, it can be use to create formatted documents in any style you want

10 What else is it? -- cont. it is modular -- one can define a new document by combining and reusing other existing formats it is an open standard, not tied to any one company or software it can be read both by humans and by programs (unlike a MARC record, for example)MARC perhaps most importantly, “it is the basis for RDF and the Semantic Web” (more later)

11 What else is it? -- cont. To repeat... it is a single system that can be used as the basis both for storing, searching, formatting, & displaying TEXT storing, searching, formatting, & displaying DATA

12 but, there is some disagreement... “ XML is not a a markup language -- it is a toolkit for creating, shaping, and using markup languages (Erik T. Ray, Learning XML, O’Reilly, 2001) “XML is a markup language, and only a markup language. It’s important to remember this fact. The XML hype has become so extreme that some people expect XML to do everything up, and including, washing the family dog.” (Elliotte Rusty Harold & W. Scott Means, XML in a Nutshell, O’Reilly, 2001.)

13 How is it related to other stuff? Or,... what the h*@# are RDF and the Semantic Web? [hint: it all depends on your ontology] The Context

14 Definitions: W3C World Wide Web Consortium founded 1994 by Tim Berners-Lee (with MIT & CERN); now has 506 institutional members; TBL still leads “... develops interoperable technologies (specifications, guidelines, software, and tools) to lead the Web to its full potential as a forum for information, commerce, communication, and collective understanding.” XML, XSL, CSS, HTML, and many others are W3C standards

15 Definitions: ontology / ontologies Webster's: “a branch of metaphysics concerned with the nature and relations of being” W3C: “Formal descriptions of terms in a certain area (shopping or manufacturing, for example) are called ontologies and are a necessary part of the semantic web.” TBL et al.: [Ontologies are ] “collections of statements written in a language such as RDF that define the relations between concepts and specify logical rules for reasoning about them. Computers will "understand" the meaning of semantic data on a Web page by following links to specified ontologies.”

16 Ontologies -- cont.... or, more precisely: “Artificial-intelligence and Web researchers have co-opted the term for their own jargon, and for them an ontology is a document or file that formally defines the relations among terms. The most typical kind of ontology for the Web has a taxonomy and a set of inference rules.” (TBL et al.)

17 Namespaces What are they? means of linking a tag to a metadata standard and/or DTD spaces within which an ontology is defined Why are they needed? XML is modular: can combine portions of different XML documents that conform to different DTDs into a single document, i.e., which use different ontologies Example: Both HTML and Dublin Core have an element called format = for example:

18 Definitions: RDF Resource Description Framework W3C: “Resource Description Framework (RDF) is a foundation for processing metadata; it provides interoperability between applications that exchange machine-understandable information on the Web. RDF emphasizes facilities to enable automated processing of Web resources.” and... “The broad goal of RDF is to define a mechanism for describing resources that makes no assumptions about a particular application domain, nor defines (a priori) the semantics of any application domain.“

19 the RDF data model 3 types of objects: resource -- web site; web page, individual tagged element on a page, etc. -- always named by a URI property -- “a specific aspect, characteristic, attribute, or relation used to describe a resource” (W3C) -- also identifiable by a URI statement -- combination of a resource, a property, and a value for the property

20 RDF: statement example “John Smith is the creator of” subject (resource) predicate (property)creator object (value/literal)John Smith

21 RDF -- cont. So... how can this framework be implemented?... how can automated communication occur across the web? XML ! Another definition of RDF: Scientific American: “A scheme for defining information on the Web. RDF provides the technology for expressing the meaning of terms and concepts in a form that computers can readily process. RDF can use XML for its syntax and URIs to specify entities, concepts, properties and relations.”

22 John Smith an RDF “message” (“xmlns” = name space declaration)

23 Definitions: URI vs. URL URI: “Uniform Resource Identifier. The generic set of all names/addresses that are short strings that refer to resources.” (W3C) URL: “Uniform Resource Locator. An informal term (no longer used in technical specifications) associated with popular URI schemes: http, ftp, mailto, etc.” (W3C)

24 Definitions: Semantic Web SEMANTICS: “the study of meanings” -- “the meaning or relationship of meaning of a sign or set of signs” (Webster’s) “The Semantic Web” by Tim Berners-Lee, James Hendler, & Ora Lassila. (see bibl. at end) Some quotes from the article: “The Semantic Web is not a separate Web but an extension of the current one, in which information is given well-defined meaning, better enabling computers and people to work in cooperation. “ “The Semantic Web will bring structure to the meaningful content of Web pages, creating an environment where software agents roaming from page to page can readily carry out sophisticated tasks for users.”

25 Semantic web -- cont. More quotes: “For the semantic web to function, computers must have access to structured collections of information and sets of inference rules that they can use to conduct automated reasoning.” “Human language thrives when using the same term to mean somewhat different things, but automation does not.” “Two important technologies for developing the Semantic Web are already in place: eXtensible Markup Language (XML) and the Resource Description Framework (RDF).”

26 How is it related to other stuff? standards and tools

27 XML: “well-formed” vs. “valid” well-formed: follows the rules for XML internal structure and consistency valid: follows a standard definition of the structure and content of a document, either a Data Type Definition (DTD), or an XML Schema

28 3 basic kinds of XML docs 1) well-formed, but unvalidated 2) well-formed and valid, based upon a Data Type Definition (DTD) -- either internal or external 3) well-formed and “valid”, based upon specifications in an XML Schema

29 Requirements for being “well-formed” 1) a declaration at the top of a document signaling what it is: 2) if conforming to a DTD, a declaration of that DTD: 3) a root element: or or or... 4) every start tag must have an end tag or, if empty, have a special format: or 5) tags must nest cleanly: 6) attribute values must be in quotation marks 7) tags are case-sensitive and must match 8) some characters must be rendered in a special way

30 Valid? Data Type Definition (DTD) What is a DTD? It is a set of rules that define: 1) what elements may appears in a document 2) what elements must appear in a document 3) what elements may be repeated 4) the hierarchical relationship among elements 5) what attributes are allowed for each element 6) other structural requirements Generally, a separate document, but definitions also can be inside an XML document

31 Valid? XML Schema “an XML language for describing and containing the content of XML documents” (W3C) a schema document is itself an XML document an alternative to a DTD -- both can exist (as alternatives) for a particular format, but only one is needed

32 XSL & XSLT eXtensible Stylesheet Language “XSL is a language for expressing style sheets. An XSL style sheet is, like with CSS, a file that describes how to display an XML document of a given type ” (W3C)CSS includes XSL FO: XSL Formatting Objects eXtensible Stylesheet Language for Transformations “Originally intended to perform complex styling operations, like the generation of tables of contents and indexes, it is now used as a general purpose XML processing language. XSLT is thus widely used for purposes other than XSL, like generating HTML web pages from XML data.” (W3C)

33 Stylesheets - why do we need them? XML is not a fixed tag set -- a generic processor/browser has no idea what the tags “mean” XML markup generally does not include any formatting instruction want to store XML data in one format and present it in a different form want to present same XML data in many different ways

34 CSS Cascading Style Sheets a simple styling language defining and attaching styles to HTML (or XML) elements. Each element type and each of its occurrences within a document can be given a unique style defines margins, positioning, fonts, color, size, box and list properties, etc. not NEEDED to render XML-based HTML, but useful

35 How do XSL and CSS compare? XSL uses XML notation; CSS uses its own CSS formatting following the document “object tree”; XSL formatting can radically move objects around both can be used to directly format XML documents XSL transforms while it formats

36 CSS & XSL (cont.) CSS XSL Can be used with HTML? yes no Can be used with XML? yes yes Transformation language? no yes Syntax CSS XML -- from W3C’s “What are style sheets” @

37 Xlink & Xpointer XML replacements for the HTML tags: Xlink replaces Xpointer replace { "@context": "", "@type": "ImageObject", "contentUrl": "", "name": "Xlink & Xpointer XML replacements for the HTML tags: Xlink replaces Xpointer replace

38 XML doc XSL doc XSLT transformer software HTML doc DTD or Schema CSS

39 SGML Standard Generalized Markup Language an ISO standard for defining the structural descriptions of electronic documents “SGML is very large, powerful, and complex. It has been in heavy industrial and commercial use for over a decade, and there is a significant body of expertise and software to go with it. XML is a lightweight cut- down version of SGML which keeps enough of its functionality to make it useful but removes all the optional features which make SGML too complex to program for in a Web environment.” ( from Peter Flynn’s “XML FAQ” @ ) valid, well-formed XML is valid SGML, but not necessarily vice versa

40 XHTML eXtensible Hypertext Markup Language the successor to HTML, almost the same as HTML 4.01 (their DTDs are identical except for some differences between SGML and XML) HTML defined according to XML rules -- the HTML spec is a specific XML DTD/schema “The emergence of XHTML is just another chapter in the often tumultuous history of HTML and the World Wide Web, where confusion for authors is the norm, not the exception.” (Chuck Musciano & Bill Kennedy, HTML & XHTML: the Definitive Guide, O’Reilly, 2000)

41 Why is XML potentially important to libraries?

42 Library-related uses Cross-database searching -- integration of multiple data definitions Digital library metadata (EAD, VRA, etc.) Textual markup for presentation Public Interface design (e.g., OPAC) -- send XML (formatted by XSL), not HTML

43 Library-related uses -- cont. exchanging data & metadata between libraries an alternative to MARC ? an alternative to Z39.50 ? NCIP (National Circulation Interchange Protocol) between libraries and vendors between library system & other campus systems (e.g., Voyager and PeopleSoft) Open Archives Initiative (OAI) metadata harvesting

44 Example: Endeavor ENCompass Federated Searching Multi-protocol searching Z39.50 HTTP XML Gateways Search and Navigation Web based, using XSL technology for ultimate customization of displays

45 XSL doc XSLT transformer software HTML search form DTD or Schema CSS Collection of XML docs Perl / CGI control program XML search software HTML response query results as XML doc Browser form query Example of an XML-based search system validation happy user html

46 Data vs. Metadata Like HTML, XML can contain both data and metadata metadata can be explicit (i.e., between tags) metadata can be individual elements metadata also can appear as attributes but... at least with text, what’s the difference once everything is tagged according to content & structure? -- one person’s metadata is another’s data

47 Some Common metadata schemes DC: Dublin Core VRA Core: Visual Resources Association EAD: Encoded Archival Description TEI: Text Encoding Initiative (also TEI Lite) MARC: MAchine-Readable Cataloging CSDGM: Content Standard for Digital Geospatial Metadata FGDC: Federal Geographic Data Committee metadata

48 Example: DTD ...

49 Example: XML Led Zeppelin II Led Zeppelin Rock 1969 1988 Atlantic Records Whole Lotta Love The Lemon Song... Ramble On Moby Dick Bring It On Home

50 Example: XSL (part 1) My Music

51 Example: XSL (part 2)...

52 Led Zeppelin II Led Zeppelin 1969 1. Whole Lotta Love 2. What Is and What Should Never Be 3. The Lemon Song 4. Thank You 5. Heartbreaker 6. Living Loving Maid (She's Just a Woman) 7. Ramble On 8. Moby Dick 9. Bring It On Home Example: the resulting HTML display

53 Dublin Core examples: DTD declaration: RDF/namespace declaration:

54 MARC & XML MARC: MAchine-Readable Cataloging a structure / communications format, not a set of cataloging rules like XML, elements indicate structure/meaning rather than presentation -- can be extensible unlike XML, is fixed set of tags (i.e., 3-digit numbers), designed principally to accommodate cataloging elements -- allows precise coding and facilitates precise searching and retrieval well-tested and implemented LC and others are working on creating a MARC XML DTD

55 245Title Statement (NR) 1st indicator 0No added entry 1Added entry 2nd indicator 0-9 number of non- filing characters Subfield Codes $aTitle (NR) $bRemainder of title (NR) The way it looks in the USMARC manual

56 LC’s MARC 245 definition in XML DTD (edited slightly for clarity)

57 MARC 245 subfields $a & $b definitions in XML

58 Moby Dick; or, The Whale. 24510$a Moby Dick; $b or, The Whale. becomes

59 or, an alternative: an XML schema from OAI

60 generic idTag and iType indicator definitions

61 and … generic schema for a subfield:

62 and … generic definition of subfieldType

63 Melville, Herman, 1819-1891 Moby Dick; or, The Whale OAI XML to match the OAI Schema

64 Brief bibliography: books Chuck Musciano & Bill Kennedy. HTML & XHTML: the Definitive Guide. O’Reilly, 2000. Elliotte Rusty Harold & W. Scott Means. XML in a Nutshell. O’Reilly, 2001. Eric T. Ray. Learning XML. O’Reilly, 2001. Doug Tidwell. XSLT. O’Reilly, 2001. Eric A. Meyer. Cascading Style Sheets: the Definitive Guide. O’Reilly, 2000. Bob DuCharme. XML: the Annotated Specification. Prentice-Hall, 1999.

65 Brief bibliography: web [everything you ever wanted to know] [O’Reilly site] s-lee.html [“The Semantic Web” -- Scientific American article by Tim Berners-Lee, James Hendler & Ora Lassila] [EAD and XML]

66 The End Questions?

Download ppt "XML: a very brief introduction (and other related acronyms) John Miller, KU, February 28, 2002."

Similar presentations

Ads by Google