University of Jyväskylä/AHo & VLy Experiences of Document Transformations with XSLT and DOM Anne Honkaranta, Virpi Lyytikäinen, Pasi Tiitinen, University.

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

Copyright © 2003 Pearson Education, Inc. Slide 8-1 Created by Cheryl M. Hughes, Harvard University Extension School Cambridge, MA The Web Wizards Guide.
1/7 ITApplications XML Module Session 8: Introduction to Programming with XML.
XSL XSLT and XPath 11-Apr-17.
XML Parsing Using Java APIs AIP Independence project Fall 2010.
XML Prashant Karmarkar Brendan Nolan Alexander Roda.
XML DOM and SAX Parsers By Omar RABI. Introduction to parsers  The word parser comes from compilers  In a compiler, a parser is the module that reads.
XML is a set of rules for building markup languages. It is not just glorified HTML or only for the internet. XML is a family of technologies that can do.
Introduction to XML Extensible Markup Language
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.
Overview of Search Engines
Technical Track Session XML Techie Tools Tim Bornholt.
By: Shawn Li. OUTLINE XML Definition HTML vs. XML Advantage of XML Facts Utilization SAX Definition DOM Definition History Comparison between SAX and.
DHTML. What is DHTML?  DHTML is the combination of several built-in browser features in fourth generation browsers that enable a web page to be more.
KINOLINA.COM XML Standards and Vocabulary Development Eric Gould December 2002.
5/5/2005Toni Räikkönen Internet based data collection from enterprises using XML questionnaires and XCola engine CoRD Meeting May 11th 2005.
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 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.
School of Computing and Management Sciences © Sheffield Hallam University To understand the Oracle XML notes you need to have an understanding of all these.
XP New Perspectives on XML, 2 nd Edition Tutorial 10 1 WORKING WITH THE DOCUMENT OBJECT MODEL TUTORIAL 10.
© 2002 by Prentice Hall 1 David M. Kroenke Database Processing Eighth Edition Chapter 14 Networks, Multi-Tier Architectures, and XML.
Sheet 1XML Technology in E-Commerce 2001Lecture 7 XML Technology in E-Commerce Lecture 7 XSL Formatting Objects, Java Data Binding.
XML Transformations Eugenia Fernandez IUPUI. Stylesheet Technologies Browser-based Presentation HTML Cascading Stylesheets Programming-based Transformation.
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.
Advanced Java Session 9 New York University School of Continuing and Professional Studies.
Introduction to XML Extensible Markup Language. What is XML XML stands for eXtensible Markup Language. A markup language is used to provide information.
Intro. to XML & XML DB Bun Yue Professor, CS/CIS UHCL.
Electronic Commerce COMP3210 Session 4: Designing, Building and Evaluating e-Commerce Initiatives – Part II Dr. Paul Walcott Department of Computer Science,
 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.
Weekend MS CS Program Internet and Web Technologies COT 5930 Web Project Development - Ajax Dr. Roy Levow, Associate Chair & Professor
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.
Web Services for Satellite Emulation Development Kathy J. LiszkaAllen P. Holtz The University of AkronNASA Glenn Research Center.
Active Server Pages  In this chapter, you will learn:  How browsers and servers interacted on the Internet when the Internet first became popular 
WEB BASED DATA TRANSFORMATION USING XML, JAVA Group members: Darius Balarashti & Matt Smith.
McGraw-Hill/Irwin © 2004 by The McGraw-Hill Companies, Inc. All rights reserved. Scripting with the DOM Ellen Pearlman Eileen Mullin Programming the Web.
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.
School of Computing and Information Systems CS 371 Web Application Programming XML and JSON Encoding Data.
XML and Its Applications Ben Y. Zhao, CS294-7 Spring 1999.
AxKit A member of the Apache XML project Ryan Maslyn Kyle Bechtel.
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.
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 –
Dom and XSLT Dom – document object model DOM – collection of nodes in a tree.
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.
Accessing XML Documents Using DOM ©NIITeXtensible Markup Language/Lesson 8/Slide 1 of 23 Objectives In this lesson, you will learn to: * Use XML DOM objects.
©Silberschatz, Korth and Sudarshan10.1Database System Concepts W3C - The World Wide Web Consortium W3C - The World Wide Web Consortium.
Martin Kruliš by Martin Kruliš (v1.1)1.
XML Tools (Chapter 4 of XML Book). What tools are needed for a complete XML application? n Fundamental components n Web infrasructure n XML development.
Introduction to the World Wide Web & Internet CIS 101.
Jackson, Web Technologies: A Computer Science Perspective, © 2007 Prentice-Hall, Inc. All rights reserved Chapter 7 Representing Web Data:
XML Introduction to XML Extensible Markup Language.
Apache Cocoon – XML Publishing Framework 데이터베이스 연구실 박사 1 학기 이 세영.
XML and Distributed Applications By Quddus Chong Presentation for CS551 – Fall 2001.
I Copyright © 2004, Oracle. All rights reserved. Introduction.
DHTML.
Unit 4 Representing Web Data: XML
XML Related Technologies
Working with Client-Side Scripting
XML in Web Technologies
Database Processing with XML
Introduction to Internet Programming
Chapter 7 Representing Web Data: XML
XML Problems and Solutions
XML Programming in Java
XML – An Introduction XML is getting a lot of attention right now, because of it leverages existing internet infrastructure and also because it enables.
Extensible Markup Language (XML)
Presentation transcript:

University of Jyväskylä/AHo & VLy Experiences of Document Transformations with XSLT and DOM Anne Honkaranta, Virpi Lyytikäinen, Pasi Tiitinen, University of Jyväskylä, Finland inSGML project

University of Jyväskylä/AHo & VLy Content Poem Publishers, Inc. Poems Publishing environment Transformations Tranformation techniques Transformations in server-client environment Tranformations in Poem Publishers, Inc Challenges encountered Lessons learned

University of Jyväskylä/AHo & VLy Poem Publishers, Inc. Fictional company Publishes Finnish poems on WWW Poems are authored in XML format according to a DTD The company offers the poets an authoring environment if so desired The poems can form collections

University of Jyväskylä/AHo & VLy Poem.dtd

University of Jyväskylä/AHo & VLy Publishing environment Microsoft IIS server v. 5.0 Jscript, VBScript ASP 3.0 DOM II Internet Explorer 5.5 or newer CSS Level 2 MSXML 3.0

University of Jyväskylä/AHo & VLy Transformation Changing/converting document format structure /information schema content organization filtering the content all the above Conversion, filtering, and transformation are sometimes used as synonyms

University of Jyväskylä/AHo & VLy Why you need transformations? Authors need content-oriented DTD Different end-user devices When managing documents we need to have them in an optimal format for processing --> three-step publication process authoring -- processing -- output

University of Jyväskylä/AHo & VLy Transformation techniques Event-based mapping technique Tree-based mapping technique Examples of languages SAX-Simple API for XML Omnimark language/program DOM (document object model) — API Balise language/program XSLT language Pros/cons. fast, uses computing resources efficiently does not give very good control over schema (dtd, grammar) of an output document constructing a parse tree in memory takes resources good control over schema of an output documen best suited for complex (context) transformation)

University of Jyväskylä/AHo & VLy Transformations in client-server environment (XSLT/DOM) Alternatives: using PI in XML source document (c) (can be written to the source document on a web server) DOM-interface and DOM objects for loading the source XML and XSLT (c/s) using DOM-interface + scripting language (Vbscript, Jscript) or Java

University of Jyväskylä/AHo & VLy Transformation chain (an example) Output HTML/ XHTML doc rendered by CSS Output doc. + link to CSS doc. Source XML doc XSLT doc. Client Server/Client

University of Jyväskylä/AHo & VLy Example:using PI in source XML <?xml-stylesheet type="text/xsl" href=”poem_html.xsl" ?> <!DOCTYPE POEM SYSTEM "Poem1.dtd">... <xsl:stylesheet..... <LINK rel="stylesheet” type="text/css” href="runo_htm.css" >

University of Jyväskylä/AHo & VLy Example: using DOM-objects+XSLT Dim objDocument, objXSL, strXML Set objDoc = CreateObject("MSXML2.DOMDocument") Set objXSL = CreateObject ("MSXML2.DOMDocument") objDoc.async=false objXSL.async=false objDoc.Load "../Runot/Pinkku1.xml" objXSL.Load "runo1_htmlksi2.xsl" strXML=objDoc.transformNode(objXSL) Document.Write strXML

University of Jyväskylä/AHo & VLy Example: using Vbscript+DOM Inspect nodes of poem Dim root, xmlDoc, child Set xmlDoc = CreateObject("Msxml2.DOMDocument") xmlDoc.async = False xmlDoc.load("Runot/Pinkku1.xml") 'Walk from the document to each of its child nodes: For Each child In xmlDoc.childNodes document.write ”type of node:" & child.nodeType & " | " document.write ”name of node:" & child.nodeName & " | " document.write ”content of node:" & child.text & " " Next

University of Jyväskylä/AHo & VLy Transformation ”types” tested in Poem Publishers, Inc. XML-to-XML XML-to-HTML XML-to-XHTML

University of Jyväskylä/AHo & VLy Transformation needs tested in Poem Publishers, Inc. Tasks tested: combining multiple source documents into output view (poem+header/footer, poem list, poem metadata) combining multiple source documents into one file (making a poem collection) combining XSLT transformation documents for transformation needs (poem+footer)

University of Jyväskylä/AHo & VLy Example: combining XSLT- stylesheets <xsl:stylesheet xmlns:xsl=" version="1.0" xmlns:xlink=" xmlns=" !-- Filename: header.xsl --> <xsl:stylesheet xmlns:xsl= " version="1.0" xmlns:xlink=" xmlns="

University of Jyväskylä/AHo & VLy Challenges Encountered Problems with parsers and versions character encodings figures and links ”too many” tools, scripting languages, and programs

University of Jyväskylä/AHo & VLy Example: Character encodings and parser MSXML INPUT DOC MSXML 3.0 OUTPUT DOC -input doc encoding -maybe character entities -entities are changed to actual character reps. when transformed -uses UTF-16 -detects output encoding from PI when appropriate load/save methods used -otherwise outputs UTF-16 -has some encoding -has an encoding declaration -problem: either of them is ”wrong”

University of Jyväskylä/AHo & VLy Possibilities you can use XSLT-stylesheets as components and combine them a stylesheet can be seen as a re-usable component on the server you can also chain transformations you can keep your data in content-oriented form and provide multiple output versions by using transformations problem: management of DTD’s, transformation components and versions

University of Jyväskylä/AHo & VLy Lessons learned Use same character encodings in source documents and transformation scripts Offer a content oriented DTD for your authors; there is propably need for transformations anyway Support level of CSS, XSLT and XML varies in browsers Tools are available for building XML publishing environments: allow extra time for dealing with possible problems Multiple skills and tools needed in publishing environment, XML is not enough!

University of Jyväskylä/AHo & VLy More information: inSGML project