1. Trang chủ
  2. » Công Nghệ Thông Tin

the xml standard slide

85 256 0

Đang tải... (xem toàn văn)

Tài liệu hạn chế xem trước, để xem đầy đủ mời bạn chọn Tải xuống

THÔNG TIN TÀI LIỆU

Cấu trúc

  • The XML Standard

  • Overview of our XML Standards

  • So what is XML (all about)?

  • What’s Wrong with HTML?

  • ...What’s Wrong with HTML...

  • ... And Some Repercussions

  • XML is Based on Markup

  • Elements and their Content

  • Element Attributes

  • XML = Labeled Ordered Trees

  • In Search of the Lost Structure & Semantics

  • Adding Structure and Semantics

  • XML DTDs as Extended CFGs

  • Document Type Definitions (DTDs)

  • Element Declarations

  • Element Content Declarations

  • Attributes

  • Attribute Types

  • Uses of XML Entities

  • Types of Entities

  • Internal Text Entities

  • Unparsed (& "Binary") Entities

  • From Docs to Data: XML Schema

  • Sample Data for Introduction to XML Schema

  • The Simple “Russian Doll” Approach to XML Schema

  • The Catalog Approach to XML Schema: Stand-Alone Declarations & References

  • Catalog Approach Cont’d

  • Named Types

  • Groups: Named containers of sets of Elements or Attributes

  • Compositors: Sequence, Choice, All

  • Compositors (cont’d)

  • Derivation of Simple Types: Unions and Lists

  • Constraints: Uniqueness

  • Namespaces

  • Including Unknown Elements

  • Presenting XML: XSLT

  • XSLT Overview

  • XSLT Processing Model

  • Slide 40

  • Template Rule: Example

  • Match/Select Patterns

  • Creating the Result Tree...

  • Example of Turning XML into HTML

  • HTML Document in an XSL Template

  • Extracting the Member Name

  • Extracting a Value from an XML Document, Navigating the XML Document

  • Slide 48

  • Extract the FavoriteColor and use it as the bgcolor

  • Note

  • Extract the Home Phone Number

  • Slide 52

  • Creating the Result Tree: Repetition

  • Creating the Result Tree: Sorting

  • More on XSL

  • XQuery: Querying XML Sources

  • Path Expressions

  • More Path Expressions

  • Element Construction

  • Bibliography Example Data Set

  • Reviews Example Data Set

  • For-Let-Where-Return (FLWR)

  • Think (tuples of) variable bindings

  • Slide 64

  • Tuples

  • Boolean Expressions in WHERE

  • Joins

  • Relax Order Conditions

  • Nested queries

  • Conditionals

  • Existential and Universal Quantification

  • Functions

  • Applicability of XML Query Languages (Xquery)

  • XQuery on files, DOM objects, event streams, messages

  • Typical Scenario: XML Messaging

  • Summary of Steps

  • Slide 77

  • Direct XQuery on Databases

  • XQuery on Relational Databases

  • Slide 80

  • XQuery on Relational Databases

  • XQuery on Distributed Sources

  • Example: Access to Two Relational Databases

  • XQuery on Integrated Views

  • and using XQuery to build the view

  • View = Query

Nội dung

The XML Standard Overview of our XML Standards • Motivation: HTML vs XML • XML 101: syntax, elements, attributes, DTDs, … • XML 201: XML Schema, Namespaces • XSLT: Transforming and Rendering XML • XQuery: Search, Transform & Integrate So what i s XML (all about)? Executive Summary: • XML = HTML – idiosyncrasies (simplified syntax) + user-definable ("semantic") tags • Separation of data and its presentation => simple, very flexible data exchange format: semistructured data model => new applications: • Information exchange (B2B), sharing (diglib), integration ("mediation"), archival, • Web site mangement (XML+XSL stylesheets), What’s Wrong with HTML? <DT> <IMG SRC="greenball.gif" >&nbsp; <A NAME="object-fusion"></A> Y.Papakonstantinou, S. Abiteboul, H. Garcia-Molina. <A HREF="http://www-cse.ucsd.edu/~yannis/papers/fusion.ps"> "ObjectFusion in Mediator Systems".</A> In <I>VLDB 96.</I> </DT> Y. Papakonstantinou, S. Abiteboul, H. Garcia-Molina. “Object Fusion in Mediator Systems”. In VLDB 96. HTML confuses presentation with content What’s Wrong with HTML <DT> <IMG SRC= "greenball.gif" >&nbsp; <A NAME="object-fusion"></A> Y.Papakonstantinou, S. Abiteboul, H. Garcia-Molina. <A HREF="http://www-cse.ucsd.edu/~yannis/papers/fusion.ps"> "ObjectFusion in Mediator Systems".</A> In <I>VLDB 96.</I> </DT> No Explicit Structure, Semantics, or Object-Orientation Author Conference Title And Some Repercussions • Lack of schema/semantics when querying the Web (HTML): – "find documents (books, papers, ) where author = Michael Jackson" ( and learn how software engineering meets the moon walker ) – "create a list of M. Jackson's books and (if available) their prices" => HTML is inappropriate for − data exchange − automation of information management (retrieval, manipulation, integration) XML is Based on Markup <bibliography> <paper ID= "object-fusion"> <authors> <author>Y.Papakonstantinou</author> <author>S. Abiteboul</author> <author>H. Garcia-Molina</author> </authors> <fullPaper source="fusion"/> <title>Object Fusion in Mediator Systems</title> <booktitle>VLDB 96</booktitle> </paper> </bibliography> Markup indicates structure and semantics Decoupled from presentation Elements and their Content element element name Character content Element Content Empty Element <bibliography> <paper ID="object-fusion"> <authors> <author>Y.Papakonstantinou</author> <author>S. Abiteboul</author> <author>H. Garcia-Molina</author> </authors> <fullPaper source="fusion"/> <title>Object Fusion in Mediator Systems</title> <booktitle>VLDB 96</booktitle> </paper> </bibliography> Element Attributes <bibliography> <paper ID="object-fusion"> <authors> <author>Y.Papakonstantinou</author> <author>S. Abiteboul</author> <author>H. Garcia-Molina</author> </authors> <fullPaper source="fusion"/> <title>Object Fusion in Mediator Systems</title> <booktitle>VLDB 96</booktitle> </paper> </bibliography> Attribute name Attribute Value XML = Labeled Ordered Trees <bibliography> <paper id=23 > <authors> <author>Yannis</author> <author>Serge</author> </authors> <title>Object Fusion</title> </paper> </bibliography> bibliography paper authors author author title fullpaper Yannis Serge Object Fusion paper ≈ semistructured data ≈ labeled trees/graphs can also represent • relational and • object-oriented data @id 23 [...]... SYSTEM "ghostview.exe"> From Docs to Data: XML Schema • XML DTDs (part of the XML spec.) – flexible, semistructured data model (nesting, ANY, ?, *, |, ) – but document-oriented (SGML heritage) • XML Schema (W3C working draft) – schema definition language in XML – data-oriented: data types – extends capabilities of DTD Sample Data for Introduction to XML Schema < ?xml version="1.0" encoding="utf-8"?> Presenting XML: XSLT • Why Stylesheets? – separation of content (XML) from presentation (XSL) • Why not just CSS for XML? – XSL is far more powerful: • selecting elements • transforming the XML tree • content based display (result may depend on data) ... inserting xsd:unique in the book element declaration we enforce that the character name’s in each book are unique … … Namespaces improve query formulation, execution, • XML Schema – defines structure and data types • XML Namespaces – identify your vocabulary • Resource Description Framework (RDF) – simple metadata model XML DTDs as Extended CFGs XML DTD Grammar bibliography... type="xsd:string“ minOccurs="0" maxOccurs="unbounded"/> … Basic Type of XML Schema The Catalog Approach to XML Schema: Stand-Alone Declarations & References . The XML Standard Overview of our XML Standards • Motivation: HTML vs XML • XML 101: syntax, elements, attributes, DTDs, … • XML 201: XML Schema, Namespaces • XSLT:. be part of the standard Uses of XML Entities • Physical partition – size, reuse, "modularity", … (both XML docs & DTDs) • Non -XML data – unparsed entities → binary data • Non -standard. community? In Search of the Lost Structure & Semantics How to make all this automatable? How do I learn and use the element structure of a document? Adding Structure and Semantics • XML Document

Ngày đăng: 23/10/2014, 17:17

TỪ KHÓA LIÊN QUAN

w