Скачать презентацию XML a very brief introduction and other related Скачать презентацию XML a very brief introduction and other related

  • Количество слайдов: 66

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

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

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

XML: What is it? e. Xtensible Markup Language XML: What is it? e. Xtensible Markup Language

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

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

e. Xtensible? n n “capable of being extended” extend = “to increase the scope, e. Xtensible? n n “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

What else is it? n n it is a family of technologies (more later) What else is it? n n it is a family of technologies (more later) it is a “simplified” version or subset of SGML (more later) n n 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

What else is it? n n -- cont. it is modular -- one can What else is it? n n -- 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) perhaps most importantly, “it is the basis for RDF and the Semantic Web” (more later)

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

but, there is some disagreement. . . n “XML is not a a markup but, there is some disagreement. . . n “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) n “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. )

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

Definitions: W 3 C n n n World Wide Web Consortium founded 1994 by Definitions: W 3 C n n n 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 W 3 C standards www. w 3 c. org

Definitions: ontology / ontologies n n n Webster's: “a branch of metaphysics concerned with Definitions: ontology / ontologies n n n Webster's: “a branch of metaphysics concerned with the nature and relations of being” W 3 C: “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. ”

Ontologies n -- cont. . or, more precisely: “Artificial-intelligence and Web researchers have co-opted Ontologies n -- 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. )

Namespaces n What are they? n n n means of linking a tag to Namespaces n What are they? n n n means of linking a tag to a metadata standard and/or DTD spaces within which an ontology is defined Why are they needed? n 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 n Example: Both HTML and Dublin Core have an element called n format = <namespace : element> n for example: <dc: title> </p> </div> <div style="width: auto;" class="description columns twelve"><p><img class="imgdescription" title="Definitions: RDF n n n Resource Description Framework W 3 C: “Resource Description Framework" src="http://present5.com/presentation/7c290ad614636fa9fe8cef8fc23f41b5/image-18.jpg" alt="Definitions: RDF n n n Resource Description Framework W 3 C: “Resource Description Framework" /> Definitions: RDF n n n Resource Description Framework W 3 C: “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. “ </p> </div> <div style="width: auto;" class="description columns twelve"><p><img class="imgdescription" title="the RDF data model n 3 types of objects: n n n resource --" src="http://present5.com/presentation/7c290ad614636fa9fe8cef8fc23f41b5/image-19.jpg" alt="the RDF data model n 3 types of objects: n n n resource --" /> the RDF data model n 3 types of objects: n n n 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” (W 3 C) -- also identifiable by a URI statement -- combination of a resource, a property, and a value for the property </p> </div> <div style="width: auto;" class="description columns twelve"><p><img class="imgdescription" title="RDF: statement example n “John Smith is the creator of www. xyz. edu” subject" src="http://present5.com/presentation/7c290ad614636fa9fe8cef8fc23f41b5/image-20.jpg" alt="RDF: statement example n “John Smith is the creator of www. xyz. edu” subject" /> RDF: statement example n “John Smith is the creator of www. xyz. edu” subject (resource) www. xyz. edu predicate (property) object (value/literal) creator John Smith </p> </div> <div style="width: auto;" class="description columns twelve"><p><img class="imgdescription" title="RDF -- cont. n So. . . how can this framework be implemented? ." src="http://present5.com/presentation/7c290ad614636fa9fe8cef8fc23f41b5/image-21.jpg" alt="RDF -- cont. n So. . . how can this framework be implemented? ." /> RDF -- cont. n 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. ” </p> </div> <div style="width: auto;" class="description columns twelve"><p><img class="imgdescription" title="an RDF “message” (“xmlns” = name space declaration) <? xml version="1. 0"? > <rdf:" src="http://present5.com/presentation/7c290ad614636fa9fe8cef8fc23f41b5/image-22.jpg" alt="an RDF “message” (“xmlns” = name space declaration) <? xml version="1. 0"? > <rdf:" /> an RDF “message” (“xmlns” = name space declaration) <? xml version="1. 0"? > <rdf: RDF xmlns: rdf="http: //www. w 3. org/1999/02/22 -rdfsyntax-ns#" xmlns: s="http: //description. org/schema/"> <rdf: Description about="http: //www. lib. xyz. edu/"> <s: Creator>John Smith</s: Creator> </rdf: Description> </rdf: RDF> </p> </div> <div style="width: auto;" class="description columns twelve"><p><img class="imgdescription" title="Definitions: URI vs. URL n n URI: “Uniform Resource Identifier. The generic set of" src="http://present5.com/presentation/7c290ad614636fa9fe8cef8fc23f41b5/image-23.jpg" alt="Definitions: URI vs. URL n n URI: “Uniform Resource Identifier. The generic set of" /> Definitions: URI vs. URL n n URI: “Uniform Resource Identifier. The generic set of all names/addresses that are short strings that refer to resources. ” (W 3 C) URL: “Uniform Resource Locator. An informal term (no longer used in technical specifications) associated with popular URI schemes: http, ftp, mailto, etc. ” (W 3 C) </p> </div> <div style="width: auto;" class="description columns twelve"><p><img class="imgdescription" title="Definitions: Semantic Web n n SEMANTICS: “the study of meanings” -- “the meaning or" src="http://present5.com/presentation/7c290ad614636fa9fe8cef8fc23f41b5/image-24.jpg" alt="Definitions: Semantic Web n n SEMANTICS: “the study of meanings” -- “the meaning or" /> Definitions: Semantic Web n n 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: n n “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. ” </p> </div> <div style="width: auto;" class="description columns twelve"><p><img class="imgdescription" title="Semantic web -- cont. More quotes: n n n “For the semantic web to" src="http://present5.com/presentation/7c290ad614636fa9fe8cef8fc23f41b5/image-25.jpg" alt="Semantic web -- cont. More quotes: n n n “For the semantic web to" /> Semantic web -- cont. More quotes: n n n “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: e. Xtensible Markup Language (XML) and the Resource Description Framework (RDF). ” </p> </div> <div style="width: auto;" class="description columns twelve"><p><img class="imgdescription" title="How is it related to other stuff? standards and tools " src="http://present5.com/presentation/7c290ad614636fa9fe8cef8fc23f41b5/image-26.jpg" alt="How is it related to other stuff? standards and tools " /> How is it related to other stuff? standards and tools </p> </div> <div style="width: auto;" class="description columns twelve"><p><img class="imgdescription" title="XML: “well-formed” n n vs. “valid” well-formed: follows the rules for XML internal structure" src="http://present5.com/presentation/7c290ad614636fa9fe8cef8fc23f41b5/image-27.jpg" alt="XML: “well-formed” n n vs. “valid” well-formed: follows the rules for XML internal structure" /> XML: “well-formed” n n 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 n n Data Type Definition (DTD), or an XML Schema </p> </div> <div style="width: auto;" class="description columns twelve"><p><img class="imgdescription" title="3 basic kinds of XML docs 1) 2) well-formed, but unvalidated well-formed and valid," src="http://present5.com/presentation/7c290ad614636fa9fe8cef8fc23f41b5/image-28.jpg" alt="3 basic kinds of XML docs 1) 2) well-formed, but unvalidated well-formed and valid," /> 3 basic kinds of XML docs 1) 2) well-formed, but unvalidated 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 </p> </div> <div style="width: auto;" class="description columns twelve"><p><img class="imgdescription" title="Requirements for being “well-formed” 1) 2) 3) 4) 5) 6) 7) 8) a declaration" src="http://present5.com/presentation/7c290ad614636fa9fe8cef8fc23f41b5/image-29.jpg" alt="Requirements for being “well-formed” 1) 2) 3) 4) 5) 6) 7) 8) a declaration" /> Requirements for being “well-formed” 1) 2) 3) 4) 5) 6) 7) 8) a declaration at the top of a document signaling what it is: <? XML version=“ 1. 0”? > if conforming to a DTD, a declaration of that DTD: <!DOCTYPE TEI SYSTEM “teixlite. dtd”> a root element: <document> or <letter> or <shoe> or. . . every start tag must have an end tag or, if empty, have a special format: <a></a> or <a/> tags must nest cleanly: <a><b></a> attribute values must be in quotation marks tags are case-sensitive and must match some characters must be rendered in a special way </p> </div> <div style="width: auto;" class="description columns twelve"><p><img class="imgdescription" title="Valid? Data Type Definition (DTD) What is a DTD? It is a set of" src="http://present5.com/presentation/7c290ad614636fa9fe8cef8fc23f41b5/image-30.jpg" alt="Valid? Data Type Definition (DTD) What is a DTD? It is a set of" /> Valid? Data Type Definition (DTD) What is a DTD? It is a set of rules that define: 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 1) </p> </div> <div style="width: auto;" class="description columns twelve"><p><img class="imgdescription" title="Valid? XML Schema n n n “an XML language for describing and containing the" src="http://present5.com/presentation/7c290ad614636fa9fe8cef8fc23f41b5/image-31.jpg" alt="Valid? XML Schema n n n “an XML language for describing and containing the" /> Valid? XML Schema n n n “an XML language for describing and containing the content of XML documents” (W 3 C) 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 </p> </div> <div style="width: auto;" class="description columns twelve"><p><img class="imgdescription" title="XSL & XSLT n e. Xtensible Stylesheet Language n n “XSL is a language" src="http://present5.com/presentation/7c290ad614636fa9fe8cef8fc23f41b5/image-32.jpg" alt="XSL & XSLT n e. Xtensible Stylesheet Language n n “XSL is a language" /> XSL & XSLT n e. Xtensible Stylesheet Language n n “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” (W 3 C) n includes XSL FO: XSL Formatting Objects e. Xtensible Stylesheet Language for Transformations n “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. ” (W 3 C) </p> </div> <div style="width: auto;" class="description columns twelve"><p><img class="imgdescription" title="Stylesheets - why do we need them? n n XML is not a fixed" src="http://present5.com/presentation/7c290ad614636fa9fe8cef8fc23f41b5/image-33.jpg" alt="Stylesheets - why do we need them? n n XML is not a fixed" /> Stylesheets - why do we need them? n n 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 </p> </div> <div style="width: auto;" class="description columns twelve"><p><img class="imgdescription" title="CSS n n Cascading Style Sheets a simple styling language defining and attaching styles" src="http://present5.com/presentation/7c290ad614636fa9fe8cef8fc23f41b5/image-34.jpg" alt="CSS n n Cascading Style Sheets a simple styling language defining and attaching styles" /> CSS n n 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 </p> </div> <div style="width: auto;" class="description columns twelve"><p><img class="imgdescription" title="How do XSL and CSS compare? n n XSL uses XML notation; CSS uses" src="http://present5.com/presentation/7c290ad614636fa9fe8cef8fc23f41b5/image-35.jpg" alt="How do XSL and CSS compare? n n XSL uses XML notation; CSS uses" /> How do XSL and CSS compare? n n 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 </p> </div> <div style="width: auto;" class="description columns twelve"><p><img class="imgdescription" title="CSS & XSL (cont. ) CSS Can be used with HTML? Can be used" src="http://present5.com/presentation/7c290ad614636fa9fe8cef8fc23f41b5/image-36.jpg" alt="CSS & XSL (cont. ) CSS Can be used with HTML? Can be used" /> CSS & XSL (cont. ) CSS Can be used with HTML? Can be used with XML? yes XSL yes no yes Transformation language? no yes Syntax CSS XML -- from W 3 C’s “What are style sheets” @ http: //www. w 3. org/Style) </p> </div> <div style="width: auto;" class="description columns twelve"><p><img class="imgdescription" title="Xlink & Xpointer n XML replacements for the HTML tags: n n n Xlink" src="http://present5.com/presentation/7c290ad614636fa9fe8cef8fc23f41b5/image-37.jpg" alt="Xlink & Xpointer n XML replacements for the HTML tags: n n n Xlink" /> Xlink & Xpointer n XML replacements for the HTML tags: n n n Xlink replaces <a href. . . > Xpointer replace <a name. . in XML, ANY element can have a linking capability in XML, can link to any point in a document with a tag in XML, a link imports rather than transfers </p> </div> <div style="width: auto;" class="description columns twelve"><p><img class="imgdescription" title="DTD or Schema XML doc XSLT transformer software HTML doc CSS " src="http://present5.com/presentation/7c290ad614636fa9fe8cef8fc23f41b5/image-38.jpg" alt="DTD or Schema XML doc XSLT transformer software HTML doc CSS " /> DTD or Schema XML doc XSLT transformer software HTML doc CSS </p> </div> <div style="width: auto;" class="description columns twelve"><p><img class="imgdescription" title="SGML n n Standard Generalized Markup Language an ISO standard for defining the structural" src="http://present5.com/presentation/7c290ad614636fa9fe8cef8fc23f41b5/image-39.jpg" alt="SGML n n Standard Generalized Markup Language an ISO standard for defining the structural" /> SGML n n 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 cutdown 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” @ http: //www. ucc. ie/xml/#sgml) valid, well-formed XML is valid SGML, but not necessarily vice versa </p> </div> <div style="width: auto;" class="description columns twelve"><p><img class="imgdescription" title="XHTML n n e. Xtensible Hypertext Markup Language the successor to HTML, almost the" src="http://present5.com/presentation/7c290ad614636fa9fe8cef8fc23f41b5/image-40.jpg" alt="XHTML n n e. Xtensible Hypertext Markup Language the successor to HTML, almost the" /> XHTML n n e. Xtensible 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) </p> </div> <div style="width: auto;" class="description columns twelve"><p><img class="imgdescription" title="Why is XML potentially important to libraries? " src="http://present5.com/presentation/7c290ad614636fa9fe8cef8fc23f41b5/image-41.jpg" alt="Why is XML potentially important to libraries? " /> Why is XML potentially important to libraries? </p> </div> <div style="width: auto;" class="description columns twelve"><p><img class="imgdescription" title="Library-related uses n n Cross-database searching -- integration of multiple data definitions Digital library" src="http://present5.com/presentation/7c290ad614636fa9fe8cef8fc23f41b5/image-42.jpg" alt="Library-related uses n n Cross-database searching -- integration of multiple data definitions Digital library" /> Library-related uses n n Cross-database searching -- integration of multiple data definitions Digital library metadata (EAD, VRA, etc. ) Textual markup for presentation Public Interface design (e. g. , OPAC) n -- send XML (formatted by XSL), not HTML </p> </div> <div style="width: auto;" class="description columns twelve"><p><img class="imgdescription" title="Library-related uses n -- cont. exchanging data & metadata n between libraries n n" src="http://present5.com/presentation/7c290ad614636fa9fe8cef8fc23f41b5/image-43.jpg" alt="Library-related uses n -- cont. exchanging data & metadata n between libraries n n" /> Library-related uses n -- cont. exchanging data & metadata n between libraries n n n an alternative to MARC ? an alternative to Z 39. 50 ? NCIP (National Circulation Interchange Protocol) between libraries and vendors between library system & other campus systems (e. g. , Voyager and People. Soft) Open Archives Initiative (OAI) metadata harvesting </p> </div> <div style="width: auto;" class="description columns twelve"><p><img class="imgdescription" title="Example: Endeavor ENCompass n Federated Searching n Multi-protocol searching n n Z 39. 50" src="http://present5.com/presentation/7c290ad614636fa9fe8cef8fc23f41b5/image-44.jpg" alt="Example: Endeavor ENCompass n Federated Searching n Multi-protocol searching n n Z 39. 50" /> Example: Endeavor ENCompass n Federated Searching n Multi-protocol searching n n Z 39. 50 HTTP XML Gateways Search and Navigation n Web based, using XSL technology for ultimate customization of displays </p> </div> <div style="width: auto;" class="description columns twelve"><p><img class="imgdescription" title="Collection of XML docs query results query XML search software Perl / CGI control" src="http://present5.com/presentation/7c290ad614636fa9fe8cef8fc23f41b5/image-45.jpg" alt="Collection of XML docs query results query XML search software Perl / CGI control" /> Collection of XML docs query results query XML search software Perl / CGI control program results validation form DTD or Schema Example of query XSL doc HTML search form HTML response html search system XSLT transformer software Browser CSS an XML-based happy user results as XML doc </p> </div> <div style="width: auto;" class="description columns twelve"><p><img class="imgdescription" title="Data vs. Metadata n n n Like HTML, XML can contain both data and" src="http://present5.com/presentation/7c290ad614636fa9fe8cef8fc23f41b5/image-46.jpg" alt="Data vs. Metadata n n n Like HTML, XML can contain both data and" /> Data vs. Metadata n n n Like HTML, XML can contain both data and metadata can be explicit (i. e. , between <metadata></metadata> 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 </p> </div> <div style="width: auto;" class="description columns twelve"><p><img class="imgdescription" title="Some Common metadata schemes n n n n DC: Dublin Core VRA Core: Visual" src="http://present5.com/presentation/7c290ad614636fa9fe8cef8fc23f41b5/image-47.jpg" alt="Some Common metadata schemes n n n n DC: Dublin Core VRA Core: Visual" /> Some Common metadata schemes n n n n 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 </p> </div> <div style="width: auto;" class="description columns twelve"><p><img class="imgdescription" title="Example: DTD <!-- This is a sample DTD for a record/CD collection --> <!ELEMENT" src="http://present5.com/presentation/7c290ad614636fa9fe8cef8fc23f41b5/image-48.jpg" alt="Example: DTD <!-- This is a sample DTD for a record/CD collection --> <!ELEMENT" /> Example: DTD <!-- This is a sample DTD for a record/CD collection --> <!ELEMENT MYMUSIC (album+)> <!ELEMENT album (title, ((artist+, genre+) | (genre+, artist+)) year_produced, year_purchased? , label? , song_list? ) > <ATTLIST album id ID #REQUIRED ref IDREF #IMPLIED condition (n. p. | bad | worn | good | excellent) “n. p. ” > <ELEMENT title (#PCDATA)> <ELEMENT artist (#PCDATA)> <ELEMENT genre (#PCDATA)> <ATTLIST genre+ type (folk | rock | country | blues | jazz | classical ) #REQUIRED>. . . </p> </div> <div style="width: auto;" class="description columns twelve"><p><img class="imgdescription" title="Example: XML <MYMUSIC> <album id="Led. Zeppelin-1969 -1" condition="worn"> <title>Led Zeppelin II Led Zeppelin Led Zeppelin II Led Zeppelin Example: XML Led Zeppelin II Led Zeppelin Rock 1969 1988 Whole Lotta Love The Lemon Song. . . Ramble On Moby Dick Bring It On Home

Example: XSL (part 1) My Music

Example: XSL (part 2) . . .

Example: the resulting HTML display Led Zeppelin II Led Zeppelin 1969 1. Whole Lotta Example: the resulting HTML display 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

Dublin Core examples: n DTD declaration: <!DOCTYPE rdf: RDF PUBLIC Dublin Core examples: n DTD declaration: n RDF/namespace declaration:

MARC & XML n MARC: MAchine-Readable Cataloging n n n a structure / communications MARC & XML n MARC: MAchine-Readable Cataloging n n n 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

245 Title Statement 1 st indicator 0 2 nd indicator No added entry 1 245 Title Statement 1 st indicator 0 2 nd indicator No added entry 1 (NR) Added entry Subfield Codes $a Title (NR) $b Remainder of title (NR) 0 -9 number of nonfiling characters The way it looks in the USMARC manual

LC’s MARC 245 definition in XML DTD (edited slightly for clarity) <!ELEMENT mrcb 245 LC’s MARC 245 definition in XML DTD (edited slightly for clarity) CDATA #FIXED (i 1 -0 | i 1 -1) #REQUIRED (i 2 -0 | i 2 -1 | i 2 -2 | i 2 -3 | i 2 -4 | i 2 -5 | i 2 -6 | i 2 -7 | i 2 -8 | i 2 -9) #REQUIRED

MARC 245 subfields $a & $b definitions in XML <!ELEMENT mrcb 245 -a <!ATTLIST MARC 245 subfields $a & $b definitions in XML mrcb 245 -a name CDATA #FIXED "Title" obsolete CDATA #FIXED "no" repeatable CDATA #FIXED "no" > mrcb 245 -b name #FIXED "Remainder of title" obsolete CDATA #FIXED "no" repeatable > CDATA #FIXED "no"

245 10 $a Moby Dick; $b or, The Whale. becomes <mrcb 245 i 1=“ 245 10 $a Moby Dick; $b or, The Whale. becomes Moby Dick; or, The Whale.

or, an alternative: an XML schema from OAI

" src="http://present5.com/presentation/7c290ad614636fa9fe8cef8fc23f41b5/image-60.jpg" alt="generic id. Tag and i. Type indicator definitions " /> generic id. Tag and i. Type indicator definitions

and … generic schema for a subfield:

and … generic definition of subfield. Type

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

Brief bibliography: books n n n Chuck Musciano & Bill Kennedy. HTML & XHTML: Brief bibliography: books n n n 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 Du. Charme. XML: the Annotated Specification. Prentice-Hall, 1999.

Brief bibliography: web n n n www. w 3 c. org [everything you ever Brief bibliography: web n n n www. w 3 c. org [everything you ever wanted to know] www. xml. com [O’Reilly site] www. xml. org xml. coverpages. org xml. apache. org www. sciam. com/2001/0501 issue/0501 berners -lee. html [“The Semantic Web” -- Scientific American article by Tim Berners-Lee, James Hendler & Ora Lassila] n www. iath. virginia. edu/ead/xml. html XML] [EAD and

The End Questions? The End Questions?