Structured-Document Processing Languages Spring 2004 Course Review Repetitio mater studiorum est!

Slides:



Advertisements
Similar presentations
XML: Extensible Markup Language
Advertisements

ISO DSDL ISO – Document Schema Definition Languages (DSDL) Martin Bryan Convenor, JTC1/SC18 WG1.
SDPL 2003Notes 2: Document Instances and Grammars1 2.5 XML Schemas n A quick introduction to XML Schema –W3C Recommendation, May 2, 2001: »XML Schema Part.
SDPL 2002Notes 3: XML Processor Interfaces1 3.3 JAXP: Java API for XML Processing n How can applications use XML processors? –A Java-based answer: through.
SDPL 2003Notes 3: XML Processor Interfaces1 3.3 JAXP: Java API for XML Processing n How can applications use XML processors? –A Java-based answer: through.
31 Signs That Technology Has Taken Over Your Life: #6. When you go into a computer store, you eavesdrop on a salesperson talking with customers -- and.
XML A brief introduction ---by Yongzhu Li. XML --- a brief introduction 2 CSI668 Topics in System Architecture SUNY Albany Computer Science Department.
MC365 XML Parsers. Today We Will Cover: An overview of the Java API’s used for XML processing Creating an XML document in Java Parsing an XML document.
Cornell CS 502 Markup Languages SGML, HTML, XML, XHTML CS 502 – Carl Lagoze – Cornell University.
Copyright © 2002 ProsoftTraining. All rights reserved. XML Document Design.
Database Management Systems 3ed, R. Ramakrishnan and J. Gehrke1 XML Taken from Chapter 7.
XML Anisha K J Jerrin Thomas. Outline  Introduction  Structure of an XML Page  Well-formed & Valid XML Documents  DTD – Elements, Attributes, Entities.
SDPL 2002Notes 2: Document Instances and Grammars1 2.5 XML Schemas n A quick introduction to XML Schema –W3C Recommendation, May 2, 2001: »XML Schema Part.
Scientific Markup Languages Birds of a Feather A 10-Minute Introduction to XML Timothy W. Cole Mathematics Librarian & Professor of.
XML eXtensible Markup Language by Darrell Payne. Experience Logicon / Sterling Federal C, C++, JavaScript/Jscript, Shell Script, Perl XML Training XML.
1 XML at a neighborhood university near you Innovation 2005 September 16, 2005 Kwok-Bun Yue University of Houston-Clear Lake.
SDPL 2002Notes 8: XML Wrapping1 8 Translating Data to XML n How to translate existing data formats to XML? –(and why?) n XW (XML Wrapper) –an "XML wrapper.
Structured-Document Processing Languages Spring 2011 Course Review Repetitio mater studiorum est!
Representing Web Data: XML CSI 3140 WWW Structures, Techniques and Standards.
Lecture 2 : Understanding the Document Object Model (DOM) UFCFR Advanced Topics in Web Development II 2014/15 SHAPE Hong Kong.
XML Overview. Chapter 8 © 2011 Pearson Education 2 Extensible Markup Language (XML) A text-based markup language (like HTML) A text-based markup language.
XML What is XML? XML v.s. HTML XML Components Well-formed and Valid Document Type Definition (DTD) Extensible Style Language (XSL) SAX and DOM.
SDPL 2004Notes 3: XML Processor Interfaces1 3.3 JAXP: Java API for XML Processing n How can applications use XML processors? –A Java-based answer: through.
XML 1 Enterprise Applications CE00465-M XML. 2 Enterprise Applications CE00465-M XML Overview Extensible Mark-up Language (XML) is a meta-language that.
Sheet 1XML Technology in E-Commerce 2001Lecture 7 XML Technology in E-Commerce Lecture 7 XSL Formatting Objects, Java Data Binding.
Structured-Document Processing Languages Spring 2005 Course Review Repetitio mater studiorum est!
What is XML?  XML stands for EXtensible Markup Language  XML is a markup language much like HTML  XML was designed to carry data, not to display data.
Structured-Document Processing Languages (3 cu), Spring 2002 Pekka Kilpeläinen University of Kuopio Department of CS & Applied Math
Advanced Java Session 9 New York University School of Continuing and Professional Studies.
Intro. to XML & XML DB Bun Yue Professor, CS/CIS UHCL.
Session IV Chapter 9 – XML Schemas
1 XML - Extensible Markup Language. 2 HTML - Hypertext Markup Language n HTML has a fixed tag set. n Use these tags to describe how information is to.
Processing of structured documents Spring 2002, Part 2 Helena Ahonen-Myka.
XML Parsers Overview  Types of parsers  Using XML parsers  SAX  DOM  DOM versus SAX  Products  Conclusion.
XML A web enabled data description language 4/22/2001 By Mark Lawson & Edward Ryan L’Herault.
SDPL 2005Notes 2.5: XML Schemas1 2.5 XML Schemas n Short introduction to XML Schema –W3C Recommendation, 1 st Ed. May, 2001; 2 nd Ed. Oct, 2004: »XML Schema.
Sheet 1XML Technology in E-Commerce 2001Lecture 3 XML Technology in E-Commerce Lecture 3 DOM and SAX.
SDPL 20112: XML Basics1 2 Basics of XML and XML documents Survivor's Guide to XML, or XML for Computer Scientists / Dummies 2.1 XML and XML documents 2.2.
Lecture 3 : PHP5-DOM API UFCFR Advanced Topics in Web Development II 2014/15 SHAPE Hong Kong.
Chapter 27 The World Wide Web and XML. Copyright © 2004 Pearson Addison-Wesley. All rights reserved.27-2 Topics in this Chapter The Web and the Internet.
Sheet 1XML Technology in E-Commerce 2001Lecture 2 XML Technology in E-Commerce Lecture 2 Logical and Physical Structure, Validity, DTD, XML Schema.
Structured-Document Processing Languages (3 cu), Spring 2004 Pekka Kilpeläinen University of Kuopio Department of CS & Applied Math
SDPL 2004Notes 7: XML Conversion1 7 Translating Data to XML n How to translate existing data formats to XML? –(and why?) n XW (XML Wrapper) –"XML wrapper.
CS 157B: Database Management Systems II February 11 Class Meeting Department of Computer Science San Jose State University Spring 2013 Instructor: Ron.
SDPLNotes 3.2: DOM1 3.2 Document Object Model (DOM) n How to provide uniform access to structured documents in diverse applications (parsers, browsers,
XML eXtensible Markup Language. XML A method of defining a format for exchanging documents and data. –Allows one to define a dialect of XML –A library.
COMP9321 Web Application Engineering Semester 2, 2015 Dr. Amin Beheshti Service Oriented Computing Group, CSE, UNSW Australia Week 4 1COMP9321, 15s2, Week.
Structured-Document Processing Languages Spring 2007 Course Review Repetitio mater studiorum est!
Web Technologies Lecture 4 XML and XHTML. XML Extensible Markup Language Set of rules for encoding a document in a format readable – By humans, and –
When we create.rtf document apart from saving the actual info the tool saves additional info like start of a paragraph, bold, size of the font.. Etc. This.
What is XML? eXtensible Markup Language eXtensible Markup Language A subset of SGML (Standard Generalized Markup Language) A subset of SGML (Standard Generalized.
Structured-Document Processing Languages (3 cu), Spring 2001 Pekka Kilpeläinen University of Kuopio Department of CS & Applied Math
1 Introduction JAXP. Objectives  XML Parser  Parsing and Parsers  JAXP interfaces  Workshops 2.
SDPL 2003Notes 7: XML Wrapping1 7 Translating Data to XML n How to translate existing data formats to XML? –(and why?) n XW (XML Wrapper) –an "XML wrapper.
Web services. DOM parsing and SOAP.. Summary. ● Exercise: SAX-Based checkInvoice(), ● push parsing, ● event-based parsing, ● traversal order is depth-first.
Martin Kruliš by Martin Kruliš (v1.1)1.
Structured-Document Processing Languages (3 cu/6 ECTS cp), Spring 2007 Pekka Kilpeläinen University of Kuopio Department of Computer Science
Structured-Document Processing Languages (5 cp), Spring 2011 Pekka Kilpeläinen University of Eastern Finland School of Computing
C Copyright © 2011, Oracle and/or its affiliates. All rights reserved. Introduction to XML Standards.
 XML derives its strength from a variety of supporting technologies.  Structure and data types: When using XML to exchange data among clients, partners,
Jackson, Web Technologies: A Computer Science Perspective, © 2007 Prentice-Hall, Inc. All rights reserved Chapter 7 Representing Web Data:
I Copyright © 2004, Oracle. All rights reserved. Introduction.
SDPL : XML Schemas1 2.5 XML Schemas n Short introduction to XML Schema –W3C Recommendation, 1 st Ed. May, 2001; 2 nd Ed. Oct, 2004: »XML Schema.
1 Introduction to XML Babak Esfandiari. 2 What is XML? introduced by W3C in 98 Stands for eXtensible Markup Language it is more general than HTML, but.
XML: Extensible Markup Language
Unit 4 Representing Web Data: XML
Java XML IS
XML in Web Technologies
Database Processing with XML
Chapter 7 Representing Web Data: XML
Presentation transcript:

Structured-Document Processing Languages Spring 2004 Course Review Repetitio mater studiorum est!

SDPL 2004Course Review2 Goals of the Course n To familiarize with the most important models and languages for –manipulating –representing –transforming and –querying structured documents (or XML) n Generic XML processing technology –very little about specific XML applications or commercial systems

SDPL 2004Course Review3 Methodological Goals n Some central professional skills –consulting of technical specifications –experimenting with SW implementations n Ability to think…? –to find out relationships –to apply knowledge in new situations n ("Pidgin English" for scientific communication)

SDPL 2004Course Review4 XML? n Extensible Markup Language is not a markup language! –does not fix a tag set nor its semantics (like markup languages like HTML do) n XML is –A way to use markup to represent information –A metalanguage »supports definition of specific markup languages through XML DTDs or Schemas »E.g. XHTML a reformulation of HTML using XML

SDPL 2004Course Review5 XML Encoding of Structure: Example <S> S E <W><W></W> </E>Helloworld! W Hello W world! </W> </S> A=1

SDPL 2004Course Review6 Basics of XML DTDs n A Document Type Declaration provides a grammar (document type definition, DTD) for a class of documents Syntax (in the prolog of a document instance): [ ]> Syntax (in the prolog of a document instance): [ ]> n DTD is the union of the external and internal subset

SDPL 2004Course Review7 How do Declarations Look Like? <!ATTLIST item price NMTOKEN #REQUIRED unit (FIM | EUR) ”EUR” >

SDPL 2004Course Review8 Element type declarations The general form is where E is a content model The general form is where E is a content model  regular expression of element names n Content model operators: E | F : alternationE, F: concatenation E? : optionalE* : zero or more E+ : one or more(E) : grouping

SDPL 2004Course Review9 XML Schema Definition Language n XML syntax –schema documents easier to manipulate by programs (than the special DTD syntax) n Compatibility with namespaces –can validate documents using declarations from multiple sources n Content datatypes –44 built-in datatypes (including primitive Java datatypes, datatypes of SQL, and XML attribute types) –mechanisms to derive user-defined datatypes

SDPL 2004Course Review10 XML Namespaces </xsl:template></xsl:stylesheet>

SDPL 2004Course Review11 3. XML Processor APIs n How can applications manipulate structured documents? –An overview of document parser interfaces 3.1 SAX: an event-based interface 3.2 DOM: an object-based interface 3.3 JAXP: Java API for XML Processing

SDPL 2004Course Review12 A SAX-based application Application Main Routine startDocument() startElement() characters() Parse() Callback Routines endElement() </A>Hi! "A",[i="1"] "Hi!" "A"

SDPL 2004Course Review13 DOM: What is it? n An object-based, language-neutral API for XML and HTML documents –Allows programs and scripts to build, navigate, and modify documents –a foundation for developing querying, filtering, transformation, rendering etc. applications on top of DOM implementations n In contrast to “Serial Access XML” could think as “Directly Obtainable in Memory”

SDPL 2004Course Review14 <invoice form="00" type="estimated"> type="estimated"> John Doe John Doe Pyynpolku 1 Pyynpolku KUOPIO KUOPIO DOM structure model invoice name addressdata address form="00"type="estimated" John Doe streetaddresspostoffice KUOPIO Pyynpolku 1... Document Element NamedNodeMap Text

SDPL 2004Course Review15 Overview of XSLT Transformation

SDPL 2004Course Review16 JAXP 1.1 n An interface for “plugging-in” and using XML processors in Java applications –includes packages »org.xml.sax: SAX 2.0 interface »org.w3c.dom: DOM Level 2 interface »javax.xml.parsers: initialization and use of parsers »javax.xml.transform: initialization and use of transformers (XSLT processors) n Included in JDK starting from vers. 1.4

SDPL 2004Course Review17 XML.getXMLReader() JAXP: Using a SAX parser (1) f.xml.parse( ”f.xml”) ”f.xml”).newSAXParser()

SDPL 2004Course Review18 f.xml JAXP: Using a DOM parser (1).parse(”f.xml”).newDocument().newDocumentBuilder()

SDPL 2004Course Review19 XSLT JAXP: Using Transformers (1).newTransformer(…).transform(.,.)

SDPL 2004Course Review20 Transformation & Formatting XSLT script I II

SDPL 2004Course Review21 Page regions A simple page can contain 1-5 regions, specified by child elements of the simple-page-master A simple page can contain 1-5 regions, specified by child elements of the simple-page-master

SDPL 2004Course Review22 Top-level formatting objects n Slightly simplified: fo:root fo:layout-master-set (fo:simple-page-master | fo:page-sequence-master)+ fo:page-sequence + fo:region- body fo:region- before? fo:region-end? fo:region-start? fo:region- after? specify masters for page sequences by referring to simple-page-masters contents of pages

SDPL 2004Course Review23 XML-wrapping n Need ”XML-wrappers” (aka extractors) –interface/conversion program to produce an XML representation for source data source1 source2 source3 wrapper1 XML-form-1 wrapper2 wrapper3 XML-form-2

SDPL 2004Course Review24 XW-architecture (3) application XW-engineSAX AA x1 x2 BB y1 y2 z1 z2 … … x1 x2 x1 x2 </part-a><part-b> y1 y2 y1 y2 z2 z2 </part-b> result document source data wrapper description

SDPL 2004Course Review25 <whole> </whole> <whole> one one two two three three </whole> Axy.. z$??? B.. 1one 2two 3three Rearranging result structures xy..  z xy..  z

SDPL 2004Course Review26 XQuery in a Nutshell n Functional expression language n Strongly-typed: (XML Schema) types may be assigned to expressions statically n Includes XPath 2.0 (says Draft, but not all XPath axes included!) –XQuery 1.0 and XPath 2.0 share extensive functionality: »XQuery 1.0 and XPath 2.0 Functions and Operators, WD 15/11/2002 n Roughly: XQuery  XPath' + XSLT' + SQL'

SDPL 2004Course Review27 Course Main Message n XML is a universal way to represent info as tree-like data structures n There are specialized and powerful technologies for processing it n The development is going on