What is XML and Why Should You Care?

Download What is XML and Why Should You Care?

Post on 12-Jan-2017

218 views

Category:

Documents

4 download

Embed Size (px)

TRANSCRIPT

  • What is XML and Why Should YouCare?

    Deborah Aleyne Lapeyre Mulberry Technologies, Inc.17 West Jefferson St.Suite 207Rockville, MD 20850Phone: 301/315-9631Fax: 301/315-8285info@mulberrytech.comhttp://www.mulberrytech.com

    Version 1.0 (January 2006)2006 Mulberry Technologies, Inc.

  • What is XML and Why Should You Care?Administrivia......................................................................................................................1

    What is XML?

    What XML Means.............................................................................................................2

    XML Works Through Tags...............................................................................................2

    XML Documents...............................................................................................................3

    How XML works

    An XML Document is a Sequence of Elements.............................................................3

    XML Elements...............................................................................................................5

    Elements Contain Other Elements.................................................................................5

    Elements Identify Many Kinds of Content.....................................................................6

    Attributes Add Further Description...............................................................................6

    Technical Note: Editing XML Files...............................................................................7

    What XML Isnt.............................................................................................................7

    XML Is a Data Format

    XML Unites/Divides Two Very Different Data Visions...................................................8

    One XML Document Produces Many Results

    Employee Record Example.....................................................................................13

    Why Use XML?.............................................................................................................16

    Real World Examples of XML

    XML is a Metalanguage...........................................................................................16

    New XML Markup Languages.....................................................................................17

    XML Initiatives (Very Partial List)..............................................................................17

    Parts of an XML Application

    Logical Components of an XML Application.................................................................27

    Component 1: XML Document....................................................................................28

    Component 2: The Document Model...........................................................................28

    DTDs / Schemas Express Rules ..................................................................................29

    Why Use a DTD or Schema?.......................................................................................29

    To Share Information, Share the DTD / Schema .........................................................30

    Current XML Modeling/Constraint Languages...........................................................30

    Page i

  • What is XML and Why Should You Care?

    Component 3: Formatting (and Behavior).................................................................31

    Remember What XML Looks Like Without Formatting.............................................31

    What We Would Like to See (Print or Screen)............................................................33

    XML Design Feature....................................................................................................33

    Display Specifications Give Instructions.....................................................................34

    Component 4: XML Transformation

    XSLT for XML............................................................................................................36

    Why This Is Exciting....................................................................................................36

    Component 5: XML Repository...................................................................................37

    Content Management Using an XML Repository........................................................37

    XML in Non-XML Databases......................................................................................38

    Lots of XML is Managed in File Systems....................................................................38

    Conclusion

    The Big News: XML DOES NOT DO ANYTHING!.....................................................39

    You (and Your Software) Can Do a Lot with XML........................................................39

    The Good News: You Can Do XML and Benefit...........................................................40

    Where to Get More Information

    The Source for XML and Related Information...............................................................40

    General XML Information on the Web...........................................................................41

    Books on XML Concepts (Not So Technical)................................................................41

    XML Books We Recommend (More Technical)............................................................41

    Other Information Sources..............................................................................................42

    Colophon............................................................................................................................43

    Page ii

  • What is XML and Why Should You Care?

    slide 1

    AdministriviaC Questions are always in order

    C Why this talk

    C Anything else?

    slide 2

    Where We Are Not Going in This TalkC Specific XML vocabularies/languages (UbXML, IFX, DocBook, etc.)

    C XML for Ecommerce, eBusiness, B2B, B2C

    C JDF (Job Definition Format)

    C PPML (Personalized Print Markup Language)

    C Content syndication (PRISM, et al.)

    C Interchange and packaging of XML (SOAP, XML-RPC, etc.)

    C How to solve your particular business problems

    C Specific XML tools

    slide 3

    Where We Are Going Today:XML as ContentXML as the text and the data (content)

    C What is XML

    C How XML works

    C Why XML is important

    C Typical components of an XML application

    Page 1

  • What is XML and Why Should You Care?

    What is XML?

    slide 4

    The Word XML is Used to Mean:C An open standard (well ... a W3C Recommendation) that provides

    C a data format

    C a data modeling language

    C The use of XML-formatted data in an application (like a browser)

    C A metalanguage for creating markup languages

    C A set of associated recommendations and specifications(style, transformation, query, link, APIs, etc.)

    slide 5

    XML Works Through TagsA tag is a word surrounded by pointy brackets411

    C Start tag marks start of some data

    C End tag marks end of some data

    Page 2

  • What is XML and Why Should You Care?

    slide 6

    XML DocumentsC In XML jargon, your data (no matter what form)

    is called a document

    C A document is a coherent, ordered collection of information

    C journal article

    C invoice

    C reference book

    C chapter in a reference book

    C sales catalog

    C drug monograph(Sometimes called document instance or just instance)

    How XML works

    slide 7

    An XML Document is a Sequence of ElementsDocuments

    C are made up of Elements

    C consisting of Markup (tags)

    C ... and Element ContentEconomics for Everyone

    New York

    This chapter focuses on the role of optical fibersas a communication channel in lightwave systems. We usegeometrical optics to explain the guiding mechanism andintroduce the related basic concepts.

    Page 3

  • What is XML and Why Should You Care?

    slide 8

    Sample XML Document: A Chapter

    Mysterious DoingsIt was a dark and stormy night ...

    slide 9

    Sample XML Document: A Recipe

    3 eggs 1/4 cup milk

    Break the eggs into a bowl.Add the milk and mix with a fork.

    Pour the mixture into a frying panover medium-low head. Tilt the pan to coverthe bottom.

    When the eggs have set to your liking,turn onto a plate.

    Enjoy!

    Page 4

  • What is XML and Why Should You Care?

    slide 10

    XML ElementsAn element is an identifiable, named component of a document(paragraph, authors name, article title, unit price, bulleted list)

    C Can have content (data, other elements)

    C Can be a pointer to information (hypertext link, table reference)

    C Must be contiguous (one start and one end; no holes in the middle)

    slide 11

    Elements Contain Other Elements

    (this nesting makes a Tree)

    Page 5

  • What is XML and Why Should You Care?

    slide 12

    Elements Identify Many Kinds of Content(No limit to the number of possible elements)

    Structure What part of the document? (article, title, paragraph, list, footnote)

    Metadata About the document (issue number, first page, article title, DOI, journal abbreviation)

    Named content What is this text/data?(genus-species, surname, glossary, gene, question and answer)

    Navigation/Links Value-added for searching/linking (bibliographic citations; links toother articles, index terms, related material; figure references)

    Presentation How text should look (typographic emphasis, superscript, forced line breaks)

    slide 13

    Attributes Add Further DescriptionC Live inside start tags

    C Say something about the data

    C Add information to our knowledge of the element

    C Are made up of

    C a name

    C an equal sign

    C a quoted value

    Hoboken Highlights

    301/315-9631

    Page 6

  • What is XML and Why Should You Care?

    slide 14

    Technical Note: Editing XML FilesXML Files

    C Are plain text underneath

    C use any text editor or any word processor that can handle plain text

    C built on Unicode (represents all major scripts of the world)

    C Are human readable

    C Are machine processable

    slide 15

    XML Isnt Any of the FollowingC A programming language

    (does not replace C++, Java, Perl, Python, ...)

    C A user interface

    C A presentation format

    C A formatting or processing system

    C A standard set of tags

    C A recommended set of tags

    Page 7

  • What is XML and Why Should You Care?

    XML Is a Data Format

    slide 16

    XML Unites/Divides Two Very Different Data VisionsC Data Folks

    C All the world is a database

    C I know how big everything is and its data type

    C Things come in this order/arrangement

    C Thats the whole point of information!

    C Text Folks

    C Databases are limited

    C I have free-flowing content

    C If you have to ask how long a paragraph is or how many times itmay repeat, you dont understand

    C I need named things that float somewhere inside other things (like aPart Number or a Persons Name somewhere inside a paragraph)

    C Thats the whole point of information!

    Page 8

  • What is XML and Why Should You Care?

    One XML Document Produces Many Results

    slide 17

    Text Book Example

    Compounds

    A compound is asubstance containing at least two elements combinedchemically in definite proportions by mass. A compoundcan be chemically broken up into its constituent elementsor simpler compounds. There are two types of compounds,ionic and molecular.

    Testbank GDW

    67954

    An ion(eye-on) is an atom or group ofatoms that is positively or negatively charged. Anegatively charged ion is an anion(pronounced an-eye-on) while apositively charged ion is a cation(pronounced cat-eye-on). Anionic compound is a compound thatis held together by the attractive forces betweenpositively and negatively charged ions.

    Testbank GDW67ionic compounds9cations2526anions

    ...

    Page 9

  • What is XML and Why Should You Care?

    slide 18

    We Still Print Textbooks

    Page 10

  • What is XML and Why Should You Care?

    slide 19

    Textbooks May Have Instructors Manuals

    Page 11

  • What is XML and Why Should You Care?

    slide 20

    View This in a Web Browser/eBookConvert into HTML or HTML-like format

    slide 21

    Automatically Generated Section of Same Textbook

    Page 12

  • What is XML and Why Should You Care?

    slide 22

    Same Source, Different ResultsC On the Web, eBook, and CD versions

    C tie the pronunciations to audio files

    C link keywords to definitions in the dictionary

    C Make large print, voice synthesis, and Braille

    C Collect statistics on which test questions are used, how often, andwhere

    slide 23

    Employee Record Example

    SasparillaUsdin

    Deputy in Charge of ChewablesMulberry TechnologiesRockvilleMD20850sassy

    3670

    Page 13

  • What is XML and Why Should You Care?

    slide 24

    View This in a BrowserConvert into HTML (today), or in an XML browser (tomorrow)

    slide 25

    A Familiar Print Application

    Page 14

  • What is XML and Why Should You Care?

    slide 26

    Same Data, Different Application

    C XML elements rolled into form letter

    C Something (perhaps employee-id) linked to photo

    slide 27

    Same Source: Load a Database

    Key: 00095AUSEMPNO: 009001:USDIN002:Sasparilla008:36014:70020:Deputy in Charge of Chewables

    Page 15

  • What is XML and Why Should You Care?

    slide 28

    Why Use XML?

    The ultimate purpose

    C Encode (mark up) data only once

    C Produce many products from that markup

    C Enable semantically complex searching

    C Reuse data (in whole or part) many times

    C Interchange data freely

    C Enable machine-to-machine communication

    C Let whole communities agree on data content

    C Let data live a long time

    Real World Examples of XML

    slide 29

    XML is a Metalanguage

    Used to define custom tag sets

    C Tag sets get called languages

    C Languages can be built for

    C problem domains (journal publishing, textbooks, computer manuals)

    C applications (like eBusiness, content-management)

    C vertical markets (airplanes, tourist industry, financial)

    C information collections (reference works, laws and statutes,biographies, dictionaries)

    C Different markup languages for different information types

    Page 16

  • What is XML and Why Should You Care?

    slide 30

    New XML Markup LanguagesC Not really languages but a set of agreements

    C Agreements may include:

    C sets of tags

    C problem and process models

    C document or message models (DTDs and schemas)

    C vocabularies and dictionaries

    C business rules

    C Discipline-oriented, like CML (chemistry) and MathML (mathematics)

    C Process-oriented, like SVG (Scalable Vector Graphics)

    C Industry oriented, like Airlines/aircraft and Semiconductors

    slide 31

    XML Initiatives (Very Partial List)

    (with thanks to OASIS and Robin Cover)

    - Text Encoding Initiative (TEI) - Markup Language for Complex Documents (Bergen MLCD Project) - Manuscript Access through Standards for Electronic Records (MASTER) - XCES: Corpus Encoding Standard for XML - Global Document Annotation Initiative (GDA) - Electronic Metadata for Endangered Languages Data (EMELD) - Electronic Text Corpus of Sumerian Literature (ETCSL) - XML System for Textual and Archaeological Research (XSTAR) - Metadata Encoding and Transmission Standard (METS) - Image Metadata Aggregation for Enhanced Searching (IMAGES) - Encoded Archival Description (EAD) - Encoded Archival Context Initiative (EAC) - Linking and Exploring Authority Files (LEAF) - Channel Definition Format, CDF (Based on XML) - RDF Rich Site Summary (RSS) - Open Content Syndicatio...

Recommended

View more >