XML (4) Extensible Markup Language
|
|
- Sydney Doyle
- 6 years ago
- Views:
Transcription
1 XML (4) Extensible Markup Language Acknowledgements and copyrights: these slides are a result of combination of notes and slides with contributions from: Michael Kiffer, Arthur Bernstein, Philip Lewis, Hanspeter Mφssenbφck, Hanspeter Mφssenbφck, Wolfgang Beer, Dietrich Birngruber, Albrecht Wφss, Mark Sapossnek, Bill Andreopoulos, Divakaran Liginlal, Anestis Toptsis, Addison Wesley, Microsoft AA. They serve for teaching purposes only and only for the students that are registered in CSE4413 and should not be published as a book or in any form of commercial product, unless written permission is obtained from each of the above listed names and/or organizations. 1
2 The Simple Type: <simpletype> The Simplest Type Declaration: <xsd:simpletype name = FirstName type = xsd:string /> Based on a built in primitive datatype Cannot contain sub-elements or attributes Can declare constraining properties ( facets ) minlength, maxlength, Length, etc May be used as base type of a complextype (see later). 2
3 Enumerated types (in simpletype) Used to constrain the set of possible values for a simple type. Example: <xsd:element name= students > <xsd:simpletype name= 4413Winter2006 > <xsd:restriction base= xsd:string > <xsd:enumeration value= cs /> <xsd:enumeration value= cs /> <xsd:enumeration value= cs /> <xsd:enumeration value= cs /> </xsd:restriction> <xsd:simpletype> </xsd:element> Example: <student> cs </student> is not allowed <student> cs </student> is OK. 3
4 Enumeration: another Example <xsd:simpletype name= Canada-Flag-Colors"> <xsd:restriction base="xsd:string"> <xsd:enumeration value="red"/> <xsd:enumeration value="white"/> </xsd:restriction> </xsd:simpletype> This creates a new type called Canada-Flag-Colors. An element declared to be of this type must have either the value red, or white. 4
5 Patterned types (in simpletype) Allow you to use a regular expression to establish a pattern that the type value should follow. Example: <xsd:element name= pizza > <xsd:simpletype> <xsd:restriction base= xsd:string > <xsd:pattern value= (medium large)-(thin deep)- (sausage_)?(pepperoni_)?(mushrooms_)?(anchovies_)?(redonion_)?/> <xsd:restriction> </xsd:simpletype> <xsd:element> Usage: <pizza> medium-deep-pepperoni_redonion </pizza> 5
6 Operations in regular expressions for patterned types X? at most one X X+ -- at least one X X* -- any number of X (XY) group X and Y trogether X Y X or Y [XYZ] one of X, Y, Z. X{n} n number of Xs in a row. X(n,m} at least n Xs, but no more than m Xs.. any character \d any digit \D any non-digit \s any white space \S any non-white space 6
7 Another Example of Creating a New Datatype by using patterns <xsd:simpletype name="telephonenumber"> <xsd:restriction base="xsd:string"> <xsd:length value="8"/> <xsd:pattern value="\d{3}-\d{4}"/> </xsd:restriction> </xsd:simpletype> The string must follow the pattern: ddd-dddd, where 'd' represents a 'digit'. This creates a new datatype called 'TelephoneNumber'. Elements of this type can hold string values The string length must be exactly 8 characters long 7
8 List (in simpletype) xsd:list is used to create a list type, which is useful any time you need to allow for a list of information. Example: <xsd:element name= alist > <xsd:simpletype name= myintlist > <xsd:list itemtype= integer /> <xsd:length value= 12 /> </xsd:list> </simpletype> </xsd:element> Allows to create a list of 12 integers, separated by white space. <alist> </alist> 8
9 The Complex Type: <complextype> Used to define a new complex type May be based on simple or existing complextypes May declare elements or element references: <element name=... type =... /> <element ref=... /> May declare attributes or reference attribute groups <attribute name=... type=... /> <attributegroup ref =... /> 9
10 Example: Defining a complextype <xsd:complextype name= Customer > <xsd:sequence> <xsd:element name= Person type= Name /> <xsd:element name= Address type= Address /> </xsd:sequence > </complextype> Name of the type for future referencing <xsd:complextype name= Address > <xsd:sequence > <xsd:element name= Street type= string /> <xsd:element name= City type= string /> Type Address, defined and used <xsd:element name= State type= State_Region /> <xsd:element name= PostalCode type= string /> <xsd:element name= Country type= string /> </sequence> </xsd:complextype> Type State_Region used needs to be defined as well. 10
11 Complex types One of the most useful features of complex type definitions is the use of the sequence reserved word. A sequence is a list of child elements that must appear in a particular order. Ex: <xsd:element name= employee > <xsd:complextype> <xsd:sequence> <xsd:element name= name type= xsd:string /> <xsd:element name= birthday type= xsd:date /> <xsd:element name= age type= xsd:positiveinteger /> <xsd:element name= salary type= xsd:float /> </xsd:sequence> </xsd:complextype> </xsd:element> 11
12 Sequence (complextype ) Usage: <employee> <name> Joe Q. Public </name> <birthday> </birthday> <age>30</age> <salary> </salary> </employee> 12
13 Compositors: Sequences, Sets, Compositors: alternatives sequence, all, choice are required when element has at least 1 child element (= complex content) sequence -- have already seen all can specify sets of elements choice can specify alternative types 13
14 Choice (complextype ) The choice reserved word allows you to list several child elements (and/or sequences!) with only one of them allowed for use in any given element. Example: <xsd:element name= id > <xsd:complextype> <xsd:choice> <xsd:element name= sin type= xsd:string > <xsd:sequence> <xsd:element name= name type= xsd:string > <xsd:element name= address type= xsd:string > <xsd:element name= birthdate type= xsd:date > </xsd:sequence> <xsd:element name= driverslicence type= xsd:string > </xsd:choice> <xsd:complextype> <xsd:element> Define an id to be either the sin, or the (name and address and birthdate), or the driverslicence. 14
15 Choice (complextype ) 2.. Assume addresses can have P.O.Box or street name/number: <xsd:complextype name= addresstype > <xsd:sequence> <xsd:choice> <xsd:element name= POBox type= string /> <xsd:sequence> <xsd:element name= Name type= string /> <xsd:element name= Number type= string /> </xsd:sequence> </xsd:choice> <xsd:element name= City type= string /> </xsd:sequence> </xsd:complextype> This or that 15
16 Sets (compextype ) Use for when the order of components in addresses is unimportant: <xsd:complextype name= addresstype > <xsd:all> <xsd:element name= StreetName type= string /> <xsd:element name= StreetNumber type= string /> <xsd:element name= City type= string /> </xsd:all> </xsd:complextype> Problem: all comes with a host of awkward restrictions. For instance, cannot occur inside a sequence; only sets of elements, not bags. 16
17 Declaring Attributes Declared using <attribute> tag Value pairs Can only be assigned to <complextype> types May be grouped into an attribute group more later! Based on a <simpletype>, by reference or explicitly <attribute name = age type= integer /> <!-- OR --> <xsd:attribute name = age > <xsd:simpletype> <xsd:restriction base= integer > <maxlength = 3 /> </xsd:restriction> </xsd:simpletype> </xsd:attribute> 17
18 Declaring Attribute Groups 1/2 Way to group related attributes together Promotes logical organization Must be unique within an XML Schema Referenced from complextype definitions 18
19 Declaring Attribute Groups 2/2 <!-- Define the unique group: --> <xsd:attributegroup name = CreditCardInfo > <xsd:attribute name = CardNumber type = integer use = required /> <xsd:attribute name = ExpirationDate type = date use = required /> <xsd:attribute name = CardHolder type = FullName use = required /> </xsd:attributegroup> Complex type FullName defined elsewhere <!-- Then you can reference it from a complextype: --> <xsd:complextype name = CreditInformation > <xsd:attributegroup ref = CreditCardInfo /> </xsd:complextype> 19
20 <xsd:element name="book"> <xsd:complextype> <xsd:sequence> </xsd:sequence> <xsd:attribute ref="category" use="required"/> </xsd:complextype> </xsd:element> <xsd:attribute name="category"> <xsd:simpletype> <xsd:restriction base="xsd:string"> <xsd:enumeration value="autobiography"/> <xsd:enumeration value="fiction"/> <xsd:enumeration value="non-fiction"/> </xsd:restriction> </xsd:simpletype> </xsd:attribute> Attribute declaration. Use the "use" attribute here. Attribute type declaration. Must NOT have a "use" ("use" only makes sense in the context of an element) Another example: declare an element with attribute and declare the attribute as well. 20
21 Inlining Attributes An alternative way of expressing the last example - the attributes are inlined within the Book declaration rather than being separately defined. 21
22 <xsd:element name="book" maxoccurs="unbounded"> <xsd:complextype> <xsd:sequence> <xsd:element name="title" type="xsd:string"/> <xsd:element name="author" type="xsd:string" maxoccurs="unbounded"/> </xsd:sequence> <xsd:attribute name="category" use="required"> <xsd:simpletype> <xsd:restriction base="xsd:string"> <xsd:enumeration value="autobiography"/> <xsd:enumeration value="non-fiction"/> <xsd:enumeration value="fiction"/> </xsd:restriction> </xsd:simpletype> </xsd:attribute> <xsd:attribute name="instock" type="xsd:boolean" default="false"/> <xsd:attribute name="reviewer" type="xsd:string" default=" "/> </xsd:complextype> </xsd:element> 22
23 <xsd:complextype> or <xsd:simpletype>? When do you use the complextype element and when do you use the simpletype element? Use the complextype element when you want to define child elements and/or attributes of an element Use the simpletype element when you want to create a new type that is a refinement of a built-in type (string, date, year, etc) 23
24 Declaring elements :: Structure of <xsd:element> <xsd:element maxoccurs=int maximum number of occurrences minoccurs=int minimum number of occurrences name=string name of the element ref=qname refer to an existing element (QName is a namespace qualified name) type=qname a simple type or a custom type identifier > (simpletype or complextype)? optional type specs </xsd:element> 24
25 Declaring Elements <xsd:element name="name" type="type" minoccurs="int maxoccurs="int"/> <xsd:element name="name" minoccurs="int" maxoccurs="int"> <xsd:complextype> </xsd:complextype> </xsd:element> <xsd:element name="name" minoccurs="int" maxoccurs="int"> <xsd:simpletype> <xsd:restriction base="type"> </xsd:restriction> </xsd:simpletype> </xsd:element> 25
26 minoccurs and maxoccurs If not specified minoccurs is "1" If not specified maxoccurs is "1" <xsd:element ref="title" minoccurs="1" maxoccurs="1"/> Equivalent! <xsd:element ref="title"/> 26
27 Structure of complextype Nameless (anonymous) <xsd:complextype mixed=boolean allow both elements and attribute children name=ncname name for this complextype (Qname without prefix and colon) > <choice> or <sequence> of following elements (optional) <attribute> or <attributegroup> - specify attributes </xsd:complextype > OR, named <xsd:complextype name= thetypename mixed=boolean allow both elements and attribute children name=ncname name for this complextype > <choice> or <sequence> of following elements (optional) <attribute> or <attributegroup> - specify attributes </xsd:complextype > 27
28 Example 1. Declare an element called Book 2. This element has a sequence of one or more Chapter elements <Book> <Chapter number= 1 pages = 35 /> <Chapter number= 2 pages= 71 /> </Book> The XSD: <xsd:element name= Book"> <xsd:complextype> <xsd:sequence> <xsd:element name= Chapter > </xsd:element> </xsd:sequence> </xsd:complextype> </xsd:element> ( the DTD!) <!ELEMENT Book (Chapter)+> 28
29 Example 1. To complete the definition of element Book, we need to define an element called Chapter 2. This element has two attributes: 1. number, an integer, and 2. pages, an integer. The XSD <xsd:element name= Chapter" type= ItemType /> <xsd:complextype name= ItemType > <xsd:attribute name= number" type="xsd:integer" use="required"/> <xsd:attribute name= pages" type= xsd:integer" use="required"/> </xsd:complextype> (the DTD!) <!ELEMENT Chapter EMPTY> <!ATTLIST Chapter name CDATA #REQUIRED price CDATA #REQUIRED> 29
30 The completed XSD definition <xsd:element name= Book"> <xsd:complextype> <xsd:sequence> <xsd:element name= Chapter > </xsd:element> </xsd:sequence> </xsd:complextype> </xsd:element> Used here Defined here <xsd:element name= Chapter" type= ItemType /> <xsd:complextype name= ItemType > Used here <xsd:attribute name= number" type="xsd:integer" use="required"/> <xsd:attribute name= pages" type= xsd:integer" use="required"/> </xsd:complextype> Defined here 30
31 Example: Element Containing a User- Defined Simple Type (cont.) Here's an alternative method for declaring elevation: <xs:element name="elevation"> <xs:simpletype> <xs:restriction base="xs:integer"> <xs:mininclusive value="-1290"/> <xs:maxinclusive value="29035"/> </xs:restriction> </xs:simpletype> </xs:element> The simpletype definition is defined inline, it is an anonymous simpletype definition. The disadvantage of this approach is that this simpletype may not be reused by other elements. 31
32 Comparing Approaches to Defining an element <xsd:element name= Menu" type= MenuType"/> <xsd:complextype name= MenuType"> <xsd:sequence> <xsd:element name= Item" type= ItemType /> </xsd:sequence> </xsd:complextype> Element Menu is of type MenuType is equivalent to: Element Menu has the complextype definition inlined in the element declaration. <xsd:element name= Menu"> <xsd:complextype> <xsd:sequence> <xsd:element name= Item" type= ItemType /> <xsd:element name="c" /> </xsd:sequence> </xsd:complextype> </xsd:element> 32
33 Example of using Types <xsd:complextype name="itemtype"> <xsd:attribute name="name" type="xsd:string" use="required"/> <xsd:attribute name="price" type="xsd:string" use="required"/> </xsd:complextype> <xsd:complextype name="menutype"> <xsd:sequence> <xsd:element name="item" type="itemtype" maxoccurs="unbounded"/> </xsd:sequence> </xsd:complextype> <xsd:element name="restaurant"> <xsd:complextype> <xsd:sequence> <xsd:element name="menu" type="menutype"/> </xsd:sequence> <xsd:attribute name="name" type="xsd:string" use="required"/> <xsd:attribute name="location" type="xsd:string" use="required"/> </xsd:complextype> </xsd:element> </xsd:schema> Declare a type called ItemType Declare a type called MenuType containing the element <Item> Declare the root element <Restaurant> Declare the element <Menu> 33
34 Example of using ref <xsd:element name= Restaurant"> Refer to <Menu> Declaration <xsd:complextype> <xsd:sequence> <xsd:element ref= Menu" minoccurs="1" maxoccurs= 1"/> </xsd:sequence>.attributes for Restaurant. Declare the element <Menu> </xsd:complextype> </xsd:element> <xsd:element name= Menu"> <xsd:complextype> <xsd:sequence> <xsd:element name= Item" minoccurs="1 maxoccurs= unbounded"/> </xsd:sequence>.. Attributes for Item.. </xsd:complextype> </xsd:element> </xsd:schema> Declare the root element <Restaurant> Declare the element <Item> 34
35 Exercise Write a XML document that conforms to previous schema (with root element Restaurant). Note, you will need to complete the schema definition for the missing attributes (make your own choices). 35
36 type attribute or complextype Child Element, but not Both! An element declaration can have a type attribute, or a complextype child element, but it cannot have both a type attribute and a complextype child element. <xsd:element name= Menu" type= MenuType"> <xsd:complextype> </xsd:complextype> </xsd:element> 36
37 Element Containing a User- Defined Simple Type Example. Create a schema element declaration for an elevation element. Declare the elevation element to be an integer with a range to <elevation>5240</elevation> Here's one way of declaring the elevation element: <xsd:simpletype name="earthsurfaceelevation"> <xsd:restriction base="xsd:integer"> <xsd:mininclusive value="-1290"/> <xsd:maxinclusive value="29035"/> </xsd:restriction> </xsd:simpletype> <xsd:element name="elevation" type="earthsurfaceelevation"/> 37
38 Element Containing a User-Defined Simple Type inlined (with anonymous simple type definition) Here's an alternative method for declaring elevation: <xsd:element name="elevation"> <xsd:simpletype> <xsd:restriction base="xsd:integer"> <xsd:mininclusive value="-1290"/> <xsd:maxinclusive value="29035"/> </xsd:restriction> </xsd:simpletype> </xsd:element> The simpletype definition is defined inline, it is an anonymous simpletype definition. The disadvantage of this approach is that this simpletype may not be reused by other elements. 38
39 Schema Document and Namespaces <schema xmlns= targetnamespace= > </schema> Uses standard XML syntax. namespace for keywords used in a schema document (not an instance document), e.g., schema, targetnamespace, etc. targetnamespace names the namespace defined by the above schema. Every XML document that is an instance of this schema should then specify and have as default namespace the one specified by this schema (i.e., 39
40 Playing with Visual Studio.NET Visual Studio.NET supports XML and XSD (and DTD). 40
41 A XML schema (stored in a file with the extension.xsd, e.g. Books.xsd.) <xsd:schema xmlns:xsd=" xmlns="schema.xsd" elementformdefault="qualified" targetnamespace="schema.xsd"> <xsd:element name="bookstore" type="bookstoretype" /> <xsd:complextype name="bookstoretype"> <xsd:sequence maxoccurs="unbounded"> <xsd:element name="book" type="booktype" /> </xsd:sequence> </xsd:complextype> <xsd:complextype name="booktype"> <xsd:sequence> <xsd:element name="title" type="xsd:string" /> <xsd:element name="author" type="authorname" /> <xsd:element name="price" type="xsd:decimal" /> </xsd:sequence> <xsd:attribute name="genre" type="xsd:string" /> <xsd:attribute name="publicationdate" type="xsd:string" /> <xsd:attribute name="isbn" type="xsd:string" /> </xsd:complextype> <xsd:complextype name="authorname"> <xsd:sequence> <xsd:element name="first-name" type="xsd:string" /> <xsd:element name="last-name" type="xsd:string" /> </xsd:sequence> </xsd:complextype> </xsd:schema> 41
42 If open the.xsd file with visual studio.net and right-click.. Select View Schema 42
43 Generated diagram by selecting View Schema (previous slide). 43
44 A corresponding XML document (Books.xml) <?xml version="1.0"?> <!-- This file represents a fragment of a book store inventory database --> <bookstore xmlns=" <book genre="autobiography"> <title>the Autobiography of Benjamin Franklin</title> <author> <first-name>benjamin</first-name> <last-name>franklin</last-name> </author> <price>8.99</price> </book> <book genre="novel"> <title>the Confidence Man</title> <author> <first-name>herman</first-name> <last-name>melville</last-name> </author> <price>11.99</price> </book> <book genre="philosophy"> <title>the Gorgias</title> <author> <name>plato</name> </author> <price>9.99</price> </book> </bookstore> 44
45 Can open it with visual studio.net right-click.. Select View Data 45
46 And you will get a Data View of the XML document! 46
47 .. In the same XML document right-click.. Select Create Schema 47
48 And you will get a XSD generated by vs.net that corresponds to the XML document! The schema can be edited by right-click here also. Allows editing the schema 48
49 Also can use the Toolbox to edit the schema 49
50 XSD validation XSV (XML Schema Validator). Standalone command-line validator. <oxygen/> XML editor and XSD (and DTD) validator 50
XML Schemas. Purpose of XML Schemas (and DTDs)
1 XML Schemas http://www.w3.org/tr/xmlschema-0/ (Primer) http://www.w3.org/tr/xmlschema-1/ (Structures) http://www.w3.org/tr/xmlschema-2/ (Datatypes) Roger L. Costello XML Technologies Course 2 Purpose
More informationXML Schemas Derived from
1 XML Schemas Derived from http://www.w3.org/tr/xmlschema-0/ Copyright by Roger L. Costello http://www.xfront.com/ Protected by the GNU General Public License Version 2 Modified by Fabrizio Riguzzi on
More informationSistemi ICT per il Business Networking
Corso di Laurea Specialistica Ingegneria Gestionale Sistemi ICT per il Business Networking XML Schema Docente: Vito Morreale (vito.morreale@eng.it) 1 Motivation People are dissatisfied with DTDs It's a
More informationCountryData Technologies for Data Exchange. Introduction to XML
CountryData Technologies for Data Exchange Introduction to XML What is XML? EXtensible Markup Language Format is similar to HTML, but XML deals with data structures, while HTML is about presentation Open
More informationXML DTDs and Namespaces. CS174 Chris Pollett Oct 3, 2007.
XML DTDs and Namespaces CS174 Chris Pollett Oct 3, 2007. Outline Internal versus External DTDs Namespaces XML Schemas Internal versus External DTDs There are two ways to associate a DTD with an XML document:
More informationXML - Schema. Mario Arrigoni Neri
XML - Schema Mario Arrigoni Neri 1 Well formed XML and valid XML Well formation is a purely syntactic property Proper tag nesting, unique root, etc.. Validation is more semantic, because it must take into
More informationCS/INFO 330: Applied Database Systems
CS/INFO 330: Applied Database Systems XML Schema Johannes Gehrke October 31, 2005 Annoucements Design document due on Friday Updated slides are on the website This week: Today: XMLSchema Wednesday: Introduction
More informationInformation Systems. DTD and XML Schema. Nikolaj Popov
Information Systems DTD and XML Schema Nikolaj Popov Research Institute for Symbolic Computation Johannes Kepler University of Linz, Austria popov@risc.uni-linz.ac.at Outline DTDs Document Type Declarations
More informationXML and Content Management
XML and Content Management Lecture 3: Modelling XML Documents: XML Schema Maciej Ogrodniczuk, Patryk Czarnik MIMUW, Oct 18, 2010 Lecture 3: XML Schema XML and Content Management 1 DTD example (recall)
More informationHTML vs. XML In the case of HTML, browsers have been taught how to ignore invalid HTML such as the <mymadeuptag> element and generally do their best
1 2 HTML vs. XML In the case of HTML, browsers have been taught how to ignore invalid HTML such as the element and generally do their best when dealing with badly placed HTML elements. The
More informationOverview. Introduction to XML Schemas. Tutorial XML Europe , Berlin. 1 Introduction. 2 Concepts. 3 Schema Languages.
Introduction to XML Schemas Tutorial XML Europe 2001 21.5.2001, Berlin Ulrike Schäfer. www.infotakt.de. slide 1 Overview 1 Introduction q Why are Schemas? 2 Concepts q What are schemas? 3 Schema Languages
More informationXML. XML Namespaces, XML Schema, XSLT
XML XML Namespaces, XML Schema, XSLT Contents XML Namespaces... 2 Namespace Prefixes and Declaration... 3 Multiple Namespace Declarations... 4 Declaring Namespaces in the Root Element... 5 Default Namespaces...
More informationXML Schemas A C U R A D I B E L U S S I A L B E R T O ( E S T R A T T I D A M A T E R I A L E D I S P O N I B I L E S U L S I T O W 3 C )
XML Schemas 1 A C U R A D I B E L U S S I A L B E R T O ( E S T R A T T I D A M A T E R I A L E D I S P O N I B I L E S U L S I T O W 3 C ) H T T P : / / W W W. W 3. O R G / T R / X M L S C H E M A - 0
More informationDTD MIGRATION TO W3C SCHEMA
Chapter 1 Schema Introduction The XML technical specification identified a standard for writing a schema (i.e., an information model) for XML called a document type definition (DTD). 1 DTDs were a carryover
More informationChapter 3 Brief Overview of XML
Slide 3.1 Web Serv vices: Princ ciples & Te echno ology Chapter 3 Brief Overview of XML Mike P. Papazoglou & mikep@uvt.nl Slide 3.2 Topics XML document structure XML schemas reuse Document navigation and
More informationModule 3. XML Schema
Module 3 XML Schema 1 Recapitulation (Module 2) XML as inheriting from the Web history SGML, HTML, XHTML, XML XML key concepts Documents, elements, attributes, text Order, nested structure, textual information
More informationCHAPTER 8. XML Schemas
429ch08 1/11/02 1:20 PM Page 291 CHAPTER 8 XML Schemas MOST OF US WHO ARE INVOLVED in XML development are all too familiar with using Document Type Definition (DTD) to enforce the structure of XML documents.
More informationPart 2: XML and Data Management Chapter 6: Overview of XML
Part 2: XML and Data Management Chapter 6: Overview of XML Prof. Dr. Stefan Böttcher 6. Overview of the XML standards: XML, DTD, XML Schema 7. Navigation in XML documents: XML axes, DOM, SAX, XPath, Tree
More informationWeek 2: Lecture Notes. DTDs and XML Schemas
Week 2: Lecture Notes DTDs and XML Schemas In Week 1, we looked at the structure of an XML document and how to write XML. I trust you have all decided on the editor you prefer. If not, I continue to recommend
More informationXML Schema Profile Definition
XML Schema Profile Definition Authors: Nicholas Routledge, Andrew Goodchild, Linda Bird, DSTC Email: andrewg@dstc.edu.au, bird@dstc.edu.au This document contains the following topics: Topic Page Introduction
More informationXML Schema 3/14/12! XML Schema. Overview
XML Schema Asst. Prof. Dr. Kanda Runapongsa Saikaew (krunapon@kku.ac.th) Dept. of Computer Engineering Khon Kaen University 1 Overview The schema element Referencing a schema in an XML document Simple
More informationThe main problem of DTD s...
The main problem of DTD s... They are not written in XML! Solution: Another XML-based standard: XML Schema For more info see: http://www.w3.org/xml/schema XML Schema (W3C) Thanks to Jussi Pohjolainen TAMK
More informationGrammars for XML Documents XML Schema, Part 1
Grammars for XML Documents XML Schema, Part 1 Lecture "XML in Communication Systems" Chapter 4 Dr.-Ing. Jesper Zedlitz Research Group for Communication Systems Dept. of Computer Science Christian-Albrechts-University
More informationXML. Part II DTD (cont.) and XML Schema
XML Part II DTD (cont.) and XML Schema Attribute Declarations Declare a list of allowable attributes for each element These lists are called ATTLIST declarations Consists of 3 basic parts The ATTLIST keyword
More informationSticky and Proximity XML Schema Files
APPENDIX B Sticky and Proximity XML Schema Files This appendix describes how you can use the two XML schema files, included with the GSS, to describe and validate the sticky XML and proximity XML output
More informationHR-XML Schema Extension Recommendation, 2003 February 26
HR-XML Schema Extension Recommendation, 2003 February 26 This version: HRXMLExtension.doc Previous version: HRXMLExtension-1_0.doc Editor: Paul Kiel, HR-XML, paul@hr-xml.org Authors: Paul Kiel, HR-XML,
More informationQuerying XML Data. Querying XML has two components. Selecting data. Construct output, or transform data
Querying XML Data Querying XML has two components Selecting data pattern matching on structural & path properties typical selection conditions Construct output, or transform data construct new elements
More informationSession [2] Information Modeling with XSD and DTD
Session [2] Information Modeling with XSD and DTD September 12, 2000 Horst Rechner Q&A from Session [1] HTML without XML See Code HDBMS vs. RDBMS What does XDR mean? XML-Data Reduced Utilized in Biztalk
More informationWA2217 Programming Java EE 6 SOAP Web Services with JAX-WS - JBoss / Eclipse EVALUATION ONLY
WA2217 Programming Java EE 6 SOAP Web Services with JAX-WS - JBoss / Eclipse Web Age Solutions Inc. USA: 1-877-517-6540 Canada: 1-866-206-4644 Web: http://www.webagesolutions.com The following terms are
More informationUsing XML Schema. Any good strategy will seem ridiculous by the time it is implemented. Scott Adams (cartoonist, creator of Dilbert)
HOUR 7 Using XML Schema Any good strategy will seem ridiculous by the time it is implemented. Scott Adams (cartoonist, creator of Dilbert) Back in Hour 3, Defining Data with DTD Schemas, you learned how
More informationCA Data Protection. Account Import XML Schema Guide. Release 15.0
CA Data Protection Account Import XML Schema Guide Release 15.0 This Documentation, which includes embedded help systems and electronically distributed materials (hereinafter referred to as the Documentation
More informationXML. Extensible Markup Language
XML Extensible Markup Language Acknowledgements and copyrights: these slides are a result of combination of notes and slides with contributions from: Michael Kiffer, Arthur Bernstein, Philip Lewis, Hanspeter
More information!" DTDs rely on a mechanism based on the use of. !" It is intended to specify cross references" !" Reference to a figure, chapter, section, etc.!
MULTIMEDIA DOCUMENTS! XML Schema (Part 2)"!" DTDs rely on a mechanism based on the use of attributes (ID et IDREF) to specify links into documents"!" It is intended to specify cross references"!" Reference
More information7.1 Introduction. 7.1 Introduction (continued) - Problem with using SGML: - SGML is a meta-markup language
7.1 Introduction - SGML is a meta-markup language - Developed in the early 1980s; ISO std. In 1986 - HTML was developed using SGML in the early 1990s - specifically for Web documents - Two problems with
More informationCS561 Spring Mixed Content
Mixed Content DTDs define mixed content by mixing #PCDATA into the content model DTDs always require mixed content to use the form (#PCDATA a b )* the occurrence of elements in mixed content cannot be
More informationBuilding non-windows applications (programs that only output to the command line and contain no GUI components).
C# and.net (1) Acknowledgements and copyrights: these slides are a result of combination of notes and slides with contributions from: Michael Kiffer, Arthur Bernstein, Philip Lewis, Hanspeter Mφssenbφck,
More informationMore XML Schemas, XSLT, Intro to PHP. CS174 Chris Pollett Oct 15, 2007.
More XML Schemas, XSLT, Intro to PHP CS174 Chris Pollett Oct 15, 2007. Outline XML Schemas XSLT PHP Overview of data types There are two categories of data types in XML Schemas: simple types -- which are
More informationETSI ES V3.3.1 ( ) ETSI Standard
ES 201 873-9 V3.3.1 (2008-07) Standard Methods for Testing and Specification (MTS); The Testing and Test Control Notation version 3; Part 9: Using XML schema with TTCN-3 2 ES 201 873-9 V3.3.1 (2008-07)
More informationETSI STANDARD Methods for Testing and Specification (MTS); The Testing and Test Control Notation version 3; Part 9: Using XML schema with TTCN-3
ES 201 873-9 V4.7.1 (2016-07) STANDARD Methods for Testing and Specification (MTS); The Testing and Test Control Notation version 3; Part 9: Using XML schema with TTCN-3 2 ES 201 873-9 V4.7.1 (2016-07)
More information웹기술및응용. XML Schema 2018 년 2 학기. Instructor: Prof. Young-guk Ha Dept. of Computer Science & Engineering
웹기술및응용 XML Schema 2018 년 2 학기 Instructor: Prof. Young-guk Ha Dept. of Computer Science & Engineering Outline History Comparison with DTD Syntax Definitions and declaration Simple types Namespace Complex
More informationB oth element and attribute declarations can use simple types
Simple types 154 Chapter 9 B oth element and attribute declarations can use simple types to describe the data content of the components. This chapter introduces simple types, and explains how to define
More informationA namespace prefix is defined with a xmlns attribute using the syntax xmlns:prefix="uri".
Question 1 XML Syntax and Basics (a) What are 'namespaces' used for in relation to XML and how are they applied to an XML document?(2 marks) Namespaces are used to avoid element name conflicts when using/mixing
More informationUNIL 2006 XML. Basic Notions A. BOUKOTTAYA
UNIL 2006 XML Basic Notions A. BOUKOTTAYA Evolution of Mark-Up languages GenCode Commitee (1967) GML (1969) Text Processing Systems SGML (Standard Generalized Mark-Up Language) (1986) Draft with Markup
More informationEMERGING TECHNOLOGIES. XML Documents and Schemas for XML documents
EMERGING TECHNOLOGIES XML Documents and Schemas for XML documents Outline 1. Introduction 2. Structure of XML data 3. XML Document Schema 3.1. Document Type Definition (DTD) 3.2. XMLSchema 4. Data Model
More informationX(ml)S(chema)D(definition) Complex Types Indicators
X(ml)S(chema)D(definition) Complex Types Indicators We can control HOW elements are to be used in documents with indicators. Indicators We have seven types of indicators: Order indicators: All Choice Sequence
More informationIntroduction to XML DTD
Introduction to XML DTD What is a DTD? A DTD is usually a file (or several files to be used together) which contains a formal definition of a particular type of document. This sets out what names can be
More informationWhat is XML (extremely Marketed Language) XML, DTD, XML Schema. XML (extensible Markup Language) HTML. Markup
What is XML (extremely Marketed Language) Markup XML, DTD, XML Schema Some slides are from Roger Costello From XML Handbook 1 2 XML (extensible Markup Language) Markup in XML A sequence of characters inserted
More informationInformation technology Multimedia framework (MPEG-21) Part 15: Event Reporting
INTERNATIONAL STANDARD ISO/IEC 21000-15:2006 TECHNICAL CORRIGENDUM 1 Published 2008-02-01 INTERNATIONAL ORGANIZATION FOR STANDARDIZATION МЕЖДУНАРОДНАЯ ОРГАНИЗАЦИЯ ПО СТАНДАРТИЗАЦИИ ORGANISATION INTERNATIONALE
More informationChapter 11 XML Data Modeling. Recent Development for Data Models 2016 Stefan Deßloch
Chapter 11 XML Data Modeling Recent Development for Data Models 2016 Stefan Deßloch Motivation Traditional data models (e.g., relational data model) primarily support structure data separate DB schema
More informationEXAM IN SEMI-STRUCTURED DATA Study Code Student Id Family Name First Name
EXAM IN SEMI-STRUCTURED DATA 184.705 28. 10. 2016 Study Code Student Id Family Name First Name Working time: 100 minutes. Exercises have to be solved on this exam sheet; Additional slips of paper will
More informationXMI Version 1Production of XML Schema Specification
XMI Version 1Production of XML Schema Specification During the finalization phase, the XML Production of XML Schema Final Adopted Specification (ad/2001-12-03) was split into two documents to resolve one
More informationKnowledge Engineering pt. School of Industrial and Information Engineering. Test 2 24 th July Part II. Family name.
School of Industrial and Information Engineering Knowledge Engineering 2012 13 Test 2 24 th July 2013 Part II Family name Given name(s) ID 3 6 pt. Consider the XML language defined by the following schema:
More informationTHE EXTENSIBLE MARKUP LANGUAGE (XML) AS A MEDIUM FOR DATA EXCHANGE
Association for Information Systems AIS Electronic Library (AISeL) AMCIS 2002 Proceedings Americas Conference on Information Systems (AMCIS) December 2002 THE EXTENSIBLE MARKUP LANGUAGE (XML) AS A MEDIUM
More informationasexml SCHEMA CHANGE REQUEST
asexml SCHEMA CHANGE REQUEST PREPARED BY: DOCUMENT REF: SCOTT MASKIEL CR55 VERSION: 1.5 DATE: 5 DECEMBER 2013 DRAFT/FINAL DRAFT Am,ttolion l:nergy 1\_.n,ketOperctor Ltd AeN 94 on Ol'J 327 Wv'IW.oemo.oom.ou
More informationASN1C. ASN.1 Compiler Version 6.4 XSD User s Guide
ASN1C ASN.1 Compiler Version 6.4 XSD User s Guide Objective Systems, Inc. February 2011 The software described in this document is furnished under a license agreement and may be used only in accordance
More informationNebulon FDD Interchange (FDDI) Specification 1
NEBULON FDD INTERCHANGE (FDDI) SPECIFICATION January 19 2006 Nebulon FDD Interchange (FDDI) Specification 1 Copyright 1993-2006, Nebulon Pty. Ltd. Nebulon has agreed that no person shall be deemed to have
More informationCopyright 2007 Ramez Elmasri and Shamkant B. Navathe. Slide 27-1
Slide 27-1 Chapter 27 XML: Extensible Markup Language Chapter Outline Introduction Structured, Semi structured, and Unstructured Data. XML Hierarchical (Tree) Data Model. XML Documents, DTD, and XML Schema.
More informationASN1C. ASN.1 Compiler Version 6.7 XML Schema Translator Users Guide Reference Manual
ASN1C ASN.1 Compiler Version 6.7 XML Schema Translator Users Guide Reference Manual Objective Systems, Inc. version 6.7 May 2014 The software described in this document is furnished under a license agreement
More informationXML and Web Services
XML and Web Services Lecture 8 1 XML (Section 17) Outline XML syntax, semistructured data Document Type Definitions (DTDs) XML Schema Introduction to XML based Web Services 2 Additional Readings on XML
More informationConstraints, Meta UML and XML. Object Constraint Language
Constraints, Meta UML and XML G. Falquet, L. Nerima Object Constraint Language Text language to construct expressions for guards conditions pre/post conditions assertions actions Based on navigation expressions,
More informationXML Schema. Mario Alviano A.Y. 2017/2018. University of Calabria, Italy 1 / 28
1 / 28 XML Schema Mario Alviano University of Calabria, Italy A.Y. 2017/2018 Outline 2 / 28 1 Introduction 2 Elements 3 Simple and complex types 4 Attributes 5 Groups and built-in 6 Import of other schemes
More informationOMA Web Services Enabler (OWSER) Best Practices: WSDL Style Guide
OMA Web Services Enabler (OWSER) Best Practices: WSDL Style Guide Approved Version 1.0 15 Jul 2004 Open Mobile Alliance OMA-OWSER-Best_Practice-WSDL_Style_Guide-V1_0-20040715-A OMA-OWSER-Best_Practice-WSDL_Style_Guide-V1_0-20040715-A
More informationSchema and WSDL Design Checklist
Schema and WSDL Design Quality Assurance Version: 1.0 Final Date: 27/05/2008 Distribution: Process Improvement DISCLAIMER Origo Services Limited believes it has employed personnel using reasonable skill
More informationIntroducing our First Schema
1 di 11 21/05/2006 10.24 Published on XML.com http://www.xml.com/pub/a/2000/11/29/schemas/part1.html See this if you're having trouble printing code examples Using W3C XML By Eric van der Vlist October
More informationAnalysis and Metrics of XML Schema
Analysis and Metrics of XML Schema Andrew McDowell University of Houston- Clear Lake andrew@rendai.com Chris Schmidt University of Houston- Clear Lake chris@rendai.com Kwok-Bun Yue University of Houston-
More informationNotes. Any feedback/suggestions? IS 651: Distributed Systems
Notes Grading statistics Midterm1: average 10.60 out of 15 with stdev 2.22 Total: average 15.46 out of 21 with stdev 2.80 A range: [18.26, 23] B range: [12.66, 18.26) C or worse range: [0, 12.66) The curve
More informationUC Web Service Developer Guide of UC Credit Report. version 1.1 V
UC Web Service Developer Guide of UC Credit Report version 1.1 V. 2015.12.14 Developer Guide of UCCreditReport Web Service Page 2 of 45 Terms description of UCCreditReport Web Service Copyright 2009 UC
More informationCisco Unified IP Phone Services XML Schema File
APPENDIXB Cisco Unified IP Phone Services XML Schema File These sections provide details about the XML schema supported on Cisco Unified IP Phones: Updated XML Parser and Schema Enforcement CiscoIPPhone.xsd
More informationEXAM IN SEMI-STRUCTURED DATA Study Code Student Id Family Name First Name
EXAM IN SEMI-STRUCTURED DATA 184.705 23. 10. 2015 Study Code Student Id Family Name First Name Working time: 100 minutes. Exercises have to be solved on this exam sheet; Additional slips of paper will
More informationCreating Coverage Zone Files
APPENDIXC The following sections describe the Coverage Zone file elements and provide several Coverage Zone file examples: Coverage Zone File Elements, page C-1 Zero-IP Based Configuration, page C-2 Coverage
More informationCisco Unified IP Phone Services XML Schema File
APPENDIXB Cisco Unified IP Phone Services XML Schema File These sections provide details about the XML schema supported on Cisco Unified IP Phones: Updated XML Parser and Schema Enforcement CiscoIPPhone.xsd
More informationAltova XMLSpy 2007 Tutorial
Tutorial All rights reserved. No parts of this work may be reproduced in any form or by any means - graphic, electronic, or mechanical, including photocopying, recording, taping, or information storage
More informationSuccessMaker Data Services API Guide
SuccessMaker 7.0.1 Data Services API Guide Document last updated August 2014 Copyright 2011 2014 Pearson Education, Inc. or one or more of its direct or indirect affiliates. All rights reserved. Pearson
More informationXML. Document Type Definitions XML Schema. Database Systems and Concepts, CSCI 3030U, UOIT, Course Instructor: Jarek Szlichta
XML Document Type Definitions XML Schema 1 XML XML stands for extensible Markup Language. XML was designed to describe data. XML has come into common use for the interchange of data over the Internet.
More informationAltova XMLSpy 2013 Tutorial
Tutorial All rights reserved. No parts of this work may be reproduced in any form or by any means - graphic, electronic, or mechanical, including photocopying, recording, taping, or information storage
More informationSearch Page Basic Search Advanced Search Exploring search results Showing Properties Showing Details...
Tutorials Search and Discovery... 4 Search Page... 4 Basic Search... 4 Advanced Search... 5 Exploring search results... 7 Showing Properties... 8 Showing Details... 9 Showing a Namespace Page... 9 Showing
More informationXML. COSC Dr. Ramon Lawrence. An attribute is a name-value pair declared inside an element. Comments. Page 3. COSC Dr.
COSC 304 Introduction to Database Systems XML Dr. Ramon Lawrence University of British Columbia Okanagan ramon.lawrence@ubc.ca XML Extensible Markup Language (XML) is a markup language that allows for
More informationCMS Note Mailing address: CMS CERN, CH-1211 GENEVA 23, Switzerland
CMS NOTE 2003/xx The Compact Muon Solenoid Experiment CMS Note Mailing address: CMS CERN, CH-1211 GENEVA 23, Switzerland 2003-07-03 Migration of the XML Detector Description Data and Schema to a Relational
More informationHigh-level Operations for Changing Temporal Schema, Conventional Schema and Annotations, in the τxschema Framework
High-level Operations for Changing Temporal Schema, Conventional Schema and Annotations, in the τxschema Framework Zouhaier Brahmia, Fabio Grandi, Barbara Oliboni, Rafik Bouaziz January 15, 2014 TR-96
More informationXML Schema Part 0: Primer
torsdag 6 september 2001 XML Schema Part 0: Primer Page: 1 XML Schema Part 0: Primer W3C Recommendation, 2 May 2001 This version: http://www.w3.org/tr/2001/rec-xmlschema-0-20010502/ Latest version: Previous
More information- XML. - DTDs - XML Schema - XSLT. Web Services. - Well-formedness is a REQUIRED check on XML documents
Purpose of this day Introduction to XML for parliamentary documents (and all other kinds of documents, actually) Prof. Fabio Vitali University of Bologna Introduce the principal aspects of electronic management
More informationJava EE 7: Back-end Server Application Development 4-2
Java EE 7: Back-end Server Application Development 4-2 XML describes data objects called XML documents that: Are composed of markup language for structuring the document data Support custom tags for data
More informationCreation of the adaptive graphic Web interfaces for input and editing data for the heterogeneous information systems on the bases of XML technology
Creation of the adaptive graphic Web interfaces for input and editing data for the heterogeneous information systems on the bases of XML technology A. Mukhitova and O. Zhizhimov Novosibirsk State University,
More informationETSI STANDARD Methods for Testing and Specification (MTS); The Test Description Language (TDL); Part 3: Exchange Format
ES 203 119-3 V1.3.1 (2018-05) STANDARD Methods for Testing and Specification (MTS); The Test Description Language (TDL); Part 3: Exchange Format 2 ES 203 119-3 V1.3.1 (2018-05) Reference RES/MTS-203119-3v1.3.1
More information[MS-WORDLFF]: Word (.xml) Co-Authoring File Format in Document Lock Persistence Structure
[MS-WORDLFF]: Word (.xml) Co-Authoring File Format in Document Lock Persistence Structure Intellectual Property Rights Notice for Open Specifications Documentation Technical Documentation. Microsoft publishes
More informationXML extensible Markup Language
extensible Markup Language Eshcar Hillel Sources: http://www.w3schools.com http://java.sun.com/webservices/jaxp/ learning/tutorial/index.html Tutorial Outline What is? syntax rules Schema Document Object
More informationSoftware Engineering Methods, XML extensible Markup Language. Tutorial Outline. An Example File: Note.xml XML 1
extensible Markup Language Eshcar Hillel Sources: http://www.w3schools.com http://java.sun.com/webservices/jaxp/ learning/tutorial/index.html Tutorial Outline What is? syntax rules Schema Document Object
More informationData Services API Guide SuccessMaker 10
Document last updated July 26, 2017 Copyright 2017 Pearson Education, Inc. or one or more of its direct or indirect affiliates. All rights reserved. Pearson and SuccessMaker are registered trademarks,
More informationData Services API Guide SuccessMaker 9
Document last updated September 22, 2016 Copyright 2016 Pearson Education, Inc. or one or more of its direct or indirect affiliates. All rights reserved. Pearson and SuccessMaker are registered trademarks,
More informationArtix ESB. Writing Artix ESB Contracts. Version 5.5 December 2008
Artix ESB Writing Artix ESB Contracts Version 5.5 December 2008 Writing Artix ESB Contracts Version 5.5 Published 11 Dec 2008 Copyright 2008 IONA Technologies PLC, a wholly-owned subsidiary of Progress
More informationSyntax XML Schema XML Techniques for E-Commerce, Budapest 2004
Mag. iur. Dr. techn. Michael Sonntag Syntax XML Schema XML Techniques for E-Commerce, Budapest 2004 E-Mail: sonntag@fim.uni-linz.ac.at http://www.fim.uni-linz.ac.at/staff/sonntag.htm Michael Sonntag 2004
More informationMarkup Languages. Lecture 4. XML Schema
Markup Languages Lecture 4. XML Schema Introduction to XML Schema XML Schema is an XML-based alternative to DTD. An XML schema describes the structure of an XML document. The XML Schema language is also
More informationInternet Engineering Task Force. Intended status: Informational July 08, 2013 Expires: January 09, 2014
Internet Engineering Task Force E. Haleplidis Internet-Draft University of Patras Intended status: Informational July 08, 2013 Expires: January 09, 2014 Abstract ForCES Model Extension draft-haleplidis-forces-model-extension-04
More informationXML Schema Part 0: Primer Second Edition
Page 1 of 81 XML Schema Part 0: Primer Second Edition W3C Recommendation 28 October 2004 This version: http://www.w3.org/tr/2004/rec-xmlschema-0-20041028/ Latest version: Previous version: http://www.w3.org/tr/2004/per-xmlschema-0-20040318/
More informationXML in Databases. Albrecht Schmidt. al. Albrecht Schmidt, Aalborg University 1
XML in Databases Albrecht Schmidt al@cs.auc.dk http://www.cs.auc.dk/ al Albrecht Schmidt, Aalborg University 1 What is XML? (1) Where is the Life we have lost in living? Where is the wisdom we have lost
More informationXML Design Rules and Conventions (DRC) for the Exchange Network
XML Design s and Conventions (DRC) for the Exchange Network Version: 2.0 Revision Date: 01/12/2010 01/12/2010 Page. 1 THIS PAGE INTENTIONALLY LEFT BLANK 01/12/2010 Table of Contents 1. Introduction...
More informationIBM. XML and Related Technologies Dumps Braindumps Real Questions Practice Test dumps free
000-141 Dumps 000-141 Braindumps 000-141 Real Questions 000-141 Practice Test 000-141 dumps free IBM 000-141 XML and Related Technologies http://killexams.com/pass4sure/exam-detail/000-141 collections
More informationNo Trade Secrets. Microsoft does not claim any trade secret rights in this documentation.
[MS-RDWR]: Intellectual Property Rights Notice for Open Specifications Documentation Technical Documentation. Microsoft publishes Open Specifications documentation for protocols, file formats, languages,
More informationEXAM IN SEMI-STRUCTURED DATA Study Code Student Id Family Name First Name
EXAM IN SEMI-STRUCTURED DATA 184.705 24. 6. 2015 Study Code Student Id Family Name First Name Working time: 100 minutes. Exercises have to be solved on this exam sheet; Additional slips of paper will not
More information