1 / 13

Introducing XML

Introducing XML. Maria Esteva DLSD General Libraries May 2004. XML. Rules to build a mark-up language Open standard Unicode Preserves the purity of the content It is human readable Content and metadata Facilitates storing, exchanging,managing,preserving data. XML basic components.

kyrie
Download Presentation

Introducing XML

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. Introducing XML Maria Esteva DLSD General Libraries May 2004

  2. XML • Rules to build a mark-up language • Open standard • Unicode • Preserves the purity of the content • It is human readable • Content and metadata • Facilitates storing, exchanging,managing,preserving data

  3. XML basic components • Prolog <?xml version=“1.0”?> • Elements <note><message>the message</message></note> • Attributes <note type=“post-it” id=“21.2” n=“ 2” place=“upper left”>

  4. XML syntax • Boundaries <note> </note> • Roles <name> </name> • Positions <title> </title> <p> </p> • Nesting <note> <salutation>Hello<name>Mark,</name></salutation> <message><p>I will see you tomorrow</p></message> <farewell>Bye and <emph>Good luck to you! <emph></farewell> <signature><name>Maria</name></signature> </note> • Relationships <xlinks> outside/inside the document <xpointers> inside the hierarchy of the document

  5. XML rules • An element containing text or other elements must have start and end tags • An empty element’s tag must have a / before the end bracket <pb n=“100”/> • Nested elements may not overlap <note><message>this is the message</message> </note> • All attribute values must be in quotes <title type=“sub”>An Introduction</title>

  6. XML tools • Editors and parsers • Cooktop FREE • Xmetal • Latest Microsoft Office • Web browsers • Internet Explorer • Mozilla • Opera • Style-sheets

  7. Let’s try and mark-up! • Consider the structure of your text • Choose element names that make sense • Think about what you would like to have indexed for that piece

  8. Something simple <?xml version="1.0"?> <Dialogue> <speaker> <name>Jo Anne:</name> </speaker> <line>I told you many times that I don’t want to move to <state>Arizona!</state> </line> <speaker> <Gendermale>Joseph:</Gendermale> </speaker> <line>But my dear, <emph>we will make a new life there…</emph> </line> <speaker>Jo Anne:</speaker> <line> <desperate>The weather in Phoenix is <emph>so</emph> dry, the humidity is always below <percentage>20%</percentage> </desperate> </l> </Dialogue>

  9. Why DTDs and schemas? Define rules to produce similarly structured documents • DTD: Defines structure elements and attributes of xml documents • Schema: Successor of the DTD,defines structure, content, and semantics of xml documents

  10. XML et al.. • Prolog <?xml version=“1.0”?> • Namespaces <DC xmlns:dc=http://purl.org/dc/elements/1.1/> • Notations <!NOTATION JPEG PUBLIC 'ISO DIS 10918//NOTATION JPEG Graphics Format//EN'> • Entities <!ENTITY author-b-003-f SYSTEM “author-b-003-f.jpg" NDATA JPG> <!ENTITY author “Jonas Smith”> <body><p> &author decided to write using the point of view of a child. While &author was not convinced of the ……</p></body>

  11. Some examples • TEI • EAD • BUILDING your own DTDs / results • METS

  12. DTDs and schemas at DLSD • TEI Text Encoding Initiative • Header • Content • MODSMetadata Object Description Schema • DCDublin Core • EADEncoding Archival Description • MIXMetadata for Images in XML Schema • METSMetadata Encoding and Transmission Standard

  13. XML the end Bibliography Ray, E. (2001).Learning XML. O’ Reilly Acknowledgments Jennifer Lee Loretta Acevedo Aaron Choate Uri Kolodney

More Related