Providing Web-based Access and Integrating with XML

Slides:



Advertisements
Similar presentations
Web Development & Design Foundations with XHTML
Advertisements

3 November 2008CIS 340 # 1 Topics To define XML as a technology To place XML in the context of system architectures.
HTML and XHTML Controlling the Display Of Web Content.
CS 898N – Advanced World Wide Web Technologies Lecture 21: XML Chin-Chih Chang
Markup Languages Controlling the Display Of Web Content.
1 XML and QUERY Shilpi Ahuja CSE Data Mining 4 th April 2002.
Chapter 2 Introduction to HTML5 Internet & World Wide Web How to Program, 5/e Copyright © Pearson, Inc All Rights Reserved.
Creating a Basic Web Page
XML Anisha K J Jerrin Thomas. Outline  Introduction  Structure of an XML Page  Well-formed & Valid XML Documents  DTD – Elements, Attributes, Entities.
Chapter 16 The World Wide Web. 2 The Web An infrastructure of information combined and the network software used to access it Web page A document that.
Introduction to XML cs3505. References –I got most of this presentation from this site –O’reilly tutorials.
XML CPSC 315 – Programming Studio Fall 2008 Project 3, Lecture 1.
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.
Document Type Definitions Kanda Runapongsa Dept. of Computer Engineering Khon Kaen University.
Chapter 1 Understanding the Web Design Environment Principles of Web Design, 4 th Edition.
Week 1 Understanding the Web Design Environment. 1-2 HTML: Then and Now HTML is an application of the Standard Generalized Markup Language Intended to.
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 1 XML Technology in E-Commerce Lecture 1 WWW, HTML, CSS, XML, Meta-modeling.
 2008 Pearson Education, Inc. All rights reserved Introduction to XHTML.
 XML is designed to describe data and to focus on what data is. HTML is designed to display data and to focus on how data looks.  XML is created to structure,
XML About XML Things to be known Related Technologies XML DOC Structure Exploring XML.
Tutorial 1: XML Creating an XML Document. 2 Introducing XML XML stands for Extensible Markup Language. A markup language specifies the structure and content.
XML A web enabled data description language 4/22/2001 By Mark Lawson & Edward Ryan L’Herault.
1 Chapter 10: XML What is XML What is XML Basic Components of XML Basic Components of XML XPath XPath XQuery XQuery.
XML eXtensible Markup Language. Topics  What is XML  An XML example  Why is XML important  XML introduction  XML applications  XML support CSEB.
XML 2nd EDITION Tutorial 1 Creating An Xml Document.
WEB BASED DATA TRANSFORMATION USING XML, JAVA Group members: Darius Balarashti & Matt Smith.
CP3024 Lecture 9 XML: Extensible Markup Language.
VICTORIA UNIVERSITY OF WELLINGTON Te Whare Wananga o te Upoko o te Ika a Maui SWEN 432 Advanced Database Design and Implementation An Introduction to XML.
Web Development & Design Foundations with XHTML Chapter 2 HTML/XHTML Basics.
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.
XML Instructor: Charles Moen CSCI/CINF XML  Extensible Markup Language  A set of rules that allow you to create your own markup language  Designed.
XP 1 Creating an XML Document Developing an XML Document for the Jazz Warehouse XML Tutorial.
1 Introduction to XML XML stands for Extensible Markup Language. Because it is extensible, XML has been used to create a wide variety of different markup.
XML Design Goals 1.XML must be easily usable over the Internet 2.XML must support a wide variety of applications 3.XML must be compatible with SGML 4.It.
XML Introduction. Markup Language A markup language must specify What markup is allowed What markup is required How markup is to be distinguished from.
1 Tutorial 11 Creating an XML Document Developing a Document for a Cooking Web Site.
COMP9321 Web Application Engineering Semester 2, 2015 Dr. Amin Beheshti Service Oriented Computing Group, CSE, UNSW Australia Week 4 1COMP9321, 15s2, Week.
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 –
Introduction to DTD A Document Type Definition (DTD) defines the legal building blocks of an XML document. It defines the document structure with a list.
8 Chapter Eight Server-side Scripts. 8 Chapter Objectives Create dynamic Web pages that retrieve and display database data using Active Server Pages Process.
XML CSC1310 Fall HTML (TIM BERNERS-LEE) HyperText Markup Language  HTML (HyperText Markup Language): December  Markup  Markup is a symbol.
XML DTD. XML Validation XML with correct syntax is "Well Formed" XML. XML validated against a DTD is "Valid" XML.
Games: XML Presented by: Idham bin Mat Desa Mohd Sharizal bin Hamzah Mohd Radzuan bin Mohd Shaari Shukor bin Nordin.
1/30/20161 Introduction to Web Services Bina Ramamurthy
Basic HTML Document Structure. Slide 2 Goals (XHTML HTML5) XHTML Separate document structure and content from document formatting HTML 5 Create a formal.
Introduction to XML Kanda Runapongsa Dept. of Computer Engineering Khon Kaen University.
Jackson, Web Technologies: A Computer Science Perspective, © 2007 Prentice-Hall, Inc. All rights reserved Chapter 7 Representing Web Data:
XP 1Creating Web Pages with XML Tutorial 1 New Perspectives on XML Tutorial 1 – Creating an XML Document.
XML Introduction to XML Extensible Markup Language.
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.
Web Design Principles 5 th Edition Chapter 3 Writing HTML for the Modern Web.
HTML5 and CSS3 Illustrated Unit B: Getting Started with HTML.
Extensible Markup Language (XML) Pat Morin COMP 2405.
XML BASICS and more…. What is XML? In common:  XML is a standard, simple, self-describing way of encoding both text and data so that content can be processed.
DHTML.
Unit 4 Representing Web Data: XML
Introduction to Web Services
W3C Web standards and Recommendations
XML QUESTIONS AND ANSWERS
Introduction to XHTML.
Prepared for Md. Zakir Hossain Lecturer, CSE, DUET Prepared by Miton Chandra Datta
Basic HTML Document Structure
Chapter 7 Representing Web Data: XML
Creating an XML Document
XML Introduction By Hongming Yu Feb 6th, 2002.
Introduction to Web Services
Introduction to Web Services
HTML5 and CSS3 Illustrated Unit B: Getting Started with HTML
Presentation transcript:

Providing Web-based Access and Integrating with XML B. Ramamurthy Chapter 8 and 9 1/12/2019 B.Ramamurthy

Topics for Web access Web access environments (See figure 8.1) Client facilities Web server facilities Session management Specialized client devices 1/12/2019 B.Ramamurthy

Web application configuration User client User client User client Web server Application server Database server 1/12/2019 B.Ramamurthy

Client Facilities Provide adequate interactive performance Ensure integrity of system updates Minimize the risk of exposure of confidential data Minimize network activity Enable disconnected user activity 1/12/2019 B.Ramamurthy

Implementing Client Functionality Static pages HTML and variations of it Caching to help performance Cascading style sheets (CSS) separates content from fromat HTML pages provide “FORMs” to accept user input that may generate actions. Active contents: applets, plug ins, javascripts, JSP etc. Stand alone applications, esp. when it is not real-time. 1/12/2019 B.Ramamurthy

Web Application Components HTML & Objects Servlets JSPs Database server Application objects 1/12/2019 B.Ramamurthy

Java Server Pages JSP model is well suited for process XML documents Besides the directives, actions, and scripting elements, it is possible to access Java Beans and support a rich library of tags. Tag libraries provide for sharing of actions among multiple JSPs. They provide implicit objects for a given environment. JSP to XML and back is convenient feature. 1/12/2019 B.Ramamurthy

Session Management HTP is stateless. To maintain the user state we can use URL variables (using session key as a variable, insecure) Cookies (a packet of information communicated between the client and the server and stored on the client side, not secure), Secure Socket Layer (SSL) protocol: A session is established, session key is defined for encryption and communication for the duration of the session. 1/12/2019 B.Ramamurthy

Specialized Client Devices Handheld devices such as cell phones and personal digital assistants (PDAs) are becoming popular for remote user access to systems. See Sun’s support for this: http://java.sun.com/j2me/#technologies (has APIs for TV, phone, telematics and so on) Also connects to J2EE and Web services. 1/12/2019 B.Ramamurthy

Integrating with XML (Chapter 9) XML is anew markup language, developed by W3C (World Wide Web Consortium), mainly to overcome the limitations of HTML. But it took a life of its own and has become a very popular part of distributed systems. We will examine its definition, associated specifications (DTD, XSLT etc.), Java APIs available to process XML, protocols and services based on XML, and the role XML plays in enterprise integration. 1/12/2019 B.Ramamurthy

First Look at XML It has no predefined tags. It is stricter. Such as in HTML Domains may specify their own set of standard tags It is stricter. Most html document have errors and the browser have to built to take care of these. On the other hand XML has a strict syntax. There is a notion of validity and A notion of well-formed. 1/12/2019 B.Ramamurthy

XML document Content XML documents are composed of markup and contents Six kinds of markup: Element Attributes Entity References Comments Processing instructions CDATA sections 1/12/2019 B.Ramamurthy

Elements Elements are the most common form of markup. Delimited by angle brackets, most elements identify the nature of the content they surround. Example: <allen><quote>Goodnight, Gracie.</quote></allen> Some elements may be empty, as seen above, in which case they have no content. If an element is not empty,it begins with a start-tag, <element>, and ends with an end-tag, </element>. Example:<applause/> 1/12/2019 B.Ramamurthy

Attributes Attributes are name-value pairs that occur inside start-tags after the element name. For example, <div class="preface"> is a div element with the attribute class having the value preface. In XML, all attribute values must be quoted. 1/12/2019 B.Ramamurthy

Entities In XML, entities are used to represent these special characters. Entities are also used to refer to often repeated or varying text and to include the content of external files. Example: &amp to represent & &US to represent United States XML also has a set of predefined entities: &quot, &amp 1/12/2019 B.Ramamurthy

Comments Comments begin with <!-- and end with -->. Comments can contain any data except the literal string --. You can place comments between markup anywhere in your document. Example: <!– loosely inspired by the vcard3.0 --> 1/12/2019 B.Ramamurthy

Processing Instructions(PI) Processing instructions (PIs) are an escape hatch to provide information to an application. Like comments, they are not textually part of the XML document, but the XML processor is required to pass them to an application. Processing instructions have the form: <?name pidata?> Example: <?xml-stylesheet href=“simple-ie5.xsl” type=“text/xsl”?> 1/12/2019 B.Ramamurthy

CDATA In a document, a CDATA section instructs the parser to ignore most markup characters. <?xml version=“1.0”?> <example> <[CDATA[ <?xml verion=“1.0”?> <entry> …. </entry>]]> </example> 1/12/2019 B.Ramamurthy

Well Formed and Valid A document is well formed if it obeys the syntax of XML A well formed document if valid if it contains a proper document type declaration and if the document obeys the constraints of the declaration: Element sequence Valid nesting Required attributed provided Attributes values are of correct type 1/12/2019 B.Ramamurthy

Enterprise Application Characteristics Communicate using email, ftp, edi, soap Received messages are published on message queues for guaranteed store/forward delivery. Consumers can subscribe to messages of interest. Messages can be transformed using variety of schemes: XSLT, GUI, user-defined. Internal business processes can be triggered by these messages. 1/12/2019 B.Ramamurthy

Role of XML Primary task is movement and interpretation of messages. XML offers the following benefits: Well-defined grammar for defining message structures (DTD) Tools such as parsers, notepad available for working with XML documents Tools available for generating and consuming XML messages (Ex: numerous APIs offered by SUN) 1/12/2019 B.Ramamurthy

XML Processing Models XML Input Processing Business Logic Handling XML Output Processing WEB EXTRACT BO XML input XML output 1/12/2019 B.Ramamurthy

Document Data Type:DTD The purpose of a DTD is to define the valid building blocks of an XML document. It defines the document structure with a list of valid elements. It is similar to a type (/class) declaration in programming language context. A DTD can be declared inline in your XML document, or as an external reference. DTD defines the grammar of an XML document. 1/12/2019 B.Ramamurthy

DOCTYPE If the DTD is internal to an XML file it has to be wrapped in a DOCTYPE: <!DOCTYPE root-element [element-declarations]> If the DTD is external to the XML file then, the filename has be referenced within the DOCTYPE tag: <!DOCTYPE root-element SYSTEM "filename"> 1/12/2019 B.Ramamurthy

Example: Internal DTD <?xml version=”1.0”?> <!DOCTYPE memo [ <!ELEMENT memo (header,from,to, body,sign)> <!ELEMENT header (#PCDATA)> <!ELEMENT from (#PCDATA)> <!ELEMENT to (#PCDATA)> <!ELEMENT body (#PCDATA)> <!ELEMENT sign (#PCDATA)>]> <memo> <header> Hello World </header> <from> bina </from> <to> cse586 </to> <body> Wake up everyone </body> <sign> br </sign> </memo> 1/12/2019 B.Ramamurthy

Example: External DTD: memo.xml <?xml version=”1.0”?> <!DOCTYPE memo SYSTEM “memo.dtd”> <memo> <header> Hello World </header> <from> bina </from> <to> cse586 </to> <body> Wake up everyone </body> <sign> br </sign> </memo> 1/12/2019 B.Ramamurthy

memo.dtd <!ELEMENT memo (header,from,to, body,sign)> <!ELEMENT header (#PCDATA)> <!ELEMENT from (#PCDATA)> <!ELEMENT to (#PCDATA)> <!ELEMENT body (#PCDATA)> <!ELEMENT sign (#PCDATA)> 1/12/2019 B.Ramamurthy

DTD: Element In a DTD XML elements are declared with an ELEMENT tag. You declare an element using these formats: <!ELEMENT element-name element-type> <!ELEMENT element-name (element-content)> 1/12/2019 B.Ramamurthy

Element Declarations Empty element <!ELEMENT element-name EMPTY> DTD : <!ELEMENT BON EMPTY> XML : <BON /> Elements with one character data: <!ELEMENT elem-name (#PCDATA)> <!ELEMENT from (#PCDATA)> <to> cse586 </to> Elements with sub-elements: <!ELEMENT elem-name (elem1, elem2, ..)> <!ELEMENT memo (header, from, to, body, sign)> See memo.xml for example 1/12/2019 B.Ramamurthy

Element Declarations <!ELEMENT elem-name (sub-elem+)> one or more subelements <!ELEMENT elem-name (sub-elem*)> zero or more subelements <!ELEMENT elem-name (sub-elem?)> zero or one Declaring mixed sub-elements: <!ELEMENT memo (header,to+,from,para*,#PCDATA)> 1/12/2019 B.Ramamurthy

XSLT XSLT is XML Style Language Transforms XSLT transforms the content of an XML document into another form which could possibly be another XML document. In an XSLT processor, the information in the XML source document will be evaluated, rearranged, then reassembled. Most visible outcome is a pretty version of the content of the XML document. XSLT more importantly provides flexible source information, called Result Tree, that can be easily added to, modified, or reordered. 1/12/2019 B.Ramamurthy

Displaying XML XML DocumentXSL TransHTML Doc Web Browser XML Document + CSS Style sheetXML-enabled Web Browser XML Document+ XSL StyleSheet  XSL Display Engine 1/12/2019 B.Ramamurthy

Style sheet Two details are specified: Transformation of input document into another form (optional) Description of how to present the transformed information 1/12/2019 B.Ramamurthy

Transformation Capabilities Generation of constant text Suppression of content Moving text Duplicating text Sorting Compute new information from given information 1/12/2019 B.Ramamurthy

Formatting capabilities Specification of general layout Assignment of the transformed content into basic units (paragraph, lists etc.) Specify formatting properties (margins, alignment etc.) 1/12/2019 B.Ramamurthy

Components of XSL XPath: XML Path language for referencing parts of the XML document XSLT: XSL Transformations: for transforming one form to another XSL: Extensible Style Sheet Language: For formatting objects 1/12/2019 B.Ramamurthy