Copyright © 2012 Accenture All Rights Reserved.Copyright © 2012 Accenture All Rights Reserved. Accenture, its logo, and High Performance Delivered are.

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

CSCI N241: Fundamentals of Web Design Copyright ©2004 Department of Computer & Information Science Introducing XHTML: Module B: HTML to XHTML.
CG0119 Web Database Systems Parsing XML: using SimpleXML & XSLT.
SPECIAL TOPIC XML. Introducing XML XML (eXtensible Markup Language) ◦A language used to create structured documents XML vs HTML ◦XML is designed to transport.
CS 898N – Advanced World Wide Web Technologies Lecture 21: XML Chin-Chih Chang
XML Prashant Karmarkar Brendan Nolan Alexander Roda.
XML Introduction What is XML –XML is the eXtensible Markup Language –Became a W3C Recommendation in 1998 –Tag-based syntax, like HTML –You get to make.
DECO 3002 Advanced Technology Integrated Design Computing Studio Tutorial 5 – XML Basic School of Architecture, Design Science and Planning Faculty of.
Tutorial 11 Creating XML Document
XML Technologies and Applications Rajshekhar Sunderraman Department of Computer Science Georgia State University Atlanta, GA 30302
Introduction to XML: Yong Choi CSU Bakersfield.
Upgrading to XHTML DECO 3001 Tutorial 1 – Part 1 Presented by Ji Soo Yoon 19 February 2004 Slides adopted from
September 15, 2003Houssam Haitof1 XSL Transformation Houssam Haitof.
Introducing XHTML: Module B: HTML to XHTML. Goals Understand how XHTML evolved as a language for Web delivery Understand the importance of DTDs Understand.
Introduction to XML This material is based heavily on the tutorial by the same name at
Introducing HTML & XHTML:. Goals  Understand hyperlinking  Understand how tags are formed and used.  Understand HTML as a markup language  Understand.
Chapter 12 Creating and Using XML Documents HTML5 AND CSS Seventh Edition.
XML – Extensible Markup Language Sivakumar Kuttuva & Janusz Zalewski.
Creating a Simple Page: HTML Overview
Pemrograman Berbasis WEB XML part 2 -Aurelio Rahmadian- Sumber: w3cschools.com.
XML introduction to Ahmed I. Deeb Dr. Anwar Mousa  presenter  instructor University Of Palestine-2009.
 Introduction to XML Introduction to XML  Features of XML Features of XML  Syntax of XML Syntax of XML  Syntax rules of XML document Syntax rules.
XML Anisha K J Jerrin Thomas. Outline  Introduction  Structure of an XML Page  Well-formed & Valid XML Documents  DTD – Elements, Attributes, Entities.
CREATED BY ChanoknanChinnanon PanissaraUsanachote
XML: Overview MIS 181.9: Service Oriented Architecture 2 nd Semester,
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.
Introduction to XML Eugenia Fernandez IUPUI. What is XML? From the World Wide Web Consortium (W3C) The Extensible Markup Language (XML) is the universal.
WORKING WITH XSLT AND XPATH
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.
Introduction to XML 1. XML XML started out as a standard data exchange format for the Web Yet, it has quickly become the fundamental instrument in the.
1 © Netskills Quality Internet Training, University of Newcastle Introducing XML © Netskills, Quality Internet Training University.
Demystifying the eXtensible Markup Language Nick Roberts & Jim Few
XML 1 Enterprise Applications CE00465-M XML. 2 Enterprise Applications CE00465-M XML Overview Extensible Mark-up Language (XML) is a meta-language that.
 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,
Session IV Chapter 9 – XML Schemas
 2004 Prentice Hall, Inc. All rights reserved. 1 Chapter 34 - Case Study: Active Server Pages and XML Outline 34.1 Introduction 34.2 Setup and Message.
JSTL, XML and XSLT An introduction to JSP Standard Tag Library and XML/XSLT transformation for Web layout.
CITA 330 Section 6 XSLT. Transforming XML Documents to XHTML Documents XSLT is an XML dialect which is declared under namespace "
Presentation Topic: XML and ASP Presented by Yanzhi Zhang.
XML eXtensible Markup Language. Topics  What is XML  An XML example  Why is XML important  XML introduction  XML applications  XML support CSEB.
Softsmith Infotech XML. Softsmith Infotech XML EXtensible Markup Language XML is a markup language much like HTML Designed to carry data, not to display.
XML 2nd EDITION Tutorial 1 Creating An Xml Document.
1 XML An Overview Roger Debreceny University of Hawai`i Skip White University of Delaware XBRL Workshop, August 2006.
Waqas Anwar Next SlidePrevious Slide. Waqas Anwar Next SlidePrevious Slide XML XML stands for EXtensible Markup Language.
1 Introduction  Extensible Markup Language (XML) –Uses tags to describe the structure of a document –Simplifies the process of sharing information –Extensible.
XP 1 Creating an XML Document Developing an XML Document for the Jazz Warehouse XML Tutorial.
17 Apr 2002 XML Syntax: Documents Andy Clark. Basic Document Structure Element tags – Elements have associated attributes Text content Miscellaneous –
McGraw-Hill/Irwin © 2004 by The McGraw-Hill Companies, Inc. All rights reserved. Applying eXtensible Style Sheets (XSL) Ellen Pearlman Eileen Mullin Programming.
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.
An Introduction to XML Sandeep Bhattaram
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.
Jennifer Widom XML Data Introduction, Well-formed XML.
Unit 3 — Advanced Internet Technologies Lesson 11 — Introduction to XSL.
 XSL – Extensible Style Sheet Language  XSLT – XSL Transformations › Used to transform XML documents to other formats,like HTML or other XML documents.
XP Tutorial 9New Perspectives on HTML and XHTML, Comprehensive 1 Working with XHTML Creating a Well-Formed Valid Document Tutorial 9.
XML. HTML Before you continue you should have a basic understanding of the following: HTML HTML was designed to display data and to focus on how data.
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,
Chapter 29. Copyright 2003, Paradigm Publishing Inc. CHAPTER 29 BACKNEXTEND 29-2 LINKS TO OBJECTIVES Attach an XML Schema Attach an XML Schema Load XML.
Introduction to XML Kanda Runapongsa Dept. of Computer Engineering Khon Kaen University.
VCE IT Theory Slideshows by Mark Kelly study design By Mark Kelly, vceit.com, Begin.
XML Extensible Markup Language
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.
I Copyright © 2004, Oracle. All rights reserved. Introduction.
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.
XML Data Introduction, Well-formed XML.
Presentation transcript:

Copyright © 2012 Accenture All Rights Reserved.Copyright © 2012 Accenture All Rights Reserved. Accenture, its logo, and High Performance Delivered are trademarks of Accenture. Application Delivery Fundamentals 2.0: Java Module 24: Web-Based Programming XML and XSLT

Copyright © 2012 Accenture All Rights Reserved. Module Objectives Describe XML features and purpose. Explain the rules for well-formed XML. Identify the key features of the XML Schema. Explain XML Validation. Explain XML Transformation (XML and XSLT). At the end of this module, you will be able to: 2

Copyright © 2012 Accenture All Rights Reserved. Agenda This module covers the following topics: XML Overview and Characteristics XML Purpose XML Self-Describing Syntax XML Sample Areas of Application Well-Formed XML XML Transformation Summary 3

Copyright © 2012 Accenture All Rights Reserved. XML Overview (1 of 2) 4 eXtensible Markup Language (XML) is a common tool for data transmission between a variety of web applications and thus simplifies data sharing. XML standardises and simplifies a way of encoding both text and data that can be exchanged across a diverse range of hardware, operating systems, and applications.

Copyright © 2012 Accenture All Rights Reserved. XML Overview (2 of 2) 5 It is similar enough to HTML so those who are familiar with HTML can pick up basic XML knowledge. However, XML is not a replacement for HTML. In most web applications, XML is used to transport data, while HTML is used to format and display the data.

Copyright © 2012 Accenture All Rights Reserved. Simple A text file Extensible Heavily used Platform independent A gateway for communication Based on international standards Allows validation using schema languages XML XML Characteristics 6

Copyright © 2012 Accenture All Rights Reserved. XML User-defined tags Serves as a base/standard for other languages Used to store and exchange data Reuse of data Transmit data to any device XML Purpose 7

Copyright © 2012 Accenture All Rights Reserved. XML A Self-Describing Syntax (1 of 3) 8 XML tags can be defined to describe the data in a file allowing users to describe the structure and nature of the data. In essence, the file becomes self-describing and there are three key advantages to this. 1. Users can locate information easily within a file. James S. Hubert 618 West Blvd. Houston TX USA Hubert USA

Copyright © 2012 Accenture All Rights Reserved. XML A Self-Describing Syntax (2 of 3) 9 2. The file provides sufficient information for the software to determine how to read the data. James S. Hubert 618 West Blvd. Houston TX USA In this example the software has determined that is a numeric data value.

Copyright © 2012 Accenture All Rights Reserved. XML A Self-Describing Syntax (3 of 3) The location of information is not dependent on where it occurs within the file, but where the tags occur within the file. This means that it is much easier to modify the data structure. Despite the two lines being reversed the task of retrieving the information would be exactly the same. This can be a huge advantage if larger modifications need to be made to a data set, such as adding a new set of variables.. Houston TX USA.. Houston TX USA..

Copyright © 2012 Accenture All Rights Reserved. XML Used for database design Commonly used for data interchange Used for configuration Documents can be transformed Used for internal documentation XML Sample Areas of Application 11

Copyright © 2012 Accenture All Rights Reserved. XML Well-Formed XML A well-formed XML document has to follow several generic rules, such as: XML declaration One root element Proper nesting Elements must obey the XML naming convention Every start tag must have a matching end tag Proper attributes and comments 12

Copyright © 2012 Accenture All Rights Reserved. XML Well Formed XML: Example (1 of 3) Every start tag must have a matching end tag Proper attributes and comments NewCodington NewCodington NewCodington NewCodington 13

Copyright © 2012 Accenture All Rights Reserved. XML Well Formed XML: Example (2 of 3) XML declaration Provides the version of XML in use It could also specify the character encoding used One root element

Copyright © 2012 Accenture All Rights Reserved. XML Well Formed XML: Example (3 of 3) Proper nesting Elements must obey the XML naming convention NewCodington NewCodington Dalmatian Dog Dalmatian Dog 15

Copyright © 2012 Accenture All Rights Reserved. Well Formed XML: See It 16 Demonstration: Faculty will demonstrate how to fix errors in XML code to create well-formed XML code. Time Allocated: 10 minutes Environment or File: ZooDemo.xml Steps: 1.Open the project Week1n2Codebase_participant in Eclipse 2.Go to the src folder 3.Go to com.accenture.adf.newcodington.module24.sample 4.Open the ZooDemo.xml file. 5.Locate and fix the XML code errors for the following: Tags, Attributes, Declarations, Naming conventions, Root elements, Nesting

Copyright © 2012 Accenture All Rights Reserved. Well Formed XML: Try It Now You Try It: Fix the errors in the XML code to create well- formed XML code. 17 Time Allocated: 15 minutes Environment or File: EventsTryIt.xml Steps: 1.Open the project Week1n2Codebase_participant in Eclipse 2.Go to the src folder 3.Go to com.accenture.adf.newcodington.module24.sample 4.Open the EventsTryIt.xml file. 5.Locate and fix the XML code errors for the following: Tags, Attributes, Declarations, Naming conventions, Root elements, Nesting

Copyright © 2012 Accenture All Rights Reserved. Well Formed XML: Solution (1 of 2) Your faculty will now provide you with the Solution to check and update your file. The XML code extract should look something like this:. 9 Adults and Kids 900 to P002 ChristmasEveBall Ball for Singles 3 Adults and Kids 1700 to P003 18

Copyright © 2012 Accenture All Rights Reserved. Well Formed XML: Solution (2 of 2) The XML code extract should look something like this: Klenz for Kids Painting and singing for Kids 6 Kids 1000 to P

Copyright © 2012 Accenture All Rights Reserved. XML Transformation Overview XSLT Processor Source Document (XML) Output Document (XML, HTML,..) XSL Style Sheet 20

Copyright © 2012 Accenture All Rights Reserved. XML Transformation Purpose XML transformation: Performs styling operations on XML data. Performs advanced data processing on XML data. Creates content that can be used for various purposes. 21

Copyright © 2012 Accenture All Rights Reserved. XML Transformation Sample Areas of Application (SAA) XSLT style sheets can take the same data present in an XML file and do the following: Display them in a traditional or mobile browser. Return them as the response for a Web service. 22

Copyright © 2012 Accenture All Rights Reserved. XML Transformation SAA Example: XSL File (1 of 2) 23 This is an example of an.xsl file: <xsl:stylesheet version="1.0" xmlns:xsl=" My Animal Collection Animal Quantity

Copyright © 2012 Accenture All Rights Reserved. XML Transformation SAA Example: XSL File (2 of 2) 24.xsl file continued:

Copyright © 2012 Accenture All Rights Reserved. XML Transformation SAA Example: XML File 25 This is an example of an.xml file: Monkey 20 Elephant 6 Tiger 3 This statement links the XML document to the XSL style sheet

Copyright © 2012 Accenture All Rights Reserved. Questions and Comments 26

Copyright © 2012 Accenture All Rights Reserved. Module Summary XML is used for transmitting data to any device, is independent of language, is self-describing, and can be edited using a standard text editor. Elements in a well-formed XML document must follow generic rules. Valid XML should not contain any tags that are not permitted by the schema. XML Transformation (XSLT) is designed to transform an input XML document into an output XML document to satisfy a specific goal. 27 The key points from this module are: