- XML. - DTDs - XML Schema - XSLT. Web Services. - Well-formedness is a REQUIRED check on XML documents

Size: px
Start display at page:

Download "- XML. - DTDs - XML Schema - XSLT. Web Services. - Well-formedness is a REQUIRED check on XML documents"

Transcription

1 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 of documents - What we actually mean by documents (the FRBR hierarchy) - What are the components of documents - What do we mean by data and metadata about documents Introduce some technologies related to electronic management of documents - XML - DTDs - XML Schema - XSLT - RDF and OWL all somehow connected and related to parliamentary documents (but not necessarily only to them) Part 2 Next: An overall view 2/33 SGML HTML XHTML CSS XSLT An overall view XML browser NS XPath XPointer XLink URI XML Schema DOM XSLFO SOAP Java, C, C++, PHP, ASP, Perl, Javascript, VBscript Web Services print Well-formedness and validity They are two different types of correctness in XML language: Well-formedness - This is the basic level, whereby all syntactic and nesting rules are followed but no constraints on vocabulary or containment is checked. - Well-formedness requires no DTD to be assessed, but just an evaluation of the document in and by itself. - Well-formedness is a REQUIRED check on XML documents Validation - Validation is the subsequent level, whereby also constraints on vocabulary and containment are checked - Validation requires a DTD (or an XML schema) - Validation is an OPTIONAL check on XML documents. Next: Well-formedness and validity 3/33 Next: Well-formed XML documents 4/33 Well-formed XML documents An XML document is well-formed if: - All start and end tag match and are correctly nested - A global element exists to contain all the others - Empty elements have a bar at the end of the element: <empty/> - All attributes always use matching quotes or doublequotes: <element att="value"> </element> <element att='value'> </element> - All character entities are explicitly defined A single example of all bad formedness types <article id=art01> <num>1.</num> <title>definitions and application</title> <clause id='art01-cla01"> <p>nothing contained in this Act may be <eol>construed as correct XML.</p> <article id= art02 > <num>2.</num> <title>recognition of incorrect XML</title> <clause id="art02"cla01"> <p>a text may not be <b>in bold, then <i>in bold and italic</b> and then only italic</i>.</p> Next: A single example of all bad formedness types 5/33 Next: and the corresponding well- formed XML fragment 6/33 1

2 and the corresponding wellformed XML fragment <akomantoso> <article id="art01"> <num>1.</num> <title>definitions and application</title> <clause id='art01-cla01'> <p>nothing contained in this Act may be <eol/ >construed as correct XML.</p> <article id="art02"> <num>2.</num> <title>recognition of incorrect XML</title> <clause id='art02"cla01'> <p>a text may not be <b>in bold, then <i>in bold and italic</i></b><i> and then only italic</i>.</p> </akomantoso> XML documents An XML document is always composed of three parts: - XML Declaration - Document Type Declaration (or DOCTYPE) - The document instance Next: XML documents 7/33 Next: A complete XML example 8/33 A complete XML example <?xml version="1.0" encoding="utf-8"?> <!DOCTYPE akomantoso SYSTEM " <akomantoso xmlns=" <article id="art01"> <num>1.</num> <title>definitions and application</title> <clause id='art01-cla01'> <p>nothing contained in this Act may be construed as correct XML.</p> <article id="art02"> <num>2.</num> <title>recognition of incorrect XML</title> <clause id='art02"cla01'> <p>a text may not be <b>in bold, then <i>in bold and italic</i></b><i> and then only italic</i>.</p> </akomantoso> Next: XML Declaration 9/33 XML Declaration <?xml version="1.0" encoding="utf-8" standalone="no"?> The XML declaration is (virtually) required and contains all optional features of XML, that are exactly three: - The XML language version (1.0 or 1.1 but 1.1 is not really used anywhere much) - The character encoding used (we will mostly use UTF-8) - The standalone parameter, used for efficiency purposes If omitted, it need to be considered equivalent to: <?xml version="1.0"?> Next: The Document Type Declaration (or DOCTYPE) 10/33 The Document Type Declaration (or DOCTYPE) <!DOCTYPE akomantoso SYSTEM " The document type declaration specifies the location or contains the validation constraints of the document These validation constraints are called Document Type Definition (or DTD) and are either: - Contained in a file referred to by the DOCTYPE (external subset) - Contained in the DOCTYPE itself (internal subset) - Partly internal and partly external <!DOCTYPE akomantoso [ ELEMENT akomantoso (bill act debaterecord document)>... ]> The document instance The part of document that contains text and markup. Markup is considered composed of elements and attributes. The document instance is checked against the constraints specified in the DTD, if present. This is the validation of the document instance. Next: The document instance 11/33 Next: DTDs 12/33 2

3 Element specification: <!ELEMENT > DTDs <!ELEMENT >: Element definitions <!ATTLIST >: Attribute definitions <!ENTITY % >: Parameter entities <!ELEMENT name content-model > <!ELEMENT act (meta,preface?,preamble?,clauses,attachments?) > The ELEMENT clauses introduces a single element. It specifies the name and the content model of the element. All elements of the specification must be introduced explicitly (but in any order) The content model is the formal specification of the allowed content of the element, in terms of what other elements can appear. The content model can be "ANY", "EMPTY", or a parenthesised expression containing #PCDATA and other XML elements aggregated with simple operators. - Repetition operators (nothing, question mark, plus, star) - Sequence operator (comma, pipe) Next: Content models (1) 14/33 ANY Content models (1) - Any content is allowed. Very general, it is only used when standardisation is impossible. We will not further use it EMPTY - Empty elements appear as simple tags with special ending slash <empty/>. The element is completely constituted by its start tag. It can have attributes, though. <img src="image.gif"/> (#PCDATA) - A (#PCDATA) element only contains text, and no markup whatsoever. Used when using XML to wrap plain text elements. <!ELEMENT title (#PCDATA)> Content model (2) - Operators Repetition Operators: applied at the end of individual elements or parenthesised expressions, they indicate how that token can repeat - Nothing: token is required and non-repeatable: one and only one can be present - Question mark: token is optional and non-repeatable: zero or one can be present - Plus: token is required and repeatable: one or more can be present - Star: token is optional and repeatable: zero, one or more can be present. Sequence Operators: applied in between individual elements or parenthesised expressions, they indicate how these tokens can interact: - Comma: the tokens are in sequence. Tokens need to appear exactly in the order specified - Pipe: the tokens are alternative. Only one token can appear to the exclusion of the other(s). Next: Content model (2) - Operators 15/33 Next: Content models (3) - examples 16/33 Content models (3) - examples <!ELEMENT akomantoso (act bill debaterecord) > <!ELEMENT part (num?, title?, section+) > <!ELEMENT dummy ((first (second, third)*), fourth?)> Parliamentary-relevant content models are hardly ever this complex. Please note that a repeatable alternative (a b k)+ has a very specific interpretation: any specified token can appear any number of times in any order whatsoever. <!ELEMENT part (num?, title?, (part section article)+) > (a+ b+ c+) NOT EQUAL TO (a b c)+ Examples <!ELEMENT dummy ((first (second, third)*), fourth?)> <dummy> <first> </first> <fourth> </fourth> </dummy> <dummy> <second> </second> <third> </third> <second> </second> <third> </third> <fourth> </fourth> </dummy> Next: Examples 17/33 Next: Content models (4) - Mixed content 18/33 3

4 Content models (4) - Mixed content <!ELEMENT p (#PCDATA b i )* > It is sometimes appropriate that an element contain both printable characters and other elements. These elements are defined as having "mixed content". <p>a text may be <b>in bold, or <i>in bold and italic</ i></b>. Or even <i>only in italic</i>.</p> XML DTDs only allow one form of Mixed Content elements: - An optional repeatable alternative (... )* - containing all the allowed elements (... a b c)* - of which #PCDATA must be the first. (#PCDATA a b c)* Attribute specification: <!ATTLIST > <!ATTLIST element-name attribute-name-1 type-1 default-1 attribute-name-2 type-2 default-2 attribute-name-3 type-3 default-3 > <!ATTLIST act contains (Original Single Multiple) 'Original' > <act contains="single">... </act> The ATTLIST clause introduce the definition of a list of attributes for an element. The number of attributes that can be defined for the same element is open. There are four kinds of types and three kinds of defaults Next: Attribute specification: <!ATTLIST > 19/33 Next: Attribute specification: types and defaults 20/33 Attribute specification: types and defaults Attribute specification: examples Types - CDATA: any character string - List: a choice of only the character string listed - ID: a single word that is unique throughout the document - IDREF: a word that is used somewhere in the document as the value for an ID attribute Defaults - A (quoted) explicit value: the specified value - #REQUIRED: no default value, but the attribute is required for validity - #IMPLIED: no default value, and the attribute is not required for validity <!ATTLIST section id ID #REQUIRED status (omissis repealed suspended) #IMPLIED style CDATA #IMPLIED > ID and IDREF attributes are very important in our documents because of the large numbers of internal (and external) references contained in all of them. An ID attribute specifies that elements as an important element that may need to be identified individually. - The unique values across the document see to that An IDREF attribute creates a connection between an element and an important one (e.g. a reference between a note marker and a note) - The existence of the corresponding ID value is required Next: Attribute specification: examples 21/33 Next: Parameter entities: <!ENTITY % > 22/33 Parameter entities: <!ENTITY % > Definition: <!ENTITY % name "value"> Use: %name; Many parts of the DTD are heavily repetitive. Parameter entities simplify the management of repeated fragments. All parts of a DTD can be specified in a parameter entity, but mostly they are used to define content models and attribute lists that are shared by multiple elements. <!ENTITY % HStruct "(meta,preamble?,clauses,attach?)" > <!ENTITY % cont "contains (Original Simple Multiple) 'Original'"> XML Schema <!ELEMENT act %HStruct; > <!ELEMENT bill %HStruct; > <!ATTLIST bill %cont; > Next: XML Schema 23/33 4

5 Modularity XML Schema - A sophisticated and complex mechanism for file-level modularity A sophisticated type hierarchy modeled after object-oriented programming languages to provide for construct-level modularity Namespace management - Namespaces are a controversial but ubiquitous characteristics of reallife XML projects XML Schema explicitly allows namespaces and freely qualified elements and attributes. DTDs cannot really handle namespaces. Improved constraints on elements and attributes - Types allow greater control on text values. Improved management of element structures and mixed content are also available. Explicit documentation - Schema fragments can be explcitly commented for easier reading XML Syntax - Makes for much longer files, but allow all sorts of different tools to be used on schemas (e.g. presentation and verification). Next: Types 25/33 Types All element content and attribute values must comply to constraints specified in types (more sophisticated than content models) Simple types - Simple strings that match constraints as to their values. Strings, integers, dates, times, URIs, etc predefined simple types that can be refined adding further constraints (such as allowed values, min and max length, etc.) Complex Types - Element structures that match constraints as to their containment. Similar to content models, but shared among differently named elements. - Same constraints as content models plus a few more functionalities for mixed content and sequencing). - No predefined types, but sophisticated mechanisms for customization Next: Defining elements and attributes 26/33 Defining elements and attributes <xsd:complextype name="doctypes" > <xsd:choice> <xsd:element name="act" type="hstruct"/> <xsd:element name="bill" type="hstruct"/> <xsd:element name="doc" type="hstruct"/> <xsd:element name="report" type="hstruct"/> </xsd:choice> </xsd:complextype> <xsd:element name="akomantoso" type="doctypes" /> <xsd:simpletype name="versiontype" > <xsd:restriction base="xsd:string"> <xsd:enumeration value="original" /> <xsd:enumeration value="single" /> <xsd:enumeration value="multiple" /> </xsd:restriction> </xsd:simpletype> <xsd:attribute name="contains" type="versiontype" default="original" /> Next: Mixed content model 27/33 Mixed content model XML schema allows any constraint on mixed content elements, as long as they allow text anywhere where elements can be. <xsd:element name="dummy" type="dummy1"/> <xsd:complextype name="dummy1" mixed="true"> <xsd:sequence> <xsd:element name="first" type="xsd:string"/> <xsd:element name="second" type="xsd:string"/> <xsd:element name="third" type="xsd:string"/> </xsd:sequence> </xsd:complextype> In this case, the content model requires a sequence of first, second and third, but they can have text anywhere. This cannot be done with DTDs. Next: XSLT 28/33 XSLT XSLT XSLT stands for Extensible Stylesheet Language, Transformation It is the most important mechanism for displaying XML documents (on paper or on browsers) The idea is to use XSLT to convert XML documents into something that can be understood by the presentation engine - For browsers, the language that all understand is XHTML, therefore XSLT convert XML documents into XHTML - For print, the most common language is XSL-FO (Formatting Object) that can be used to create PDF files. Each element of the XML file is associated to a rule that tells how to convert it into something visible. The collections of all rules is the XSLT document. Next: XSLT - an example 30/33 5

6 XSLT - an example <xsl:template match="ref"> <a> <xsl:apply-templates select="@href" /> <xsl:apply-templates /> </a> </xsl:template> Next After the break we shall do some exercises on: - The syntax of DTDs - The basic ideas of XML Schema - The fundamental concepts of XSLT Converts an Akoma Ntoso <ref> element into an XHTML <a href> element, which is a hypertext link for browsers. <xsl:apply-templates select="@href" /> selectes the href attribute and transforms it into another (slightly different) href attribute. The is from a special language, called XPath, that allows expressions to refer to the elements and attributes of an XML document. <xsl:apply templates/> tries to transform the content of the <ref> element by looking in the XSLT stylesheet for the most appropriate rule. Next: Next 31/33 Next: Conclusions 32/33 Conclusions Markup languages are necessary for enriching data with information about the usages and the applications that can use the data Descriptive markup is the best starting point for the creation of new markup languages. XML is best among markup languages for several reasons: - It is a non proprietary, widely accepted standard - It is structured, hierarchical, descriptive - It allows both prescriptive and descriptive approaches - Tools exist in all operating systems and computer architectures. Fine presentazione 33/33 6

- What we actually mean by documents (the FRBR hierarchy) - What are the components of documents

- What we actually mean by documents (the FRBR hierarchy) - What are the components of documents Purpose of these slides Introduction to XML for parliamentary documents (and all other kinds of documents, actually) Prof. Fabio Vitali University of Bologna Part 1 Introduce the principal aspects of electronic

More information

Copyright 2008 Pearson Education, Inc. Publishing as Pearson Addison-Wesley. Chapter 7 XML

Copyright 2008 Pearson Education, Inc. Publishing as Pearson Addison-Wesley. Chapter 7 XML Chapter 7 XML 7.1 Introduction extensible Markup Language Developed from SGML A meta-markup language Deficiencies of HTML and SGML Lax syntactical rules Many complex features that are rarely used HTML

More information

7.1 Introduction. extensible Markup Language Developed from SGML A meta-markup language Deficiencies of HTML and SGML

7.1 Introduction. extensible Markup Language Developed from SGML A meta-markup language Deficiencies of HTML and SGML 7.1 Introduction extensible Markup Language Developed from SGML A meta-markup language Deficiencies of HTML and SGML Lax syntactical rules Many complex features that are rarely used HTML is a markup language,

More information

IBM. XML and Related Technologies Dumps Braindumps Real Questions Practice Test dumps free

IBM. 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 information

EXAM IN SEMI-STRUCTURED DATA Study Code Student Id Family Name First Name

EXAM 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 information

XML. Objectives. Duration. Audience. Pre-Requisites

XML. Objectives. Duration. Audience. Pre-Requisites XML XML - extensible Markup Language is a family of standardized data formats. XML is used for data transmission and storage. Common applications of XML include business to business transactions, web services

More information

Introduction to XML. XML: basic elements

Introduction to XML. XML: basic elements Introduction to XML XML: basic elements XML Trying to wrap your brain around XML is sort of like trying to put an octopus in a bottle. Every time you think you have it under control, a new tentacle shows

More information

More 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. 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 information

Structured documents

Structured documents Structured documents An overview of XML Structured documents Michael Houghton 15/11/2000 Unstructured documents Broadly speaking, text and multimedia document formats can be structured or unstructured.

More information

XML: Introduction. !important Declaration... 9:11 #FIXED... 7:5 #IMPLIED... 7:5 #REQUIRED... Directive... 9:11

XML: Introduction. !important Declaration... 9:11 #FIXED... 7:5 #IMPLIED... 7:5 #REQUIRED... Directive... 9:11 !important Declaration... 9:11 #FIXED... 7:5 #IMPLIED... 7:5 #REQUIRED... 7:4 @import Directive... 9:11 A Absolute Units of Length... 9:14 Addressing the First Line... 9:6 Assigning Meaning to XML Tags...

More information

SDPL : XML Basics 2. SDPL : XML Basics 1. SDPL : XML Basics 4. SDPL : XML Basics 3. SDPL : XML Basics 5

SDPL : XML Basics 2. SDPL : XML Basics 1. SDPL : XML Basics 4. SDPL : XML Basics 3. SDPL : XML Basics 5 2 Basics of XML and XML documents 2.1 XML and XML documents Survivor's Guide to XML, or XML for Computer Scientists / Dummies 2.1 XML and XML documents 2.2 Basics of XML DTDs 2.3 XML Namespaces XML 1.0

More information

COMP9321 Web Application Engineering

COMP9321 Web Application Engineering COMP9321 Web Application Engineering Semester 2, 2015 Dr. Amin Beheshti Service Oriented Computing Group, CSE, UNSW Australia Week 4 http://webapps.cse.unsw.edu.au/webcms2/course/index.php?cid=2411 1 Extensible

More information

The XML Metalanguage

The XML Metalanguage The XML Metalanguage Mika Raento mika.raento@cs.helsinki.fi University of Helsinki Department of Computer Science Mika Raento The XML Metalanguage p.1/442 2003-09-15 Preliminaries Mika Raento The XML Metalanguage

More information

XML: Extensible Markup Language

XML: Extensible Markup Language XML: Extensible Markup Language CSC 375, Fall 2015 XML is a classic political compromise: it balances the needs of man and machine by being equally unreadable to both. Matthew Might Slides slightly modified

More information

Chapter 1: Getting Started. You will learn:

Chapter 1: Getting Started. You will learn: Chapter 1: Getting Started SGML and SGML document components. What XML is. XML as compared to SGML and HTML. XML format. XML specifications. XML architecture. Data structure namespaces. Data delivery,

More information

Session [2] Information Modeling with XSD and DTD

Session [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 information

XML Applications. Prof. Andrea Omicini DEIS, Ingegneria Due Alma Mater Studiorum, Università di Bologna a Cesena

XML Applications. Prof. Andrea Omicini DEIS, Ingegneria Due Alma Mater Studiorum, Università di Bologna a Cesena XML Applications Prof. Andrea Omicini DEIS, Ingegneria Due Alma Mater Studiorum, Università di Bologna a Cesena Outline XHTML XML Schema XSL & XSLT Other XML Applications 2 XHTML HTML vs. XML HTML Presentation

More information

CSI 3140 WWW Structures, Techniques and Standards. Representing Web Data: XML

CSI 3140 WWW Structures, Techniques and Standards. Representing Web Data: XML CSI 3140 WWW Structures, Techniques and Standards Representing Web Data: XML XML Example XML document: An XML document is one that follows certain syntax rules (most of which we followed for XHTML) Guy-Vincent

More information

Information Systems. DTD and XML Schema. Nikolaj Popov

Information 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 information

What is XML? XML is designed to transport and store data.

What is XML? XML is designed to transport and store data. What is XML? XML stands for extensible Markup Language. XML is designed to transport and store data. HTML was designed to display data. XML is a markup language much like HTML XML was designed to carry

More information

A tutorial report for SENG Agent Based Software Engineering. Course Instructor: Dr. Behrouz H. Far. XML Tutorial.

A tutorial report for SENG Agent Based Software Engineering. Course Instructor: Dr. Behrouz H. Far. XML Tutorial. A tutorial report for SENG 609.22 Agent Based Software Engineering Course Instructor: Dr. Behrouz H. Far XML Tutorial Yanan Zhang Department of Electrical and Computer Engineering University of Calgary

More information

COMP9321 Web Application Engineering. Extensible Markup Language (XML)

COMP9321 Web Application Engineering. Extensible Markup Language (XML) COMP9321 Web Application Engineering Extensible Markup Language (XML) Dr. Basem Suleiman Service Oriented Computing Group, CSE, UNSW Australia Semester 1, 2016, Week 4 http://webapps.cse.unsw.edu.au/webcms2/course/index.php?cid=2442

More information

extensible Markup Language

extensible Markup Language extensible Markup Language XML is rapidly becoming a widespread method of creating, controlling and managing data on the Web. XML Orientation XML is a method for putting structured data in a text file.

More information

Part 2: XML and Data Management Chapter 6: Overview of XML

Part 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 information

CountryData Technologies for Data Exchange. Introduction to XML

CountryData 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 information

Delivery Options: Attend face-to-face in the classroom or remote-live attendance.

Delivery Options: Attend face-to-face in the classroom or remote-live attendance. XML Programming Duration: 5 Days Price: $2795 *California residents and government employees call for pricing. Discounts: We offer multiple discount options. Click here for more info. Delivery Options:

More information

Delivery Options: Attend face-to-face in the classroom or via remote-live attendance.

Delivery Options: Attend face-to-face in the classroom or via remote-live attendance. XML Programming Duration: 5 Days US Price: $2795 UK Price: 1,995 *Prices are subject to VAT CA Price: CDN$3,275 *Prices are subject to GST/HST Delivery Options: Attend face-to-face in the classroom or

More information

XML. extensible Markup Language. Overview. Overview. Overview XML Components Document Type Definition (DTD) Attributes and Tags An XML schema

XML. extensible Markup Language. Overview. Overview. Overview XML Components Document Type Definition (DTD) Attributes and Tags An XML schema XML extensible Markup Language An introduction in XML and parsing XML Overview XML Components Document Type Definition (DTD) Attributes and Tags An XML schema 3011 Compiler Construction 2 Overview Overview

More information

Web Programming Paper Solution (Chapter wise)

Web Programming Paper Solution (Chapter wise) What is valid XML document? Design an XML document for address book If in XML document All tags are properly closed All tags are properly nested They have a single root element XML document forms XML tree

More information

XML. COSC Dr. Ramon Lawrence. An attribute is a name-value pair declared inside an element. Comments. Page 3. COSC Dr.

XML. 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 information

EXAM IN SEMI-STRUCTURED DATA Study Code Student Id Family Name First Name

EXAM IN SEMI-STRUCTURED DATA Study Code Student Id Family Name First Name EXAM IN SEMI-STRUCTURED DATA 184.705 10. 01. 2017 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 information

XML. Jonathan Geisler. April 18, 2008

XML. Jonathan Geisler. April 18, 2008 April 18, 2008 What is? IS... What is? IS... Text (portable) What is? IS... Text (portable) Markup (human readable) What is? IS... Text (portable) Markup (human readable) Extensible (valuable for future)

More information

Copyright 2007 Ramez Elmasri and Shamkant B. Navathe. Slide 27-1

Copyright 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 information

Outline. XML vs. HTML and Well Formed vs. Valid. XML Overview. CSC309 Tutorial --XML 4. Edward Xia

Outline. XML vs. HTML and Well Formed vs. Valid. XML Overview. CSC309 Tutorial --XML 4. Edward Xia CSC309 Tutorial XML Edward Xia November 7, 2003 Outline XML Overview XML DOCTYPE Element Declarations Attribute List Declarations Entity Declarations CDATA Stylesheet PI XML Namespaces A Complete Example

More information

Comp 336/436 - Markup Languages. Fall Semester Week 4. Dr Nick Hayward

Comp 336/436 - Markup Languages. Fall Semester Week 4. Dr Nick Hayward Comp 336/436 - Markup Languages Fall Semester 2018 - Week 4 Dr Nick Hayward XML - recap first version of XML became a W3C Recommendation in 1998 a useful format for data storage and exchange config files,

More information

~ Ian Hunneybell: DIA Revision Notes ~

~ Ian Hunneybell: DIA Revision Notes ~ XML is based on open standards, and is text-based, thereby making it accessible to all. It is extensible, thus allowing anyone to customise it for their own needs, to publish for others to use, and to

More information

Introduction to XML Zdeněk Žabokrtský, Rudolf Rosa

Introduction to XML Zdeněk Žabokrtský, Rudolf Rosa NPFL092 Technology for Natural Language Processing Introduction to XML Zdeněk Žabokrtský, Rudolf Rosa November 28, 2018 Charles Univeristy in Prague Faculty of Mathematics and Physics Institute of Formal

More information

COMP9321 Web Application Engineering

COMP9321 Web Application Engineering COMP9321 Web Application Engineering Semester 2, 2017 Dr. Amin Beheshti Service Oriented Computing Group, CSE, UNSW Australia Week 4 http://webapps.cse.unsw.edu.au/webcms2/course/index.php?cid= 2465 1

More information

7.1 Introduction. 7.1 Introduction (continued) - Problem with using SGML: - SGML is a meta-markup language

7.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 information

Using UML To Define XML Document Types

Using UML To Define XML Document Types Using UML To Define XML Document Types W. Eliot Kimber ISOGEN International, A DataChannel Company Created On: 10 Dec 1999 Last Revised: 14 Jan 2000 Defines a convention for the use of UML to define XML

More information

Intro to XML. Borrowed, with author s permission, from:

Intro to XML. Borrowed, with author s permission, from: Intro to XML Borrowed, with author s permission, from: http://business.unr.edu/faculty/ekedahl/is389/topic3a ndroidintroduction/is389androidbasics.aspx Part 1: XML Basics Why XML Here? You need to understand

More information

EMERGING TECHNOLOGIES. XML Documents and Schemas for XML documents

EMERGING 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 information

XML Introduction 1. XML Stands for EXtensible Mark-up Language (XML). 2. SGML Electronic Publishing challenges -1986 3. HTML Web Presentation challenges -1991 4. XML Data Representation challenges -1996

More information

HTML 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

HTML 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 information

Data Presentation and Markup Languages

Data Presentation and Markup Languages Data Presentation and Markup Languages MIE456 Tutorial Acknowledgements Some contents of this presentation are borrowed from a tutorial given at VLDB 2000, Cairo, Agypte (www.vldb.org) by D. Florescu &.

More information

The concept of DTD. DTD(Document Type Definition) Why we need DTD

The concept of DTD. DTD(Document Type Definition) Why we need DTD Contents Topics The concept of DTD Why we need DTD The basic grammar of DTD The practice which apply DTD in XML document How to write DTD for valid XML document The concept of DTD DTD(Document Type Definition)

More information

XML. XML Namespaces, XML Schema, XSLT

XML. 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 information

Question Bank XML (Solved/Unsolved) Q.1 Fill in the Blanks: (1 Mark each)

Question Bank XML (Solved/Unsolved) Q.1 Fill in the Blanks: (1 Mark each) Q.1 Fill in the Blanks: (1 Mark each) 1. With XML, you can create your own elements, also called tags. 2. The beginning or first element in XML is called the root (document) element. 3. Jon Bosak is known

More information

W3C XML XML Overview

W3C XML XML Overview Overview Jaroslav Porubän 2008 References Tutorials, http://www.w3schools.com Specifications, World Wide Web Consortium, http://www.w3.org David Hunter, et al.: Beginning, 4th Edition, Wrox, 2007, 1080

More information

XML. extensible Markup Language. ... and its usefulness for linguists

XML. extensible Markup Language. ... and its usefulness for linguists XML extensible Markup Language... and its usefulness for linguists Thomas Mayer thomas.mayer@uni-konstanz.de Fachbereich Sprachwissenschaft, Universität Konstanz Seminar Computerlinguistik II (Miriam Butt)

More information

Shankersinh Vaghela Bapu Institue of Technology

Shankersinh Vaghela Bapu Institue of Technology Branch: - 6th Sem IT Year/Sem : - 3rd /2014 Subject & Subject Code : Faculty Name : - Nitin Padariya Pre Upload Date: 31/12/2013 Submission Date: 9/1/2014 [1] Explain the need of web server and web browser

More information

Introduction Syntax and Usage XML Databases Java Tutorial XML. November 5, 2008 XML

Introduction Syntax and Usage XML Databases Java Tutorial XML. November 5, 2008 XML Introduction Syntax and Usage Databases Java Tutorial November 5, 2008 Introduction Syntax and Usage Databases Java Tutorial Outline 1 Introduction 2 Syntax and Usage Syntax Well Formed and Valid Displaying

More information

XML Metadata Standards and Topic Maps

XML Metadata Standards and Topic Maps XML Metadata Standards and Topic Maps Erik Wilde 16.7.2001 XML Metadata Standards and Topic Maps 1 Outline what is XML? a syntax (not a data model!) what is the data model behind XML? XML Information Set

More information

The CEN Metalex Naming Convention

The CEN Metalex Naming Convention The CEN Metalex Naming Convention Fabio Vitali University of Bologna CEN Metalex CEN Metalex has been an international effort to create an interchange format between national XML formats for legislation.

More information

XML: Managing with the Java Platform

XML: Managing with the Java Platform In order to learn which questions have been answered correctly: 1. Print these pages. 2. Answer the questions. 3. Send this assessment with the answers via: a. FAX to (212) 967-3498. Or b. Mail the answers

More information

XML 2 APPLICATION. Chapter SYS-ED/ COMPUTER EDUCATION TECHNIQUES, INC.

XML 2 APPLICATION. Chapter SYS-ED/ COMPUTER EDUCATION TECHNIQUES, INC. XML 2 APPLIATION hapter SYS-ED/ OMPUTER EDUATION TEHNIQUES, IN. Objectives You will learn: How to create an XML document. The role of the document map, prolog, and XML declarations. Standalone declarations.

More information

Contents. 1 Introduction Basic XML concepts Historical perspectives Query languages Contents... 2

Contents. 1 Introduction Basic XML concepts Historical perspectives Query languages Contents... 2 XML Retrieval 1 2 Contents Contents......................................................................... 2 1 Introduction...................................................................... 5 2 Basic

More information

Comp 336/436 - Markup Languages. Fall Semester Week 4. Dr Nick Hayward

Comp 336/436 - Markup Languages. Fall Semester Week 4. Dr Nick Hayward Comp 336/436 - Markup Languages Fall Semester 2017 - Week 4 Dr Nick Hayward XML - recap first version of XML became a W3C Recommendation in 1998 a useful format for data storage and exchange config files,

More information

XML Overview, part 1

XML Overview, part 1 XML Overview, part 1 Norman Gray Revision 1.4, 2002/10/30 XML Overview, part 1 p.1/28 Contents The who, what and why XML Syntax Programming with XML Other topics The future http://www.astro.gla.ac.uk/users/norman/docs/

More information

XML Extensible Markup Language

XML Extensible Markup Language XML Extensible Markup Language Generic format for structured representation of data. DD1335 (Lecture 9) Basic Internet Programming Spring 2010 1 / 34 XML Extensible Markup Language Generic format for structured

More information

IT2353 WEB TECHNOLOGY Question Bank UNIT I 1. What is the difference between node and host? 2. What is the purpose of routers? 3. Define protocol. 4.

IT2353 WEB TECHNOLOGY Question Bank UNIT I 1. What is the difference between node and host? 2. What is the purpose of routers? 3. Define protocol. 4. IT2353 WEB TECHNOLOGY Question Bank UNIT I 1. What is the difference between node and host? 2. What is the purpose of routers? 3. Define protocol. 4. Why are the protocols layered? 5. Define encapsulation.

More information

Markup Languages SGML, HTML, XML, XHTML. CS 431 February 13, 2006 Carl Lagoze Cornell University

Markup Languages SGML, HTML, XML, XHTML. CS 431 February 13, 2006 Carl Lagoze Cornell University Markup Languages SGML, HTML, XML, XHTML CS 431 February 13, 2006 Carl Lagoze Cornell University Problem Richness of text Elements: letters, numbers, symbols, case Structure: words, sentences, paragraphs,

More information

Week 2: Lecture Notes. DTDs and XML Schemas

Week 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 information

Web Systems & Technologies: An Introduction

Web Systems & Technologies: An Introduction Web Systems & Technologies: An Introduction Prof. Ing. Andrea Omicini Ingegneria Due, Università di Bologna a Cesena andrea.omicini@unibo.it 2005-2006 Web Systems Architecture Basic architecture information

More information

UR what? ! URI: Uniform Resource Identifier. " Uniquely identifies a data entity " Obeys a specific syntax " schemename:specificstuff

UR what? ! URI: Uniform Resource Identifier.  Uniquely identifies a data entity  Obeys a specific syntax  schemename:specificstuff CS314-29 Web Protocols URI, URN, URL Internationalisation Role of HTML and XML HTTP and HTTPS interacting via the Web UR what? URI: Uniform Resource Identifier Uniquely identifies a data entity Obeys a

More information

2009 Martin v. Löwis. Data-centric XML. XML Syntax

2009 Martin v. Löwis. Data-centric XML. XML Syntax Data-centric XML XML Syntax 2 What Is XML? Extensible Markup Language Derived from SGML (Standard Generalized Markup Language) Two goals: large-scale electronic publishing exchange of wide variety of data

More information

EXAM IN SEMI-STRUCTURED DATA Study Code Student Id Family Name First Name

EXAM 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

Introduction to XML. When talking about XML, here are some terms that would be helpful:

Introduction to XML. When talking about XML, here are some terms that would be helpful: Introduction to XML XML stands for the extensible Markup Language. It is a new markup language, developed by the W3C (World Wide Web Consortium), mainly to overcome limitations in HTML. HTML is an immensely

More information

Technology for the Rest of Us: XML. May 26, 2004 Columbus, Ohio

Technology for the Rest of Us: XML. May 26, 2004 Columbus, Ohio Technology for the Rest of Us: XML May 26, 2004 Columbus, Ohio Ron Gilmour Science & Technology Coordinator Hodges Library, University of Tennesee at Knoxville gilmour@lib.utk.edu Presentation Materials

More information

Author: Irena Holubová Lecturer: Martin Svoboda

Author: Irena Holubová Lecturer: Martin Svoboda NPRG036 XML Technologies Lecture 1 Introduction, XML, DTD 19. 2. 2018 Author: Irena Holubová Lecturer: Martin Svoboda http://www.ksi.mff.cuni.cz/~svoboda/courses/172-nprg036/ Lecture Outline Introduction

More information

Solutions. a. Yes b. No c. Cannot be determined without the DTD. d. Schema. 9. Explain the term extensible. 10. What is an attribute?

Solutions. a. Yes b. No c. Cannot be determined without the DTD. d. Schema. 9. Explain the term extensible. 10. What is an attribute? Chapter 7: Information Representation Method XML Solutions Summative Assessment Multiple-Choice Questions (MCQs) 1. XML was developed to overcome the limitations of the markup language. a. EDI b. SGML

More information

extensible Markup Language (XML) Basic Concepts

extensible Markup Language (XML) Basic Concepts (XML) Basic Concepts Giuseppe Della Penna Università degli Studi di L Aquila dellapenna@univaq.it http://www.di.univaq.it/gdellape This work is licensed under the Creative Commons Attribution-NonCommercial-ShareAlike

More information

Web Systems & Technologies: An Introduction

Web Systems & Technologies: An Introduction Web Systems & Technologies: An Introduction Prof. Ing. Andrea Omicini Ingegneria Due, Università di Bologna a Cesena andrea.omicini@unibo.it 2006-2007 Web Systems Architecture Basic architecture information

More information

Table of Contents WWW. WWW history (2) WWW history (1) WWW history. Basic concepts. World Wide Web Aka The Internet. Client side.

Table of Contents WWW. WWW history (2) WWW history (1) WWW history. Basic concepts. World Wide Web Aka The Internet. Client side. Table of Contents WWW World Wide Web Aka The Internet Karst Koymans Informatics Institute University of Amsterdam (version 44, 2014/10/06 11:35:56 UTC) Tuesday, October 7, 2014 WWW history Basic concepts

More information

Semistructured data, XML, DTDs

Semistructured data, XML, DTDs Semistructured data, XML, DTDs Introduction to Databases Manos Papagelis Thanks to Ryan Johnson, John Mylopoulos, Arnold Rosenbloom and Renee Miller for material in these slides Structured vs. unstructured

More information

XML. Rodrigo García Carmona Universidad San Pablo-CEU Escuela Politécnica Superior

XML. Rodrigo García Carmona Universidad San Pablo-CEU Escuela Politécnica Superior XML Rodrigo García Carmona Universidad San Pablo-CEU Escuela Politécnica Superior XML INTRODUCTION 2 THE XML LANGUAGE XML: Extensible Markup Language Standard for the presentation and transmission of information.

More information

TagSoup: A SAX parser in Java for nasty, ugly HTML. John Cowan

TagSoup: A SAX parser in Java for nasty, ugly HTML. John Cowan TagSoup: A SAX parser in Java for nasty, ugly HTML John Cowan (cowan@ccil.org) Copyright This presentation is: Copyright 2002 John Cowan Licensed under the GNU General Public License ABSOLUTELY WITHOUT

More information

Introduction to XML the Language of Web Services

Introduction to XML the Language of Web Services Introduction to XML the Language of Web Services Tony Obermeit Senior Development Manager, Wed ADI Group Oracle Corporation Introduction to XML In this presentation, we will be discussing: 1) The origins

More information

XML DTDs and Namespaces. CS174 Chris Pollett Oct 3, 2007.

XML 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 information

Introduction to XML (Extensible Markup Language)

Introduction to XML (Extensible Markup Language) Introduction to XML (Extensible Markup Language) 1 History and References XML is a meta-language, a simplified form of SGML (Standard Generalized Markup Language) XML was initiated in large parts by Jon

More information

.. Cal Poly CPE/CSC 366: Database Modeling, Design and Implementation Alexander Dekhtyar..

.. Cal Poly CPE/CSC 366: Database Modeling, Design and Implementation Alexander Dekhtyar.. .. Cal Poly CPE/CSC 366: Database Modeling, Design and Implementation Alexander Dekhtyar.. XML in a Nutshell XML, extended Markup Language is a collection of rules for universal markup of data. Brief History

More information

XML - Schema. Mario Arrigoni Neri

XML - 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 information

Chapter 1: Semistructured Data Management XML

Chapter 1: Semistructured Data Management XML Chapter 1: Semistructured Data Management XML XML - 1 The Web has generated a new class of data models, which are generally summarized under the notion semi-structured data models. The reasons for that

More information

Introduction to XML. University of California, Santa Cruz Extension Computer and Information Technology

Introduction to XML. University of California, Santa Cruz Extension Computer and Information Technology Introduction to XML University of California, Santa Cruz Extension Computer and Information Technology Presented by: Bennett Smith bennettsmith@idevelopsoftware.com Introduction Answer the question What

More information

Java EE 7: Back-end Server Application Development 4-2

Java 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 information

516. XSLT. Prerequisites. Version 1.2

516. XSLT. Prerequisites. Version 1.2 516. XSLT Version 1.2 This comprehensive four-day course develops in-depth knowledge and skills in transforming XML documents using extensible Stylesheet Language Transformations, or XSLT. Students work

More information

Constructing a Document Type Definition (DTD) for XML

Constructing a Document Type Definition (DTD) for XML Constructing a Document Type Definition (DTD) for XML Abstract John W. Shipman 2013-08-24 12:16 Describes the Document Type Definition notation for describing the schema of an SGML or XML document type.

More information

Tutorial 1 Getting Started with HTML5. HTML, CSS, and Dynamic HTML 5 TH EDITION

Tutorial 1 Getting Started with HTML5. HTML, CSS, and Dynamic HTML 5 TH EDITION Tutorial 1 Getting Started with HTML5 HTML, CSS, and Dynamic HTML 5 TH EDITION Objectives Explore the history of the Internet, the Web, and HTML Compare the different versions of HTML Study the syntax

More information

XML & Related Languages

XML & Related Languages Unit 1 1 Introduction: XML XML = extensible Markup Language the universal format for structured documents and data on the Web. www.w3c.org/xml simple, very flexible text format derived from SGML (ISO 8879).

More information

Chapter 10: Understanding the Standards

Chapter 10: Understanding the Standards Disclaimer: All words, pictures are adopted from Learning Web Design (3 rd eds.) by Jennifer Niederst Robbins, published by O Reilly 2007. Chapter 10: Understanding the Standards CSc2320 In this chapter

More information

EXAM IN SEMI-STRUCTURED DATA Study Code Student Id Family Name First Name

EXAM IN SEMI-STRUCTURED DATA Study Code Student Id Family Name First Name EXAM IN SEMI-STRUCTURED DATA 184.705 12. 01. 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 information

Exam : Title : XML 1.1 and Related Technologies. Version : DEMO

Exam : Title : XML 1.1 and Related Technologies. Version : DEMO Exam : 000-142 Title : XML 1.1 and Related Technologies Version : DEMO 1. XML data is stored and retrieved within a relational database for a data-centric application by means of mapping XML schema elements

More information

MASTER OF SCIENCE THESIS

MASTER OF SCIENCE THESIS MASTER OF SCIENCE THESIS XML to RDBMS By Magnus Karlsson (mka@corus.se) Stockholm, September 2000 Supervisor: Torbjörn Ryeng and Peter Monthan Corus Technologies AB Birger Jarlsgatan 20, 11434 Stockholm

More information

Introduction to XML. Chapter 133

Introduction to XML. Chapter 133 Chapter 133 Introduction to XML A. Multiple choice questions: 1. Attributes in XML should be enclosed within. a. single quotes b. double quotes c. both a and b d. none of these c. both a and b 2. Which

More information

Chapter 3 Brief Overview of XML

Chapter 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 information

HTML is a mark-up language, in that it specifies the roles the different parts of the document are to play.

HTML is a mark-up language, in that it specifies the roles the different parts of the document are to play. Introduction to HTML (5) HTML is a mark-up language, in that it specifies the roles the different parts of the document are to play. For example you may specify which section of a document is a top level

More information

Web Standards Mastering HTML5, CSS3, and XML

Web Standards Mastering HTML5, CSS3, and XML Web Standards Mastering HTML5, CSS3, and XML Leslie F. Sikos, Ph.D. orders-ny@springer-sbm.com www.springeronline.com rights@apress.com www.apress.com www.apress.com/bulk-sales www.apress.com Contents

More information

Create web pages in HTML with a text editor, following the rules of XHTML syntax and using appropriate HTML tags Create a web page that includes

Create web pages in HTML with a text editor, following the rules of XHTML syntax and using appropriate HTML tags Create a web page that includes CMPT 165 INTRODUCTION TO THE INTERNET AND THE WORLD WIDE WEB By Hassan S. Shavarani UNIT2: MARKUP AND HTML 1 IN THIS UNIT YOU WILL LEARN THE FOLLOWING Create web pages in HTML with a text editor, following

More information

HTML and XML. XML stands for extensible Markup Language

HTML and XML. XML stands for extensible Markup Language HTML and XML XML stands for extensible Markup Language HTML is used to mark up text so it can be displayed to users HTML describes both structure (e.g. , , ) and appearance (e.g. , ,

More information

Querying XML Data. Querying XML has two components. Selecting data. Construct output, or transform data

Querying 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 information