1 / 15

LIS 549 U/TU: Intro to Content Management Fall 2003 * Bob Boiko * MSIM Associate Chair

LIS 549 U/TU: Intro to Content Management Fall 2003 * Bob Boiko * MSIM Associate Chair. XML Basics. You invent a set of names for the stuff you want to manage and put <> around them <MyInfo> <Title> <Author> <Body> <Para> You figure out which ones go inside witch others <MyInfo> <Title>

jordana
Download Presentation

LIS 549 U/TU: Intro to Content Management Fall 2003 * Bob Boiko * MSIM Associate Chair

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. LIS 549 U/TU: Intro to Content ManagementFall 2003 * Bob Boiko * MSIM Associate Chair XML Basics

  2. You invent a set of names for the stuff you want to manage and put <> around them <MyInfo> <Title> <Author> <Body> <Para> You figure out which ones go inside witch others <MyInfo> <Title> <Author> <body> <Para> </Body </MyInfo> You add additional information to the names <MyInfo Date=“”> <Title> <Author eMail = “”> <Body Revision=“”> <Para Style=“”> </Body> </MyInfo> You fill in the blanks <MyInfo Date=“2004-03-03”> <Title>My Title</Title> <Author eMail = “A@B.Org”>Bob</Author> <Body Revision=“2”> <Para Style=“ListHead”>Some Head</Para> <Para Style=“List”>Point 1</Para> <Para Style=“List”>Point 2</Para> </Body> A First Look at XML LIS 549 U/TU: Intro to Content Management * Fall 2004 * Bob Boiko * MSIM Associate Chair

  3. Data- Transfer Resource identification and discovery (Dublin core, RDF, etc.) Content modeling The Three Faces of XML

  4. Why XML is Cool • Has an X in its name! • Is as strong as it’s “also ran” parent SGML • More flexible than it’s superficial cousin HTML • It’s accepted LIS 549 U/TU: Intro to Content Management * Fall 2004 * Bob Boiko * MSIM Associate Chair

  5. What is XML Good For? You can treat and XML file like: • A word processing file • Type it, edit it, display it • An HTML file • Tag it, display it with a style sheet • A database • Open it. Search it, add, update, delete LIS 549 U/TU: Intro to Content Management * Fall 2004 * Bob Boiko * MSIM Associate Chair

  6. HTML XML WP Markup ASCII vs. Binary ASCII ASCII Binary Format vs. Structure Format Struct Format and Structure Extendable vs. Non Extendable Non Ext Ext Non Ext Range of coverage Low High Medium XML vs. Other Markup Languages  LIS 549 U/TU: Intro to Content Management * Fall 2004 * Bob Boiko * MSIM Associate Chair

  7. How do you Write XML? LIS 549 U/TU: Intro to Content Management * Fall 2004 * Bob Boiko * MSIM Associate Chair

  8. Three Views of XML Tag View Schematic View Browser View LIS 549 U/TU: Intro to Content Management * Fall 2004 * Bob Boiko * MSIM Associate Chair

  9. XML Instance Documents No Tagging Dodge DurangoSport Utility432000 miles$18000Yes YesRadio/Cassette/CDYesYesFull/PartialVery clean Minimal Tagging Name: Dodge DurangoType: Sport UtilityDoors: 4Miles: 32000Price: 18000Power_Locks: YesPower_Windows: YesStereo: Radio/Cassette/CDAir-Conditioning: YesAutomatic: YesFWD: Full/PartialNote: Very clean XML Tagging <VEHICLES>   <VEHICLE inventory_number="1">      <MAKE>Dodge</MAKE>      <MODEL model_code="USA23">Durango</MODEL>      <YEAR>1998</YEAR>      <STYLE>Sport Utility</STYLE>      <DOORS>4</DOORS>      <PRICE>18000</PRICE>      <MILES>32000</MILES>      <OPTIONS>         <POWER_LOCKS>Yes</POWER_LOCKS>         <POWER_WINDOWS>Yes</POWER_WINDOWS>         <STEREO>Radio/Cassette/CD</STEREO>         <AIR_CONDITIONING>Yes</AIR-_CONDITIONING>         <AUTOMATIC>Yes</AUTOMATIC>         <FWD>Full/Partial</FWD>      </OPTIONS>      <NOTE>Very clean</NOTE>   </VEHICLE></VEHICLES> LIS 549 U/TU: Intro to Content Management * Fall 2004 * Bob Boiko * MSIM Associate Chair

  10. The Gross Anatomy of a Tag LIS 549 U/TU: Intro to Content Management * Fall 2004 * Bob Boiko * MSIM Associate Chair

  11. The Micro Anatomy of a Tag • Shorthand tag names stand for real words. • Every tag "inside" is contained by that tag. • Parameters tell you what the tag has. White Space is for Your Eyes Only <TABLE><TR><TD COLSPAN="2">Here is the picture<IMG SRC="ngo.jpg" BORDER="1"> </TD> </TR><TABLE> LIS 549 U/TU: Intro to Content Management * Fall 2004 * Bob Boiko * MSIM Associate Chair

  12. The Element • The thing in brackets • <CapitalizationMatters/> • <NoSpaces/> • <StartWithALetter/> • <BeDescriptive/> • <Nest> • <Nest> • <Nest/> • </Nest> • </Nest> LIS 549 U/TU: Intro to Content Management * Fall 2004 * Bob Boiko * MSIM Associate Chair

  13. The Attribute • Really just another form of an element • Always quote them • A variety of data types • Can be linked to a list of values • Cannot nest LIS 549 U/TU: Intro to Content Management * Fall 2004 * Bob Boiko * MSIM Associate Chair

  14. How to Approach an Instance • Understand it is an instance of a model • Model of what? • From what perspective? • What are the names • What are the biggies? • Which ones to ignore for now • How is capitalization handled? • Strip it to know it • Get rid of the bulk. • Lay out the major structure LIS 549 U/TU: Intro to Content Management * Fall 2004 * Bob Boiko * MSIM Associate Chair

  15. Finding Stuff in an XML File - Xpath • Directories are hierarchies • Each file has a path • XML files are hierarchies • Each element has an Xpath • /Subject • //Subject • //Subject[@id=‘s0’] • //*[@id=‘s0’] • //*[@id=‘s0’]/title LIS 549 U/TU: Intro to Content Management * Fall 2004 * Bob Boiko * MSIM Associate Chair

More Related