Sheet 1XML Technology in E-Commerce 2001Lecture 7 XML Technology in E-Commerce Lecture 7 XSL Formatting Objects, Java Data Binding.

Slides:



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

XML III. Learning Objectives Formatting XML Documents: Overview Using Cascading Style Sheets to format XML documents Using XSL to format XML documents.
DOCUMENT TYPES. Digital Documents Converting documents to an electronic format will preserve those documents, but how would such a process be organized?
XML: Extensible Markup Language
1 XSLT – eXtensible Stylesheet Language Transformations Modified Slides from Dr. Sagiv.
XML Technology in E-Commerce
1/18 ITApplications XML Module Session 5: Extensible Stylesheet Language (XSL)
SDPL 2002Notes 6: XSL1 6 XSL: Extensible Stylesheet Language n An advanced style language for XML documents: 1. Language for transforming XML documents:
Chapter 6 Web Typography
XML Unit 6 October 31. XML, review XML is used to markup data Used to describe information Uses tags like HTML –But all tags are user-defined –Must be.
CSE 190: Internet E-Commerce Lecture 17: XML, XSL.
Introduction to XSL Hudson Ummem Veloso (huv) Luciano de Moura Silva (lms4)
Introduction to XML ISYS 573. HTML vs XML HTML is a language specifically designed for displaying information in browser. It doesn’t carry information.
COS 381 Day 16. Agenda Assignment 4 posted Due April 1 There was no resubmits of Assignment Capstone Progress report Due March 24 Today we will discuss.
September 15, 2003Houssam Haitof1 XSL Transformation Houssam Haitof.
Technical Track Session XML Techie Tools Tim Bornholt.
Copyright © 2002 ProsoftTraining. All rights reserved. XML Document Design.
Week 0534Styling XML1 Topics CSS – styling XML for screen presentation –Associating CSS with XML –Selectors –Element positioning –Element appearance XSL.
Chapter 12 Creating and Using XML Documents HTML5 AND CSS Seventh Edition.
© 2012 Adobe Systems Incorporated. All Rights Reserved. LEARNING THE LANGUAGE OF THE WEB INTRODUCTION TO HTML AND CSS.
Sheet 1XML Technology in E-Commerce 2001Lecture 6 XML Technology in E-Commerce Lecture 6 XPointer, XSLT.
CIS 375—Web App Dev II XSLFO. 2 XSLFO IntroductionIntroduction XSLFO stands for Extensible Stylesheet Language ___________________. XSLFO is an _____-based.
XML Anisha K J Jerrin Thomas. Outline  Introduction  Structure of an XML Page  Well-formed & Valid XML Documents  DTD – Elements, Attributes, Entities.
Chapter 6 Web Typography. 2 Principles of Web Design Chapter 5 Objectives Understand principles for type design on a Web site Use the element Understand.
Introduction to XML cs3505. References –I got most of this presentation from this site –O’reilly tutorials.
Scientific Markup Languages Birds of a Feather A 10-Minute Introduction to XML Timothy W. Cole Mathematics Librarian & Professor of.
XML for E-commerce III Helena Ahonen-Myka. In this part... n Transforming XML n Traversing XML n Web publishing frameworks.
Introduction technology XSL. 04/11/2005 Script of the presentation Introduction the XSL The XSL standard Tools for edition of codes XSL Necessary resources.
XP 1 CREATING AN XML DOCUMENT. XP 2 INTRODUCING XML XML stands for Extensible Markup Language. A markup language specifies the structure and content of.
XML Technologies Getting data to play nice with other data.
Another PillowTalk Presentation  2004 Dynamic Systems, Inc. Introduction to XML for SOA Lee H. Burstein,
XSL Formatting Objects „From XML to PDF“ Lecture on Walter Kriha.
1 CIS336 Website design, implementation and management (also Semester 2 of CIS219, CIS221 and IT226) Lecture 6 XSLT (Based on Møller and Schwartzbach,
Structured-Document Processing Languages Spring 2005 Course Review Repetitio mater studiorum est!
Sheet 1XML Technology in E-Commerce 2001Lecture 1 XML Technology in E-Commerce Lecture 1 WWW, HTML, CSS, XML, Meta-modeling.
Intro. to XML & XML DB Bun Yue Professor, CS/CIS UHCL.
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.
XML About XML Things to be known Related Technologies XML DOC Structure Exploring XML.
XML TUTORIAL Portions from w3 schools By Dr. John Abraham.
Lecture 14 Extensible Stylesheet Language Transformations : XSLT.
CITA 330 Section 6 XSLT. Transforming XML Documents to XHTML Documents XSLT is an XML dialect which is declared under namespace "
IST 221 Internet Concepts and Applications Introduction to XML II CSS and XSLT Style Sheets.
Lecture 11 XSL Transformations (part 1: Introduction)
XML Extensible Markup Language
Softsmith Infotech XML. Softsmith Infotech XML EXtensible Markup Language XML is a markup language much like HTML Designed to carry data, not to display.
WEB BASED DATA TRANSFORMATION USING XML, JAVA Group members: Darius Balarashti & Matt Smith.
1 Introduction  Extensible Markup Language (XML) –Uses tags to describe the structure of a document –Simplifies the process of sharing information –Extensible.
Introduction to XML This presentation covers introductory features of XML. What XML is and what it is not? What does it do? Put different related technologies.
ITB Web programming for E- Commerce 1 ITB6227 Programming for E-COMMERCE Lecture Presentation of XML Documents.
1 Overview of XSL. 2 Outline We will use Roger Costello’s tutorial The purpose of this presentation is  To give a quick overview of XSL  To describe.
Sheet 1XML Technology in E-Commerce 2001Lecture 2 XML Technology in E-Commerce Lecture 2 Logical and Physical Structure, Validity, DTD, XML Schema.
Cascading Style Sheets CSS.  Standard defined by the W3C  CSS1 (released 1996) 50 properties  CSS2 (released 1998) 150 properties (positioning)  CSS3.
Lesson 15: Cascading Style Sheets. Objectives Identify ways to apply Web page formatting with Cascading Style Sheets (CSS1 and CSS2) using various methods.
1 herbert van de sompel CS 502 Computing Methods for Digital Libraries Cornell University – Computer Science Herbert Van de Sompel
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!
SDPL 20076: XSL Formatting1 6 XSL: Extensible Stylesheet Language n An advanced style language for XML documents: 1. Language for transforming XML documents:
Unit 3 — Advanced Internet Technologies Lesson 11 — Introduction to XSL.
1 Introduction JAXP. Objectives  XML Parser  Parsing and Parsers  JAXP interfaces  Workshops 2.
Martin Kruliš by Martin Kruliš (v1.1)1.
SDPL 2001Notes 6: XSL1 6 XSL: Extensible Stylesheet Language n An advanced style language for XML documents: 1. Language for transforming XML documents:
 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:
XML Notes taken from w3schools. What is XML? XML stands for EXtensible Markup Language. XML was designed to store and transport data. XML was designed.
Rendering XML Documents ©NIITeXtensible Markup Language/Lesson 5/Slide 1 of 46 Objectives In this session, you will learn to: * Define rendering * Identify.
Unit 4 Representing Web Data: XML
XML in Web Technologies
Data Modeling II XML Schema & JAXB Marc Dumontier May 4, 2004
Chapter 7 Representing Web Data: XML
Unit 6 - XML Transformations
Presentation transcript:

Sheet 1XML Technology in E-Commerce 2001Lecture 7 XML Technology in E-Commerce Lecture 7 XSL Formatting Objects, Java Data Binding

Sheet 2XML Technology in E-Commerce 2001Lecture 7 XSL Formatting Objects –Formatting Objects as a part of XSL suite; –Page Model; –Creating Templates; –Creating Blocks and Inline elements; Java Data Binding –Purpose of Data Binding: translation of XML documents to application objects; –Examples: Castor; Jato; Lecture Outline

Sheet 3XML Technology in E-Commerce 2001Lecture 7 XML XML Namespaces XPath XPointerXSLT XLink XML Schema XML Languages Parser DOMSAX Software Application Overview XSL FO Data Binding Facility

Sheet 4XML Technology in E-Commerce 2001Lecture 7 Rendering XML Transformation to a document suitable for presentation on a device like display, aural device, etc; The result tree has a formatting semantics expressed in terms of formatting objects; XML Document CSS Stylesheet Browser Transformation (XSLT) FO Document HTML WML PDF

Sheet 5XML Technology in E-Commerce 2001Lecture 7 Formatting Objects After an XSLT transformation the result tree can contain nodes that are formatting objects; Formatting objects correspond to typographic abstractions like page, paragraph, table; Finer control on the presentation is provided through the properties of the formatting objects; XSL FO provides XML vocabulary to specify the presentation in terms of formatting objects and properties;

Sheet 6XML Technology in E-Commerce 2001Lecture 7 Demo Converting FO Tree to PDF Demo - Deitel 13.3, fig. 13.2, page 356; Tools: –Java 2; –Apache FOP tool ( ; Demo files: –welcome.fo; –welcome.pdf;

Sheet 7XML Technology in E-Commerce 2001Lecture 7 Region-before Region-after Region-start Region-end Region-body Page Model Simplified page and its regions used in structures that contain formatting objects Page

Sheet 8XML Technology in E-Commerce 2001Lecture 7 Setting Up Page Templates <fo:simple-page-master master-name = "layout1" page-height = "4in"> ……………………………………………………. layout-master-set : defines page templates that can be used for page generation; simple-page-master : used for the generation of pages. The pages come from the page-sequence element;

Sheet 9XML Technology in E-Commerce 2001Lecture 7 Setting Up Page Regions <fo:simple-page-master master-name = "layout1" page-height = "4in"> <fo:region-body margin-top = "1in" margin-bottom = "1in" margin-left = "1.5in" margin-right = "1.5in"/> <fo:region-before extent = "1in" margin-top = "0.2in" margin-bottom = "0.2in" margin-left = "0.2in" margin-right = "0.2in"/>

Sheet 10XML Technology in E-Commerce 2001Lecture 7 Describing the Page Content <fo:block font-size = "10pt" line-height = "12pt" font-family = "sans-serif"> page ………………………………………. static-content element causes page numbers to be included in each page header;

Sheet 11XML Technology in E-Commerce 2001Lecture 7 Creating Paragraphs and Inline elements <fo:block font-size = "36pt" font-family = "sans-serif" font-weight = "bold" space-after.optimum = "24pt" color = "blue" text-align = "center">Welcome! …………………………………………………….. <fo:block font-size = "12pt" font-family = "sans-serif" line-height = "14pt" space-after.optimum = "12pt">Deitel & Associates, Inc. is a member of the World Wide Web Consortium. block elements create paragraphs inline element defines different formatting for a portion of text in a paragraph

Sheet 12XML Technology in E-Commerce 2001Lecture 7 Demo XSLT Transformation to FO Document Demo - Deitel 13.3, fig. 13.5, page 361; Tools: –Java 2; –XML Spy with XSLT processor; –Apache FOP tool ( ; Demo files: –letter.xml; –letter.xsl;

Sheet 13XML Technology in E-Commerce 2001Lecture 7 Summary on Formatting Objects Read: Deitel 13 Assignment: Deitel Ex 13.3 Part of XSL Suite; XML application that provides vocabulary for specifying formatting suitable for print media and aural devices ; Apache FOP tool allows easy generation of PDF files from XML documents;

Sheet 14XML Technology in E-Commerce 2001Lecture 7 XSL Formatting Objects –Formatting Objects as a part of XSL suite; –Page Model; –Creating Templates; –Creating Blocks and Inline elements; Java Data Binding –Purpose of Data Binding: translation of XML documents to application objects; –Examples: Castor; Jato; Lecture Outline

Sheet 15XML Technology in E-Commerce 2001Lecture 7 XML Processing XML Parser DOMSAX Software Application XML Document General Schema for XML Processing: Software application recognizes the markups in the XML doc; The application is bound to a low-level APIs (SAX, DOM); Dependence on the document format. Navigation through the document structure is rigidly encoded in the application;

Sheet 16XML Technology in E-Commerce 2001Lecture 7 Data Access Example (simple address): Baker Street 221b London Having the address element, obtaining the street through DOM is: Node str=address.getFirstChild(); String street=str.getFirstChild().getNodeValue(); But if we have the XML converted to an application object address, the previous could be: String street=address.getStreet();

Sheet 17XML Technology in E-Commerce 2001Lecture 7 The Idea behind the Data Binding XML Parser DOMSAX Software Application XML Document Interpreter Mapping Rules Application Objects The application logic doesn’t contain code for XML data access; Conversion from XML to application objects is done by an Interpreter on the base of Mapping Rules. This process is called unmarshalling; The process of serialization of a set of objects to XML document is called marshalling;

Sheet 18XML Technology in E-Commerce 2001Lecture 7 Data Binding Schema (DTD or XML Schema) XML Document Classes Objects Compile Unmarshal Marshal Instance of Conforms to Functionality of Data Binding Facility

Sheet 19XML Technology in E-Commerce 2001Lecture 7 Data Binding Every data binding implementation has to provide answer to two questions: –How to convert a schema to a hierarchy of classes; –What are the rules for mapping from and to XML and how they are represented; Two data binding implementations: –Castor ( –Jato (

Sheet 20XML Technology in E-Commerce 2001Lecture 7 Castor Java-based data binding framework that supports marshalling and unmarshalling; Generates source of the classes on the base of XML Schema; Can use already existing application classes; Uses class and field descriptors to represent the mapping information; Based on Java Beans component model;

Sheet 21XML Technology in E-Commerce 2001Lecture 7 Class Descriptors Mapping information is represented from the Java object’s point of view; Description is made on the base of Java Beans name conventions; Description takes the form of an XML document; Descriptors specify the mapping of classes and fields to XML elements and attributes; Example files for a simple order - order.xml, MyOrder.java, Item.java, mapping.xml;

Sheet 22XML Technology in E-Commerce 2001Lecture 7 Jato Library for transforming XML to Java and Java to XML; JavaBeans naming convention support; The correspondence between XML elements and attributes and Java objects is specified in Jato transformation XML document; Transformation document is written in Jato script;

Sheet 23XML Technology in E-Commerce 2001Lecture 7 Jato Transformations Jato ScriptXML Doc Jato Interpreter Object Helper Jato ScriptXML Helper XML Generator XML Objects XML to JavaJava to XML

Sheet 24XML Technology in E-Commerce 2001Lecture 7 XML to Java Example We want to create an object instance of java.util.Properties class: java.util.*

Sheet 25XML Technology in E-Commerce 2001Lecture 7 Summary on Data Binding Frameworks for translating XML to a set of application objects and objects to XML document; Usually uses Java language and JavaBeans naming conventions; Correspondence between XML and objects is specified in a separate descriptor document by using declarative syntax; Generation of classes on the base of DTD/XML Schema;