DOC PREVIEW
UT Dallas SE 5V81 - XML and Namespaces

This preview shows page 1-2-3-4-5-34-35-36-37-68-69-70-71-72 out of 72 pages.

Save
View full document
View full document
Premium Document
Do you want full access? Go Premium and unlock all 72 pages.
Access to all documents
Download any document
Ad free experience
View full document
Premium Document
Do you want full access? Go Premium and unlock all 72 pages.
Access to all documents
Download any document
Ad free experience
View full document
Premium Document
Do you want full access? Go Premium and unlock all 72 pages.
Access to all documents
Download any document
Ad free experience
View full document
Premium Document
Do you want full access? Go Premium and unlock all 72 pages.
Access to all documents
Download any document
Ad free experience
View full document
Premium Document
Do you want full access? Go Premium and unlock all 72 pages.
Access to all documents
Download any document
Ad free experience
View full document
Premium Document
Do you want full access? Go Premium and unlock all 72 pages.
Access to all documents
Download any document
Ad free experience
View full document
Premium Document
Do you want full access? Go Premium and unlock all 72 pages.
Access to all documents
Download any document
Ad free experience
View full document
Premium Document
Do you want full access? Go Premium and unlock all 72 pages.
Access to all documents
Download any document
Ad free experience
View full document
Premium Document
Do you want full access? Go Premium and unlock all 72 pages.
Access to all documents
Download any document
Ad free experience
View full document
Premium Document
Do you want full access? Go Premium and unlock all 72 pages.
Access to all documents
Download any document
Ad free experience
View full document
Premium Document
Do you want full access? Go Premium and unlock all 72 pages.
Access to all documents
Download any document
Ad free experience
View full document
Premium Document
Do you want full access? Go Premium and unlock all 72 pages.
Access to all documents
Download any document
Ad free experience
View full document
Premium Document
Do you want full access? Go Premium and unlock all 72 pages.
Access to all documents
Download any document
Ad free experience
View full document
Premium Document
Do you want full access? Go Premium and unlock all 72 pages.
Access to all documents
Download any document
Ad free experience
Premium Document
Do you want full access? Go Premium and unlock all 72 pages.
Access to all documents
Download any document
Ad free experience

Unformatted text preview:

PowerPoint PresentationSlide 2Slide 3Slide 4Slide 5Slide 6Slide 7Slide 8Slide 9Slide 10Slide 11Slide 12Slide 13Slide 14Slide 15Slide 16Slide 17Slide 18Slide 19Slide 20Slide 21Slide 22Slide 23Slide 24Slide 25Slide 26Slide 27Slide 28Slide 29Slide 30Slide 31Slide 32Slide 33Slide 34Slide 35Slide 36Slide 37Slide 38Slide 39Slide 40Slide 41Slide 42Slide 43Slide 44Slide 45Slide 46Slide 47Slide 48Slide 49Slide 50Slide 51Slide 52Slide 53Slide 54Slide 55Slide 56Slide 57Slide 58Slide 59Slide 60Slide 61Slide 62Slide 63Slide 64Slide 65Slide 66Slide 67Slide 68Slide 69Slide 70Slide 71Slide 72Chapter 2 A Semantic Web Primer1Chapter 2Structured Web Documents in XMLGrigoris AntoniouFrank van HarmelenChapter 1 A Semantic Web Primer2The Semantic Web Layer TowerChapter 2 A Semantic Web Primer3An HTML Example<h2>Nonmonotonic Reasoning: Context-Dependent Reasoning</h2><i>by <b>V. Marek</b> and <b>M. Truszczynski</b></i><br>Springer 1993<br>ISBN 0387976892Chapter 2 A Semantic Web Primer4The Same Example in XML <book><title>Nonmonotonic Reasoning: Context-Dependent Reasoning</title><author>V. Marek</author><author>M. Truszczynski</author><publisher>Springer</publisher><year>1993</year><ISBN>0387976892</ISBN></book>Chapter 2 A Semantic Web Primer5HTML versus XML: SimilaritiesBoth use tags (e.g. <h2> and </year>) Tags may be nested (tags within tags) Human users can read and interpret both HTML and XML representations quite easily … But how about machines?Chapter 2 A Semantic Web Primer6Problems with Automated Interpretation of HTML DocumentsAn intelligent agent trying to retrieve the namesof the authors of the book Authors’ names could appear immediately after the titleor immediately after the word byAre there two authors?Or just one, called “V. Marek and M. Truszczynski”?Chapter 2 A Semantic Web Primer7HTML vs XML: Structural InformationHTML documents do not contain structural information: pieces of the document and their relationships. XML more easily accessible to machines because –Every piece of information is described. –Relations are also defined through the nesting structure. –E.g., the <author> tags appear within the <book> tags, so they describe properties of the particular book.Chapter 2 A Semantic Web Primer8HTML vs XML: Structural Information (2)A machine processing the XML document would be able to deduce that –the author element refers to the enclosing book element–rather than by proximity considerationsXML allows the definition of constraints on values–E.g. a year must be a number of four digitsChapter 2 A Semantic Web Primer9HTML vs XML: FormattingThe HTML representation provides more than the XML representation: –The formatting of the document is also described Τhe main use of an HTML document is to display information: it must define formattingXML: separation of content from display–same information can be displayed in different waysChapter 2 A Semantic Web Primer10HTML vs XML: Another ExampleIn HTML<h2>Relationship force-mass</h2><i> F = M × a </i>In XML<equation><meaning>Relationship force-mass</meaning><leftside> F </leftside><rightside> M × a </rightside></equation>Chapter 2 A Semantic Web Primer11HTML vs XML: Different Use of TagsIn both HTML docs same tagsIn XML completely differentHTML tags define display: color, lists …XML tags not fixed: user definable tagsXML meta markup language: language for defining markup languagesChapter 2 A Semantic Web Primer12XML VocabulariesWeb applications must agree on common vocabularies to communicate and collaborateCommunities and business sectors are defining their specialized vocabularies–mathematics (MathML)–bioinformatics (BSML)–human resources (HRML) –…Chapter 2 A Semantic Web Primer13Lecture Outline1. Introduction2. Detailed Description of XML3. Structuringa) DTDsb) XML Schema4. Namespaces5. Accessing, querying XML documents: XPath6. Transformations: XSLTChapter 2 A Semantic Web Primer14The XML LanguageAn XML document consists of a prologa number of elementsan optional epilog (not discussed)Chapter 2 A Semantic Web Primer15Prolog of an XML DocumentThe prolog consists of an XML declaration and an optional reference to external structuring documents<?xml version="1.0" encoding="UTF-16"?><!DOCTYPE book SYSTEM "book.dtd">Chapter 2 A Semantic Web Primer16XML ElementsThe “things” the XML document talks about–E.g. books, authors, publishersAn element consists of:–an opening tag–the content–a closing tag<lecturer>David Billington</lecturer>Chapter 2 A Semantic Web Primer17XML Elements (2)Tag names can be chosen almost freely.The first character must be a letter, an underscore, or a colonNo name may begin with the string “xml” in any combination of cases –E.g. “Xml”, “xML”Chapter 2 A Semantic Web Primer18Content of XML ElementsContent may be text, or other elements, or nothing <lecturer><name>David Billington</name><phone> +61 − 7 − 3875 507 </phone></lecturer>If there is no content, then the element is called empty; it is abbreviated as follows:<lecturer/> for <lecturer></lecturer>Chapter 2 A Semantic Web Primer19XML AttributesAn empty element is not necessarily meaningless–It may have some properties in terms of attributesAn attribute is a name-value pair inside the opening tag of an element<lecturer name="David Billington" phone="+61 − 7 − 3875 507"/>Chapter 2 A Semantic Web Primer20XML Attributes: An Example<order orderNo="23456" customer="John Smith" date="October 15, 2002"><item itemNo="a528" quantity="1"/><item itemNo="c817" quantity="3"/></order>Chapter 2 A Semantic Web Primer21The Same Example without Attributes<order><orderNo>23456</orderNo><customer>John Smith</customer><date>October 15, 2002</date><item><itemNo>a528</itemNo><quantity>1</quantity></item><item><itemNo>c817</itemNo><quantity>3</quantity></item></order>Chapter 2 A Semantic Web Primer22XML Elements vs AttributesAttributes can be replaced by elementsWhen to use elements and when attributes is a matter of tasteBut attributes cannot be nestedChapter 2 A Semantic Web Primer23Further Components of XML DocsComments–A piece of text that is to be ignored by parser–<!-- This is a comment --> Processing Instructions (PIs)–Define procedural attachments–<?stylesheet type="text/css" href="mystyle.css"?>Chapter 2 A Semantic Web Primer24Well-Formed XML DocumentsSyntactically correct


View Full Document

UT Dallas SE 5V81 - XML and Namespaces

Download XML and Namespaces
Our administrator received your request to download this document. We will send you the file to your email shortly.
Loading Unlocking...
Login

Join to view XML and Namespaces and access 3M+ class-specific study document.

or
We will never post anything without your permission.
Don't have an account?
Sign Up

Join to view XML and Namespaces 2 2 and access 3M+ class-specific study document.

or

By creating an account you agree to our Privacy Policy and Terms Of Use

Already a member?