University of California, Irvine Presented at the JA-SIG conference, December 2003 XSLTC to the Rescue Brief Introduction to XSLTC and a uPortal Case Study.

Slides:



Advertisements
Similar presentations
1 XSLT – eXtensible Stylesheet Language Transformations Modified Slides from Dr. Sagiv.
Advertisements

CSCE 145: Algorithmic Design I Chapter 1 Intro to Computers and Java Muhammad Nazmus Sakib.
1 OBJECTIVES To generate a web-based system enables to assemble model configurations. to submit these configurations on different.
ANT – Another Neat Tool Representation and Management of Data on the Internet.
MICROCONTROLLED HOME Keith Jones EKU Deparment of Technology CEN.
HyperContent 2.0 JA-SIG Winter Conference December 5, 2005 Alex Vigdor, Columbia University.
Chapter 9 Chapter 9: Managing Groups, Folders, Files, and Object Security.
Java: History and Introduction (Lecture # 1). History… Java – Based on C and C++ – Developed in 1991 for intelligent consumer electronic devices – Green.
Lecture 2: Do you speak Java?. From Problem to Program Last Lecture we looked at modeling with objects! Steps to solving a business problem –Investigate.
28/1/2001 Seminar in Databases in the Internet Environment Introduction to J ava S erver P ages technology by Naomi Chen.
1 Ant – Another Neat Tool Representation and Management of Data on the Internet.
Winter 2005Jason Prideaux1 Apache ANT A platform independent build tool for Java programs.
New uPortal Contributions from the University of Wisconsin-Madison Jim Helwig University of Wisconsin-Madison Eric Dalquist Unicon, Inc. JA-SIG December.
Figure 1.1 Interaction between applications and the operating system.
Searching uPortal with a third party Search Engine Katya Sadovsky University of California, Irvine Administrative Computing Services
Developing the NSDL User Portal Dean Krafft, Cornell University
70-290: MCSE Guide to Managing a Microsoft Windows Server 2003 Environment Chapter 4: Implementing and Managing Group and Computer Accounts.
Academic Services Interactive Media Managing the Web with Java JA-SIG Winter 2002 Robert Sherratt Academic Services, Interactive Media.
70-290: MCSE Guide to Managing a Microsoft Windows Server 2003 Environment Chapter 4: Implementing and Managing Group and Computer Accounts.
1 Java Server Pages Can web pages be created specially for each user? What part does Java play?
Using Ant to build J2EE Applications Kumar
Introduction to Programming G50PRO University of Nottingham Unit 1 : Introduction Paul Tennent
UPortal 3 – What's New? JA-SIG Conference, Spring 2008 uPortal What's New? Eric Dalquist University of Wisconsin - Madison.
M. Taimoor Khan * Java Server Pages (JSP) is a server-side programming technology that enables the creation of dynamic,
Servlets Environment Setup. Agenda:  Setting up Java Development Kit  Setting up Web Server: Tomcat  Setting up CLASSPATH.
Apache Ant Presented by Donato Testardo Nathan Stark.
© Janice Regan, CMPT 128, Jan CMPT 128 Introduction to Computing Science for Engineering Students Creating a program.
Zhonghua Qu and Ovidiu Daescu December 24, 2009 University of Texas at Dallas.
Introduction to XSLT By Ed Rosenthal And Dave Pion.
An intro to programming. The purpose of writing a program is to solve a problem or take advantage of an opportunity Consists of multiple steps:  Understanding.
Java Introduction Lecture 1. Java Powerful, object-oriented language Free SDK and many resources at
Presenting Statistical Data Using XML Office for National Statistics, United Kingdom Rob Hawkins, Application Development.
Tutorial 121 Creating a New Web Forms Page You will find that creating Web Forms is similar to creating traditional Windows applications in Visual Basic.
UNIX JIN GUO 08/30/00. AGENDA 1.Creation of Unix 2.Unix Uniqueness 3.Unix Architecture 4.Unix Application 5.Unix Security 6.Unix & Web.
UPortal 101 JA-SIG Pre-conference Seminar Susan Bramhall & Andrew Petro Vancouver, BC, June 4, 2006.
The Basics of Javadoc Presented By: Wes Toland. Outline  Overview  Background  Environment  Features Javadoc Comment Format Javadoc Program HTML API.
Versus JEDEC STAPL Comparison Toolkit Frank Toth February 20, 2000.
New uPortal Contributions from the University of Wisconsin-Madison Jim Helwig University of Wisconsin-Madison Eric Dalquist Unicon, Inc. JA-SIG December.
CS266 Software Reverse Engineering (SRE) Reversing and Patching Java Bytecode Teodoro (Ted) Cipresso,
Internationalization: Implementing the XLIFF Standard Jon Allen, Producer instructional media + magic, inc. JA-SIG Summer Conference 2003 June 10, 2003.
Pan European Portal Conference 2003, Geneva April 25, 2003 Elements of Successful uPortal Implementations Implementing uPortal to Guarantee Performance.
Replay Compilation: Improving Debuggability of a Just-in Time Complier Presenter: Jun Tao.
Session 1 Introduction to Java. Objectives Java Simplified / Session 1 / 2 of 32 Explain the history of Java Explain Java in brief List the types of Java.
IBM Software Group ® Context-Sensitive Help with the DITA Open Toolkit Jeff Antley IBM October 4, 2007.
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.
Department of Computer Science Internet Performance Measurements using Firefox Extensions Scot L. DeDeo Professor Craig Wills.
Getting started with Programming using IDE. JAVA JAVA IS A PROGRAMMING LANGUAGE AND A PLATFORM. IT CAN BE USED TO DELIVER AND RUN HIGHLY INTERACTIVE DYNAMIC.
Apache Jakarta Project. What is Jakarta’s mission Jakarta is a Project of the Apache Software Foundation, charged with the creation and maintenance of.
Generative Approaches for Application Tailoring of Mobile Devices Victoria M. Davis, Dr. Jeff Gray (UAB) and Dr. Joel Jones (UA) Portions of this research.
Justin Tilton uPortal Framework and User Interface Demonstration.
14th Oct 2005CERN AB Controls Development Process of Accelerator Controls Software G.Kruk L.Mestre, V.Paris, S.Oglaza, V. Baggiolini, E.Roux and Application.
Lundi 7 décembre 2015 Lavoisier. Motivations data sources provided by many partners –heterogeneity of used technologies objectives –reduce complexity.
Dom and XSLT Dom – document object model DOM – collection of nodes in a tree.
COMMON INTERFACE FOR EMBEDDED SOFTWARE CONFIGURATION by Yatiraj Bhumkar Advisor Dr. Chung-E Wang Department of Computer Science CALIFORNIA STATE UNIVERSITY,
Chapter 9: Networking with Unix and Linux. Objectives: Describe the origins and history of the UNIX operating system Identify similarities and differences.
1 FESA architecture v.1.0 Framework Configuration & Data-entry Tool 5 th December 2003.
Installing Java on a Home machine For Windows Users: Download/Install: Go to downloads html.
The Development Process Compilation. Compilation - Dr. Craig A. Struble 2 Programming Process Problem Solving Phase We will spend significant time on.
1 A Method for Creating Web Sites Representation and Management of Data on the Internet.
Maven. Introduction Using Maven (I) – Installing the Maven plugin for Eclipse – Creating a Maven Project – Building the Project Understanding the POM.
Lecture Transforming Data: Using Apache Xalan to apply XSLT transformations Marc Dumontier Blueprint Initiative Samuel Lunenfeld Research Institute.
An Introduction to Ant. What is Ant? How do you use it? Why would you want to?
Topic 2: Hardware and Software
Installing Java on a Home machine
Done By: Ashlee Lizarraga Ricky Usher Jacinto Roches Eli Gomez
Using XML Tools CS551 – Fall 2001.
LOCO Extract – Transform - Load
CCNA 3 v3.1 Module 6 Switch Configuration
Installing Java on a Home machine
(Computer fundamental Lab)
Presentation transcript:

University of California, Irvine Presented at the JA-SIG conference, December 2003 XSLTC to the Rescue Brief Introduction to XSLTC and a uPortal Case Study Katya Sadovsky Administrative Computing Services UC Irvine

University of California, Irvine Presented at the JA-SIG conference, December 2003 Agenda  Overview  What is XSLTC  XSLT/XSTLC performance comparison demo  How it works  XSLTC Transformer Attributes  Compiling & Running Translets  Case study: using XSLTC with uPortal  Setting up uPortal with XSLTC  Required Code Modifications  Q&A

University of California, Irvine Presented at the JA-SIG conference, December 2003 Overview: What is XSLTC  Java-based XSLTC was originally developed by Sun Microsystems XML Technology Center.  It has since been donated to Apache’s Xalan-J2 project (This presentation will cover the Apache Xalan XSLTC tool).  As opposed to using interpreted XSL transformations, XSLTC allows users to pre-compile style-sheets into reusable byte code.  XSTLC yields significant performance improvement for server-side processing.

University of California, Irvine Presented at the JA-SIG conference, December 2003 Performance Demo

University of California, Irvine Presented at the JA-SIG conference, December 2003 Overview: How it Works

University of California, Irvine Presented at the JA-SIG conference, December 2003 Overview: How it Works  XSL style-sheet instructions are compiled into Java byte code: translet classes.  Translets typically have a very small memory footprint.  Once translets are compiled, they can be used for transformations.  You may save translet class files on disk and re- use them at a later time.

University of California, Irvine Presented at the JA-SIG conference, December 2003 XSLTC Transformer Attributes

University of California, Irvine Presented at the JA-SIG conference, December 2003 Compiling Translets  There are several ways to compile translets:  pre-compile translets into class files using a command-line utility  compile translets on the fly while running a transformation with command-line utility  Compile translets on the fly while running transformations using Java APIs

University of California, Irvine Presented at the JA-SIG conference, December 2003 Running Translets  There are also two ways to run transformations:  Using command-line utilities:  XSLTC-specific transformation processor class  Regular Xalan transformation processor class with a few extra options  Using Java APIs

University of California, Irvine Presented at the JA-SIG conference, December 2003 Compiling Translets: Command Line Utility  Xalan-J XSLTC library comes with a command line utility to pre-compile style-sheets:  Executing java -classpath xalan.jar:xercesImpl.jar:xml-apis.jar org.apache.xalan.xsltc.cmdline.Compile xhtml.xsl will create xhtml.class under the current working directory.  Executing java -classpath xalan.jar:xercesImpl.jar:xml-apis.jar org.apache.xalan.xsltc.cmdline.Compile –p edu.uci.translets xhtml.xsl will create edu/uci/translets/xhtml.class under the current working directory.

University of California, Irvine Presented at the JA-SIG conference, December 2003 Running Translets: Command Line Utility  To run a transformation with a pre-compiled translet execute java -classpath xalan.jar:xercesImpl.jar:xml- apis.jar org.apache.xalan.xsltc.cmdline.Transform sample.xhtml org.jasig.portal.channels.webproxy.translet.xhtml  You may also use the regular Xalan command line utility to run XSLTC transformations and generate translets: java -classpath xalan.jar:xercesImpl.jar:xml-apis.jar org.apache.xalan.xslt.Process -XSLTC -IN sample.xhtml -XSL xhtml.xsl -XO –XP org.jasig.portal.channels.webproxy.translet

University of California, Irvine Presented at the JA-SIG conference, December 2003 XSLTC Translets: Using Java APIs

University of California, Irvine Presented at the JA-SIG conference, December 2003 Configuring uPortal with XSLTC

University of California, Irvine Presented at the JA-SIG conference, December 2003 Outline  Performance Improvement Stats  uPortal Code Modifications  Issues & Solutions  Pre-compiling Translets

University of California, Irvine Presented at the JA-SIG conference, December 2003 Performance Improvement Stats  The following are results of running XSLT and XSLTC based transformations on uPortal’s CGenericXSLT channel with style-sheet caching set to 'on'

University of California, Irvine Presented at the JA-SIG conference, December 2003 Issues & Solutions  Issue  XSLTC functionality is still limited, so not all the style-sheets will work with it  Solution  Apply XSLTC selectively : only use it if a pre-compiled translet exists. Use XSLT in all other cases.

University of California, Irvine Presented at the JA-SIG conference, December 2003 Issues & Solutions, cont’d  Issue  XSLTC bug: NullPointerException in org.apache.xalan.xsltc.trax.DOM2SAX (line 350):  Solution  Fixed the bug:  Recompiled the code and rebuilt xalan.jar

University of California, Irvine Presented at the JA-SIG conference, December 2003 Issues & Solutions, cont’d  Issue  When the destination-directory attribute is not set, the transformer factory will look for the translet in /.  Solution  Keep this in mind when pre-compiling the style-sheets: set the destination-directory to.

University of California, Irvine Presented at the JA-SIG conference, December 2003 uPortal Code Modifications  Our uPortal implementation uses a combination of XSLT and XSLTC based transformations.  The following uPortal files had to be modified to enable XSLTC processing:  properties/portal.properties  source/org/jasig/portal/utils/XSLT.java

University of California, Irvine Presented at the JA-SIG conference, December 2003 Code Modifications: portal.properties  We wanted to have the ability to turn off all XSLTC based transformations in uPortal. Hence, we added the following property to portal.properties file: org.jasig.portal.utils.XSLT.useXSLTC=true

University of California, Irvine Presented at the JA-SIG conference, December 2003 Code Modifications: XSLT.java  Since we use a combination of XSLT and XSLTC based transformations, we needed to operate with two different transformer factories. The following methods were changed:  getSAXTFactory()  getTemplates()  getTransformerHandler()  The following slides contain a simplified view of our implementation.

University of California, Irvine Presented at the JA-SIG conference, December 2003 XSLT.java: Global Class Changes

University of California, Irvine Presented at the JA-SIG conference, December 2003 XSLT.java: original getSAXTFactory method

University of California, Irvine Presented at the JA-SIG conference, December 2003 XSLT.java: modified getSAXTFactory method

University of California, Irvine Presented at the JA-SIG conference, December 2003 XSLT.java: original getTemplates method

University of California, Irvine Presented at the JA-SIG conference, December 2003 XSLT.java: modified getTemplates method

University of California, Irvine Presented at the JA-SIG conference, December 2003 XSLT.java: original getTrasformerHandler method

University of California, Irvine Presented at the JA-SIG conference, December 2003 XSLT.java: modified getTrasformerHandler method

University of California, Irvine Presented at the JA-SIG conference, December 2003 Pre-compiling Translets  We use an Ant target to compile translets:

University of California, Irvine Presented at the JA-SIG conference, December 2003 Pre-compiling Translets  uPortal style-sheets we pre-compile:  org/jasig/portal/layout/tab-column/nested-tables/*.xsl  org/jasig/portal/layout/tab-column/*.xsl  org/jasig/portal/channels/permissionsmanager/*.xsl  org/jasig/portal/channels/webproxy/*.xsl  org/jasig/portal/channels/CHeader/*.xsl  org/jasig/portal/channels/Clogin/*.xsl  org/jasig/portal/channels/Capplet/*.xsl  org/jasig/portal/channels/CSelectSystemProfile/*.xsl  org/jasig/portal/channels/CGenericXSLT/*.xsl  org/jasig/portal/channels/CGenericXSLT/footer/*.xsl  org/jasig/portal/channels/CGenericXSLT/RSS/*.xsl  org/jasig/portal/channels/CError/*.xsl  org/jasig/portal/channels/CUserPreferences/*.xsl  org/jasig/portal/channels/CUserPreferences/tab-column  org/jasig/portal/channels/CInlineFrame/*.xsl  org/jasig/portal/channels/CImage/*.xsl  org/jasig/portal/channels/bookmarks/*.xsl

University of California, Irvine Presented at the JA-SIG conference, December 2003 Conclusions  XSLTC technology is still relatively new. However,  In most situations it may significantly improve transformation performance,especially for large input documents.  Performance improvements also allow for better scalability.  uPortal software can be XSLTC-enabled with minimal code modifications.

University of California, Irvine Presented at the JA-SIG conference, December 2003 Links & References  Xalan XSLTC Home:  XSLTC and the Java Web Services Developer Pack (Sun): sltc_webpack.html sltc_webpack.html  This presentation is available at  Our uPortal-based site:

University of California, Irvine Presented at the JA-SIG conference, December 2003 Q & A