Web Services: Principles & Technology Slide 3.1 Chapter 3 Brief Overview of XML COMP 4302/6302.

Slides:



Advertisements
Similar presentations
XML-XSL Introduction SHIJU RAJAN SHIJU RAJAN Outline Brief Overview Brief Overview What is XML? What is XML? Well Formed XML Well Formed XML Tag Name.
Advertisements

What is XML? a meta language that allows you to create and format your own document markups a method for putting structured data into a text file; these.
XML: Extensible Markup Language
1 Web Data Management XML Schema. 2 In this lecture XML Schemas Elements v. Types Regular expressions Expressive power Resources W3C Draft:
An Introduction to XML Based on the W3C XML Recommendations.
1 XML DTD & XML Schema Monica Farrow G30
Sunday, June 28, 2015 Abdelali ZAHI : FALL 2003 : XML Schemas XML Schemas Presented By : Abdelali ZAHI Instructor : Dr H.Haddouti.
5-1 Facilitating Business over the Internet: The XML language CR (2004) Prentice Hall, Inc. The xml goals The main objects of xml: Diagrams: Blocks and.
Unit 4 – XML Schema XML - Level I Basic.
Introduction to XML This material is based heavily on the tutorial by the same name at
1 Advanced Topics XML and Databases. 2 XML u Overview u Structure of XML Data –XML Document Type Definition DTD –Namespaces –XML Schema u Query and Transformation.
Manohar – Why XML is Required Problem: We want to save the data and retrieve it further or to transfer over the network. This.
Processing of structured documents Spring 2003, Part 3 Helena Ahonen-Myka.
Copyright © 2003 Pearson Education, Inc. Slide 2-1 Created by Cheryl M. Hughes, Harvard University Extension School — Cambridge, MA The Web Wizard’s Guide.
XP New Perspectives on XML Tutorial 4 1 XML Schema Tutorial – Carey ISBN Working with Namespaces and Schemas.
VICTORIA UNIVERSITY OF WELLINGTON Te Whare Wananga o te Upoko o te Ika a Maui SWEN 432 Advanced Database Design and Implementation Document Type Definition.
Why XML ? Problems with HTML HTML design - HTML is intended for presentation of information as Web pages. - HTML contains a fixed set of markup tags. This.
VICTORIA UNIVERSITY OF WELLINGTON Te Whare Wananga o te Upoko o te Ika a Maui SWEN 432 Advanced Database Design and Implementation XML Schema 1 Lecturer.
Ertan Deniz Instructor.  XML Schema  Document Navigation (Xpath)  Document Transformation (XSLT)
1 XML Schemas. 2 Useful Links Schema tutorial links:
Dr. Azeddine Chikh IS446: Internet Software Development.
Neminath Simmachandran
XML CPSC 315 – Programming Studio Fall 2008 Project 3, Lecture 1.
XP 1 CREATING AN XML DOCUMENT. XP 2 INTRODUCING XML XML stands for Extensible Markup Language. A markup language specifies the structure and content of.
XML A Single Entity. xml a single entity Objectives Objectives :  understand the data model  describe the XML Document  describe the XML Schema  describe.
1 © Netskills Quality Internet Training, University of Newcastle Introducing XML © Netskills, Quality Internet Training University.
Introduction to XML. What is XML? Extensible Markup Language XML Easier-to-use subset of SGML (Standard Generalized Markup Language) XML is a.
August Chapter 2 - Markup and Core Concepts Learning XML by Erik T. Ray Slides were developed by Jack Davis College of Information Science and Technology.
Session IV Chapter 9 – XML Schemas
Processing of structured documents Spring 2002, Part 2 Helena Ahonen-Myka.
Avoid using attributes? Some of the problems using attributes: Attributes cannot contain multiple values (child elements can) Attributes are not easily.
Of 33 lecture 3: xml and xml schema. of 33 XML, RDF, RDF Schema overview XML – simple introduction and XML Schema RDF – basics, language RDF Schema –
1 XML An Overview Roger Debreceny University of Hawai`i Skip White University of Delaware XBRL Workshop, August 2006.
New Perspectives on XML, 2nd Edition
XML Instructor: Charles Moen CSCI/CINF XML  Extensible Markup Language  A set of rules that allow you to create your own markup language  Designed.
Accessing Data Using XML CHAPTER NINE Matakuliah: T0063 – Pemrograman Visual Tahun: 2009.
Sheet 1XML Technology in E-Commerce 2001Lecture 2 XML Technology in E-Commerce Lecture 2 Logical and Physical Structure, Validity, DTD, XML Schema.
Advanced Accounting Information Systems Day 31 XML Language Foundation November 6, 2009.
XML 2nd EDITION Tutorial 4 Working With Schemas. XP Schemas A schema is an XML document that defines the content and structure of one or more XML documents.
1 Tutorial 14 Validating Documents with Schemas Exploring the XML Schema Vocabulary.
Tutorial 13 Validating Documents with Schemas
1 Tutorial 12 Working with Namespaces Combining XML Vocabularies in a Compound Document.
Processing of structured documents Spring 2003, Part 3 Helena Ahonen-Myka.
Internet & World Wide Web How to Program, 5/e. © by Pearson Education, Inc. All Rights Reserved.2.
Working with XML Schemas ©NIITeXtensible Markup Language/Lesson 3/Slide 1 of 36 Objectives In this lesson, you will learn to: * Declare attributes in an.
XML Schema Definition (XSD). Definition of a Schema It is a model for describing the structure and content of data The XML Schema was developed as a content.
Working with XML. Markup Languages Text-based languages based on SGML Text-based languages based on SGML SGML = Standard Generalized Markup Language SGML.
C Copyright © 2011, Oracle and/or its affiliates. All rights reserved. Introduction to XML Standards.
ACG 6415 XML Schemas XML Namespaces XMLink. The XML Foundation  Many participants – an extended family! XML documents – carry data in context  Each.
Jackson, Web Technologies: A Computer Science Perspective, © 2007 Prentice-Hall, Inc. All rights reserved Chapter 7 Representing Web Data:
SEMI-STRUCTURED DATA (XML) 1. SEMI-STRUCTURED DATA ER, Relational, ODL data models are all based on schema Structure of data is rigid and known is advance.
CHAPTER NINE Accessing Data Using XML. McGraw Hill/Irwin ©2002 by The McGraw-Hill Companies, Inc. All rights reserved Introduction The eXtensible.
XML Extensible Markup Language
PART 1 XML Basics. Slide 2 Why XML Here? You need to understand the basics of XML to do much with Android All of they layout and configuration files are.
Rendering XML Documents ©NIITeXtensible Markup Language/Lesson 5/Slide 1 of 46 Objectives In this session, you will learn to: * Define rendering * Identify.
XML SCHEMA 1 CH 20. Objective 2 What’s wrong with DTDs? What is a schema? The W3C XML Schema Language Hello schemas Complex types Simple types Deriving.
4 Copyright © 2004, Oracle. All rights reserved. Validating XML by Using XML Schema.
Glencoe Introduction to Web Design Chapter 4 XHTML Basics 1 Review Do you remember the vocabulary terms from this chapter? Use the following slides to.
Advanced Accounting Information Systems Day 28 Introduction to XBRL October 30, 2009.
Creating Groups of Elements and Attributes in an XML Schema ©NIITeXtensible Markup Language/Lesson 4/Slide 1 of 28 Objectives In this lesson, you will.
XML BASICS and more…. What is XML? In common:  XML is a standard, simple, self-describing way of encoding both text and data so that content can be processed.
eXtensible Markup Language
XML: Extensible Markup Language
Unit 4 Representing Web Data: XML
XML QUESTIONS AND ANSWERS
Data Modeling II XML Schema & JAXB Marc Dumontier May 4, 2004
Chapter 7 Representing Web Data: XML
ece 720 intelligent web: ontology and beyond
Working with Namespaces and Schemas
New Perspectives on XML
Presentation transcript:

Web Services: Principles & Technology Slide 3.1 Chapter 3 Brief Overview of XML COMP 4302/6302

Slide 3.2 Topics XML document structure XML document structure XML schemas reuseXML schemas reuse

Slide 3.3 Markup  A method of distinguishing text from instructions in typesetting systems.  Markup = instructions to computerized typesetting systems (Latex).  Special characters ( ) are used to show where a markup instruction starts and stops. Example: This is a very serious matter. This is a very serious matter. “Tags” are easily understandable by both the human reader and the machine.

Slide 3.4 XML Extensible Markup Language (XML) is not a set of tags itself but a meta-language that allows you to create and use tag sets in a standard way. Provides fixed rules about markup structures (elements, attributes, and entities) as well as their notations and functions.

Slide 3.5 Book Catalog in XML Web Services: Principles and Technology Mike P. Papazoglou 2007 Prentice Hall This document has XML tags. A human and a computer can now easily extract the publisher data. Question: Who provides/defines these tags?

Slide 3.6 XML structure Document type: XML documents are regarded as having types. –XML’s constituent parts and their structure formally define the type of a document. An XML document is composed of named containers and their contained data values. –containers are represented as declarations, elements, and attributes. An XML document is also known as an instance or XML document instance to signify that it represents one possible set of data for a particular markup language. Right Plastic Products Edward st. Brisbane QLD 4000 Example of an XML document instance.

Slide 3.7 Layout of a typical XML document

Slide 3.8 XML: Elements Elements are fundamental units of content comprising element name and element content. –An element is a sequence of characters that begins with a start tag and ends with an end tag and includes everything in between. Text for Chapter 1 What is content? The characters in between the tags constitute the content. The topmost element of the XML document is a single element known as the root element. Elements contained in other elements are referred to as nested elements. –The containing element is the parent element and the nested element is called the child element.

Slide 3.9 XML: Attributes Another way of putting data into an XML document is by adding attributes to start tags. –An attribute specification is a name–value pair that is associated with an element. –Attributes are used to better specify the content of an element on which they appear by adding information about a defined element. customer-type=”manufacturer” Right Plastic Products Edward st. Brisbane QLD 4000

Slide 3.10 One Special Attribute: XML Namespace Namespaces in XML provide a facility for Associating the elements and/or attributes in all or part of a document with a particular schema Avoiding name clashes Namespace declarations have a scope. –A namespace declaration is in scope for the element on which it is declared and of that element’s children. The namespace name and the local name of the element together form a globally unique name known as a qualified name (QName). <BillingInformation customer-type=”manufacturer” xmlns=" Right Plastic Products 158 Edward St. Brisbane QLD Uniform resource identifier (URI)

Slide 3.11 XML: structure An XML document must have a root tag. An XML document is an information unit that can be seen in two ways: –As a linear sequence of characters that contain characters data and markup. –As an abstract data structure that is a tree of nodes. Title 1 Section 1.1 …. Section 1.2 Title 2 Section 2.1 …. Linear sequence Book Chapter Section Para Tree Section

Slide 3.12 XML Quiz  Use all elements/attributes you deem necessary to develop an XML document instance to describe –a student record –a course description –a bank account –a local restaurant

Slide 3.13 XML Schema XML schema refers to a document that defines the content of and structure for expressing XML documents. Schemas provide support for additional meta-data characteristics such as structural relationships, cardinality, valid values, and data types. Each type of schema acts as a method of describing data characteristics and applying rules and constraints to a referencing XML document. An XML schema describes the elements and attributes that may be contained in a schema-conforming document and the ways that the elements may be arranged within a document structure.

Slide 3.14 File “Person.xml” File “Person.xsd” Sophie Jones 34 <xsd:element name="Last“ type="xsd:string"/> XML schema and instance document xmlns:xsd=" Standard schema namespace defined by the XML schema specification Define a named namespace QName: namespace:element

Slide 3.15 Elements and their content model One item of a purchase order with its details Needs to be specified in US$ Schema Components

Slide 3.16 Attributes and Attribute Groups Schema Components (continued)

Slide 3.17 Complex Types Schema Components (continued) Define a complex data type “PersonType” Define an element “Person” of type “PersonType” Schema reuse

Slide 3.18 Topics XML document structure XML document structure XML schemas reuseXML schemas reuse

Slide 3.19 Complex type extensions (inheritance) <xsd:schema xmlns:xsd=" xmlns:PO=" targetNamespace=" Declare the XML namespace of all new types explicitly created within this schema

Slide 3.20 Complex type restrictions “minOccurs” and “maxOccurs” define the minimum and maximum numbers of times this element can appear in the structure. No city info is needed if Postal Code is present.

Slide 3.21 Complex type polymorphism <xsd:element name="shippingAddress" type="PO:Address" minOccurs= "1" maxOccurs="1"/> <xsd:element name="billingAddress" type="PO:Address" minOccurs= "1" maxOccurs="1"/> </xsd:complexType Variant of the PurchaseOrder type that uses the base type Address for its billingAddress and shippingAddress elements. Since “shippingAddress” and “billingAddress” are of type “PO:Address”, they can be defined by an address type derived from “PO:Address” in a document instance.

Slide 3.22 Complex type polymorphism (Continued) Plastic Products 459 Wickham st. Fortitude Valley QLD 4006 Australia 158 Edward st. QLD 4000 Australia An instance document can now use any type derived from base type Address for its billingAddress and shippingAddress elements. PurchaseOrder type uses the derived AustralianAddress type as its billingAddress and the derived AustralianPostalAddress type as its shippingAddress elements. No city info is needed!

Slide 3.23 Including and importing schemas How to build/manage a large and complex schema? Modularization! Include To include other schema documents in a schema document that has the same namespace Example: Import To use schema modules that belong to different namespaces Example: