Data Integration through XML/XSLT. Presenter: Xin Gu



Similar documents
XSLT Mapping in SAP PI 7.1

Chapter 3: XML Namespaces

Extensible Markup Language (XML): Essentials for Climatologists

Introduction to XML Applications

The Web Web page Links 16-3

HTML, CSS, XML, and XSL

Managing XML Documents Versions and Upgrades with XSLT

Last Week. XML (extensible Markup Language) HTML Deficiencies. XML Advantages. Syntax of XML DHTML. Applets. Modifying DOM Event bubbling

XML: extensible Markup Language. Anabel Fraga

Web Services Technologies

An XML Based Data Exchange Model for Power System Studies

Extending the Linked Data API with RDFa

Cleo Communications. CUEScript Training

i-scream The future is bright; the future is blue.

XML WEB TECHNOLOGIES

Developing XML Solutions with JavaServer Pages Technology

Web Development I & II*

JavaScript: Introduction to Scripting Pearson Education, Inc. All rights reserved.

Introduction to Web Services

Semistructured data and XML. Institutt for Informatikk INF Ahmet Soylu

10CS73:Web Programming

Terms and Definitions for CMS Administrators, Architects, and Developers

Overview of DatadiagramML

DTD Tutorial. About the tutorial. Tutorial

ART 379 Web Design. HTML, XHTML & CSS: Introduction, 1-2

CST6445: Web Services Development with Java and XML Lesson 1 Introduction To Web Services Skilltop Technology Limited. All rights reserved.

JobScheduler Web Services Executing JobScheduler commands

XML and Data Management

Developers Guide. Designs and Layouts HOW TO IMPLEMENT WEBSITE DESIGNS IN DYNAMICWEB. Version: English

By Nabil ADOUI, member of the 4D Technical Support team

Building A Very Simple Web Site

JobScheduler Events Definition and Processing

IBM Tivoli Federated Identity Manager V6.2.2 Implementation. Version: Demo. Page <<1/10>>

Software documentation systems

An Approach to Eliminate Semantic Heterogenity Using Ontologies in Enterprise Data Integeration

Importing Lease Data into Forms Online

XML- New meta language in e-business

Get Success in Passing Your Certification Exam at first attempt!

About webpage creation

PELLISSIPPI STATE TECHNICAL COMMUNITY COLLEGE MASTER SYLLABUS CIW XML/DHTML/CSS/XHTML WEB 2350

NewsletterAdmin 2.4 Setup Manual

Structured vs. unstructured data. Motivation for self describing data. Enter semistructured data. Databases are highly structured

CREATE A CUSTOM THEME WEBSPHERE PORTAL

Using Database Metadata and its Semantics to Generate Automatic and Dynamic Web Entry Forms

LabVIEW Internet Toolkit User Guide

T XML in 2 lessons! %! " #$& $ "#& ) ' */,: -.,0+(. ". "'- (. 1

Cover Page. Dynamic Server Pages Guide 10g Release 3 ( ) March 2007

Script Handbook for Interactive Scientific Website Building

Standard Recommended Practice extensible Markup Language (XML) for the Interchange of Document Images and Related Metadata

Dynamic Styling in Web Development

About XML in InDesign

by LindaMay Patterson PartnerWorld for Developers, AS/400 January 2000

Other Language Types CMSC 330: Organization of Programming Languages

Formatting with FrameMaker + SGML s EDD

Introduction to Ingeniux Forms Builder. 90 minute Course CMSFB-V6 P

Internationalization Tag Set 1.0 A New Standard for Internationalization and Localization of XML

REDUCING THE COST OF GROUND SYSTEM DEVELOPMENT AND MISSION OPERATIONS USING AUTOMATED XML TECHNOLOGIES. Jesse Wright Jet Propulsion Laboratory,

T Network Application Frameworks and XML Web Services and WSDL Tancred Lindholm

Representation of E-documents in AIDA Project

Kuali Financial System Interface Specification for Electronic Invoice Feed

My IC Customizer: Descriptors of Skins and Webapps for third party User Guide

Introduction to XHTML. 2010, Robert K. Moniot 1

What I Wish I Had Known. In my first 30 days with umbraco

An Approach to Translate XSLT into XQuery

Eventia Log Parsing Editor 1.0 Administration Guide

Markup Languages and Semistructured Data - SS 02

Web Development. Owen Sacco. ICS2205/ICS2230 Web Intelligence

Concrete uses of XML in software development and data analysis.

INTRO TO XMLSPY (IXS)

Firewall Builder Architecture Overview

Short notes on webpage programming languages

Quiz! Database Indexes. Index. Quiz! Disc and main memory. Quiz! How costly is this operation (naive solution)?

CSS 101. CSS CODE The code in a style sheet is made up of rules of the following types

XSL - Introduction and guided tour

LAB MANUAL CS (22): Web Technology

JavaScript: Control Statements I

Authoring Within a Content Management System. The Content Management Story

Command-Line Tool for View Manager View Manager 4.0

Chapter 19: XML. Working with XML. About XML

Building the Tower of Babel: Converting XML Documents to VoiceXML for Accessibility 1

Hydrologic Modeling System HEC-HMS

Exchanger XML Editor - Canonicalization and XML Digital Signatures

Chapter 16 Exercises and Answers

Web Data Extraction: 1 o Semestre 2007/2008

Perl in a nutshell. First CGI Script and Perl. Creating a Link to a Script. print Function. Parsing Data 4/27/2009. First CGI Script and Perl

XML and the College Website A Practical Look at the Use of XML and XSL

But have you ever wondered how to create your own website?

A DIAGRAM APPROACH TO AUTOMATIC GENERATION OF JSP/SERVLET WEB APPLICATIONS

Transcription:

Data Integration through XML/XSLT Presenter: Xin Gu

q7.jar op.xsl goalmodel.q7 goalmodel.xml q7.xsl help, hurt GUI +, -, ++, -- goalmodel.op.xml merge.xsl goalmodel.input.xml profile.xml Goal model configurator goalmodel.output.xml config.xml leaf goals (true/false) param. (integer,string) config.xsl config.properties

XML (extensible Markup Language) Markup in XML A sequence of characters inserted into a text file, to indicate how the file should be displayed, or to describe the logical structure. Markup is everything in a document that is not content. Initially used in typesetting a document Markup indicators are called tags. e.g. <font color= blue > A pair of tags and the things enclosed in tags is called element. e.g. <font color= blue > formatted as blue </font>

What is XML (extensible Markup Language) (cont.) Extensible In general: Something that is designed that users or later designers can extend its capability. In XML: Allow you to define your own tags to describe data You can represent any information (define new tags) You can represent in the way you want (define new structure) XML is a meta-language A language to define other languages Use DTD to define the syntax of a language

XML Element An element consists of: an opening tag the content a closing tag Example: <lecturer>david Billington</lecturer> Tag names can be chosen almost freely: The first character must be a letter, an underscore, or a colon No name may begin with the string xml in any combination of cases E.g. Xml, xml

Contents of XML Elements Content may be text, or other elements, or nothing <lecturer> <name>david Billington</name> <phone> +61 7 3875 507 </phone> </lecturer> If there is no content, then the element is called empty; it is abbreviated as follows: <lecturer/> <lecturer></lecturer>

Attributes An attribute is a name-value pair inside the opening tag of an element <lecturer name="david Billington" phone="+61 7 3875 507"/> Example <order orderno="23456" customer="john Smith" date="october 15, 2002"> <item itemno="a528" quantity="1"/> <item itemno="c817" quantity="3"/> </order>

Element and Attribute <order> <orderno>23456</orderno> <customer>john Smith</customer> <date>october 15, 2002</date> <item> <itemno>a528</itemno> <quantity>1</quantity> </item> <item> <itemno>c817</itemno> <quantity>3</quantity> </item> </order> <order orderno="23456" customer="john Smith" date="october 15, 2002"> <item itemno="a528 quantity="1"/> <item itemno="c817 quantity="3"/> </order> Attributes can be replaced by elements When to use elements and when attributes is a matter of taste But attributes cannot be nested.

Further Components of XML Comments A piece of text that is to be ignored by parser <!-- This is a comment --> Processing Instructions (PIs) Define procedural attachments <?stylesheet type="text/css" href="mystyle.css"?>

XSLT(XML Stylesheet Language Transformation) XSLT Version 1.0 is a W3C Recommendation, 1999 http://www.w3.org/style/xsl/ XSLT is used to transform XML to other formats XSLT 1 XML XML XSLT 2 HTML XSLT 3 TEXT

XSLT basics XSLT is an XML document itself It is a tree transformation language XSLT XML XSLT processor It is a rule-based declarative language XSLT program consists of a sequence of rules. It is a functional programming language.

XSL Templates An XSL style sheet consists of one or more set of rules that are called templates. Each template contains rules to apply when a specified node is matched. The <xsl:template> element is used to build templates. The match attribute is used to associate a template with an XML element.

XSLT Example: transform to another XML <?xml version="1.0"?> <stocks> <stock exchange="nasdaq"> <name>amazon corp </name> <symbol>amzn</symbol> <price>16</price> </stock> <stock exchange="nyse"> <name>ibm inc</name> <price>102</price> </stock> </stocks> stock.xml? <?xml version="1.0 > <companies> <company> <value>24 CAD </value> <name>amazon corp</name> </company> <company> <value>153 CAD </value> <name>ibm inc</name> </company> </companies> output Rename the element names Remove the attribute and the symbol element Change the order between name and price. Change the US dollar to CAD.

XSLT rule: <xsl:template> <xsl:template match="stock"> <company> <value> <xsl:value-of select="price*1.5"/> CAD </value> <name> <xsl:value-of select="name"/> </name> <company> </xsl:template> xslt template for <stock> <?xml version="1.0"?> <stocks> <stock exchange="nasdaq"> <name>amazon corp </name> <symbol>amzn</symbol> <price>16</price> </stock> <stock exchange="nyse"> <name>ibm inc</name> <price>102</price> </stock> </stocks> stock.xml <company> <value> get the value of <price>* 1.5, i.e. 24 CAD </value> <name> get the value of <name>, i.e amazon </name> </company> Part of the output