ACG 4401 XML Schemas XML Namespaces XLink. + The XML Foundation Many participants – an extended family! XML Instance documents – carry data in context.

Slides:



Advertisements
Similar presentations
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.
Advertisements

1 XML DTD & XML Schema Monica Farrow G30
Tutorial 9 Working with XHTML
XML Schemas Microsoft XML Schemas W3C XML Schemas.
A Simple Schema Design. First Schema Design Being a Dog Is a Full-Time Job Charles M. Schulz Snoopy Peppermint Patty extroverted beagle Peppermint.
Outline IS400: Development of Business Applications on the Internet Fall 2004 Instructor: Dr. Boris Jukic XML.
Introduction to XML ISYS 573. HTML vs XML HTML is a language specifically designed for displaying information in browser. It doesn’t carry information.
Sunday, June 28, 2015 Abdelali ZAHI : FALL 2003 : XML Schemas XML Schemas Presented By : Abdelali ZAHI Instructor : Dr H.Haddouti.
XML Introduction What is XML –XML is the eXtensible Markup Language –Became a W3C Recommendation in 1998 –Tag-based syntax, like HTML –You get to make.
Tutorial 11 Creating XML Document
Unit 4 – XML Schema XML - Level I Basic.
Introduction to XML This material is based heavily on the tutorial by the same name at
ACG 4401 XML Schemas XML Namespaces XLink. + The XML Foundation Many participants – an extended family! XML Instance documents – carry data in context.
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.
ACG 4401 XML Schemas XML Namespaces XMLink. + The XML Foundation Many participants – an extended family! XML Instance documents – carry data in context.
Introduction to XML: Part I By Sandeep Jangity CS 157B, Section 2 Dr. Lee.
ECA 228 Internet/Intranet Design I Intro to XML. ECA 228 Internet/Intranet Design I HTML markup language very loose standards browsers adjust for non-standard.
Chapter 12 Creating and Using XML Documents HTML5 AND CSS Seventh Edition.
XP New Perspectives on XML Tutorial 4 1 XML Schema Tutorial – Carey ISBN Working with Namespaces and Schemas.
Introduction to XML cs3505. References –I got most of this presentation from this site –O’reilly tutorials.
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.
1 XML Schemas. 2 Useful Links Schema tutorial links:
Dr. Azeddine Chikh IS446: Internet Software Development.
McGraw-Hill/Irwin © 2004 by The McGraw-Hill Companies, Inc. All rights reserved. Schemas Ellen Pearlman Eileen Mullin Programming the Web Using XML.
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.
Skip 2007 Current Issues in MIS The XML Language Foundation f - Clinton E. White, Jr Professor of Accounting & MIS Lerner College of B&E University.
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.
XML - Why: The HTML-Dilemma HTML, SGML, XML - How: Syntax, Concept, Language Elements Basics Well-formed XML-Documents (without DTD) Valid XML-Documents.
What is XML?  XML stands for EXtensible Markup Language  XML is a markup language much like HTML  XML was designed to carry data, not to display data.
Session IV Chapter 9 – XML Schemas
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 –
Beginning XML 4th Edition. Chapter 5: XML Schemas.
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
An OO schema language for XML SOX W3C Note 30 July 1999.
Accessing Data Using XML CHAPTER NINE Matakuliah: T0063 – Pemrograman Visual Tahun: 2009.
XML – Part III. The Element … This type of element either has the element content or the mixed content (child element and data) The attributes of the.
1 Credits Prepared by: Rajendra P. Srivastava Ernst & Young Professor University of Kansas Sponsored by: Ernst & Young, LLP (August 2005) XBRL Module Part.
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
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.
XML & UBL ACG 6415 Chapter 2. Extensible Markup Language - XML Meta-Language A language that can be used to create others (vocabularies) Universal Business.
XSD: XML Schema Language Kanda Runapongsa Dept. of Computer Engineering Khon Kaen University.
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.
Advanced Accounting Information Systems
ACG 4401 XSLT Extensible Stylesheet Language for Transformations Presenting XML and XBRL.
 XML derives its strength from a variety of supporting technologies.  Structure and data types: When using XML to exchange data among clients, partners,
ACG 6415 XML Schemas XML Namespaces XMLink. The XML Foundation  Many participants – an extended family! XML documents – carry data in context  Each.
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.
Advanced Accounting Information Systems Day 34 XBRL Instance Documents and Taxonomies November 13, 2009.
ACG 6415 XBRL Instance Documents. XBRL Facts  Information Report  By a Specific Entity  Specific Period of Time  Specific Currency.
XML Notes taken from w3schools. What is XML? XML stands for EXtensible Markup Language. XML was designed to store and transport data. XML was designed.
XML Namespaces In this first lesson XML Namespaces, you will learn to:
CITA 330 Section 4 XML Schema. XML Schema (XSD) An alternative industry standard for defining XML dialects More expressive than DTD Using XML syntax Promoting.
Web Services: Principles & Technology Slide 3.1 Chapter 3 Brief Overview of XML COMP 4302/6302.
Advanced Accounting Information Systems Day 28 Introduction to XBRL October 30, 2009.
Extensible Markup Language (XML) Pat Morin COMP 2405.
ACG 4401 XML Schemas XML Namespaces XLink.
ACG 4401 XML Schemas XML Namespaces XLink.
XML QUESTIONS AND ANSWERS
Eugenia Fernandez IUPUI
Data Modeling II XML Schema & JAXB Marc Dumontier May 4, 2004
Presentation transcript:

ACG 4401 XML Schemas XML Namespaces XLink

+ The XML Foundation Many participants – an extended family! XML Instance documents – carry data in context Each must be parsed into its component parts XML Schemas – define the rules a class of documents must follow Can be used to validate documents & contents XSLT – provide processing instructions Can be used to process XML documents Xlink (will discuss briefly, but its an important feature) Namespaces – qualify elements & attributes Differentiate & associate them with a URI

+ XML Schema Language Language (Vocabulary) used to create Schema Documents Schema Definition: “provide a means for defining the structure, content and semantics of XML documents.” (W3C) The Schema must be a Well-formed Document Defines structure and contents of Instance Document Similar to an ER-Diagram for databases Defines Each Element and Attribute Its Structure Includes Business Rules including: Cardinalities Used to Validate Instance Document Means Instance Document conforms to Schema Rules 3

+ XML Schema.xsd extension But won’t open in IE so use.xml if using that browser Defines each attribute and element

+ Vocabularies & Schemas XBRL & UBL are vocabularies XBRL for Financial Reporting UBL for Business Documents Vocabularies are designed using Agreed upon element names Agreed upon element types Agreed upon element sequence/structure Defined by Schemas

+ Namespaces Each XML Vocabulary is associated with a unique NameSpace A unique identifier (think, primary key) Universal Resource Identifier (URI) Local Name (e.g. TeeTimeResevations.xml) URL ( Used to prevent naming collisions (more later) 6

+ Vocabularies and Namespaces Namespace A Unique Identifier Unique Prefix refers to URI Points to where information in an XML Document can be found. (URI) Attribute of Root Element Definition: “In XML, a namespace is a collection of names, identified by a URI reference, that are used in XML documents as element types and attribute names. In order for XML documents to be able to use elements and attributes that have the same name [tag name] but come from different sources, there must be a way to differentiate between the markup elements that come from the different sources.” (Webopeida) (Technical Information from W3.org)“ URI attributeWebopeidaTechnical Information Used to preclude naming collisions Method for distinguishing between the same element name for different elements

+ Element Types How to Describe Elements in a Schema 8

+ Types of Elements Simple contain only data (no attributes) Complex contain other elements (i.e. Root & Parent) Bicycles Online, Inc. contain attributes

+ Simple Element Definition Declare Name Declare Type abc12345 Type= Defines the data type: string Integer date decimal other types

+ Complex Element (Parent) Declares Name Declares type Declares Structure Dr. Hornik

+ Complex Element (Parent) xml 12

+ Complex Element (attribute) Declare Name Declare Type Define element and attribute(s) For example:

+ Complex (Attribute) xml 14

+ Creating Schema from Instance Document PizzaOrders 15

+ Create a Schema from a non- vocabulary instance document Identify types of elements Simple Complex – Parent Complex – Attribute Create Prolog Create Root element Work down from 1 st element to last

+ Identify Element Types PizzaOrder.xml 17

+ Schema Document Root Element 18

+ UBL Schemas Schemas for each document type Common Basic Components (all child elements) Defines all Child Elements: Defines Simple Elements Defines Complex (attribute) Elements Prefix: cbc (Namespace prefix) Common Aggregate Components Defines Complex (Parent) Elements Prefix: cac (Namespace prefix)

+ Root Element of Schema Document Root element is used to declare namespace(s) xmlns:xs defines prefix to use for namespace xs: = namespace prefix “ location of Namespace, where the dictionary is Prefix is used before each tag xs:tagname 20

+ Creating UBL Document Schemas 1. Declare NameSpaces and qualifiers 2. Import necessary Schemas 3. Define Root Element (from Instance Document) 1. Reference Reusable data components 2. Declare Cardinalities

+ Declaring a Namespace (in the UBL Instance document) <Invoice xmlns="UBLInvoiceDocument" xmlns:cbc="UBLCommonBasicComponents" xmlns:cac="UBLCommonAggregateComponents"> Default Namespace – a namespace without a prefix Since UBLInvoiceDocument does NOT have a prefix any element in the instance document without a prefix relates to this namespace. UBL Order Instance with namespaces

+ 1. UBL Namespace Declaration in Root Element of Schema Document <xs:schema xmlns:xs=" xmlns="UBLInvoiceDocument" xmlns:cbc="UBLCommonBasicComponents" xmlns:cac="UBLCommonAggregateComponents" elementFormDefault="qualified" attributeFormDefault="unqualified” targetNamespace="UBLInvoiceDocument">

+ Namespace Clarification targetNamespace="UBLInvoiceDocument“ The schema being created/used is applied to the UBLInvoiceDocument namespace elementFormDefault="qualified“ Element names will use a namespace prefix CAC: CBC: attributeFormDefault="unqualified“ Attribute names will not use a namespace prefix

+ 2. UBL Import <xs:import namespace="UBLCommonBasicComponents" schemaLocation=" CommonBasicComponentsSchema.xsd"/> <xs:import namespace="UBLCommonAggregateComponents" schemaLocation=" CommonAggregateComponentsSchema.xsd"/>

+ 3. UBL Root Element (Invoice.. Not complete) <xs:element ref=“cac:OrderReference” minOccurs=“1” maxOccurs=“1”/ Put it all together: The Entire Schema

+ UBL All UBL Instance documents are created using elements defined in Schemas (CBC or CAC). All UBL document schema’s define the content and structure of the UBL Instance document For any particular company What is that companies rules related to an Order, Invoice, etc. UBL document 27

+ Validating XML Ensure that Instance Document Follows business rules Data types are correct Data is properly sequenced

+ Schemas and Vocabularies UBL Vs. XBRL 29

+ UBL Schema defines: Elements Attributes, and UBL Documents (i.e. Order, Invoice, DespatchAdvice, etc.) 30

+ XBRL Schema Defines: Elements Attributes Structure of XBRL documents Taxonomies Commercial and Industrial Banking and Savings IFRS Management Discussion and Analysis Report etc. 31

+ XLink 32

+ XML Linking Language Xlink Another XML foundation language Allows attributes of an element in an XML document to establish links with other documents/elements Simple: HTML type links (unidirectional/outbound) Extended: More complex Relationship links (multidirectional) describes relationships between elements

+ Simple links Unidirectional and always Outbound From element within Instance document to an outside resource Link to list of approved Vendors 34

+ Extended Links Attributes: xlink:type=“extended” Used in Parent element Indicates child elements will participate in the linking relationship Xlink:type=“locator” Remote resource In Child element Xlink:href=“ In Child Element