CS 403: Programming Languages Lecture 12 Fall 2003 Department of Computer Science University of Alabama Joel Jones.

Slides:



Advertisements
Similar presentations
XSLT (eXtensible Stylesheet Language Transformation) 1.
Advertisements

1 Programming Languages (CS 550) Lecture Summary Functional Programming and Operational Semantics for Scheme Jeremy R. Johnson.
CSE 341 Lecture 16 More Scheme: lists; helpers; let/let*; higher-order functions; lambdas slides created by Marty Stepp
XML-Based Course Websites Michael Wollowski Computer Science and Software Engineering Department Rose-Hulman Institute of Technology.
XSLT Stylesheets Some more advanced examples (adapted from the Edinburgh LT site)
Experience with an XML- Based Syllabus Editor and Search Engine Michael Wollowski Computer Science and Software Engineering Department Rose-Hulman Institute.
Mark Hennessy Dept. Computer Science NUI Maynooth 1 CaML continued CS 351 Programming Paradigms Dept. Computer Science NUI Maynooth.
XML Technologies and Applications Rajshekhar Sunderraman Department of Computer Science Georgia State University Atlanta, GA 30302
17 Apr 2002 XML Stylesheets Andy Clark. What Is It? Extensible Stylesheet Language (XSL) Language for document transformation – Transformation (XSLT)
ECA 228 Internet/Intranet Design I Intro to XSL. ECA 228 Internet/Intranet Design I XSL basics W3C standards for stylesheets – CSS – XSL: Extensible Markup.
Technical University of Valencia Computer Science Department SOFSEM’07 (22/01/2007) A Program Slicing Based Method to Filter XML/DTD documents.
Sheet 1XML Technology in E-Commerce 2001Lecture 6 XML Technology in E-Commerce Lecture 6 XPointer, XSLT.
Helsinki University Of Technology X-Smiles Telecommunications Software and Multimedia Laboratory (TML) XForms in X-Smiles Mikko Honkala Helsinki University.
Extensible Stylesheet Language
Introduction to XSLT By Ed Rosenthal And Dave Pion.
An Introduction to XML Presented by Scott Nemec at the UniForum Chicago meeting on 7/25/2006.
Session II Chapter 2 – Chapter 2 – XSLhttp://
1 CIS336 Website design, implementation and management (also Semester 2 of CIS219, CIS221 and IT226) Lecture 6 XSLT (Based on Møller and Schwartzbach,
INTERPRETING IMPERATIVE PROGRAMMING LAGUAGES IN EXTENSIBLE STYLESHEET LANGUAGE TRANSFORMATIONS (XSLT) Authors: Ruhsan Onder Assoc.
XHTML,XML M.Abdullah Mrian. What is the XHTML Why XHTML ?
CS 403: Programming Languages Lecture 19 Fall 2003 Department of Computer Science University of Alabama Joel Jones.
CSE-321 Programming Languages Introduction to Functional Programming (Part II) POSTECH March 13, 2006 박성우.
CS 326 Programming Languages, Concepts and Implementation Instructor: Mircea Nicolescu Lecture 7.
The Information School at the University of Washington INFO 440: Information System Design Fall 2003 * Bob Boiko * MSIM Associate Chair XML Transforms.
CIS 375—Web App Dev II XSL. 2 XSL Introduction XSL stands for _____________________________. XSL is the language used for manipulating and displaying.
CS 403: Programming Languages Lecture 6 Fall 2003 Department of Computer Science University of Alabama Joel Jones.
CS 403: Programming Languages Lecture 1 Fall 2003 Department of Computer Science University of Alabama Joel Jones.
CS 614: Theory and Construction of Compilers Lecture 18 Fall 2003 Department of Computer Science University of Alabama Joel Jones.
1 Introduction  Extensible Markup Language (XML) –Uses tags to describe the structure of a document –Simplifies the process of sharing information –Extensible.
CS 603: Programming Language Organization Lecture 7 Spring 2003 Department of Computer Science University of Alabama Joel Jones.
XML XSLT Variables & parameters Feb 20, Variables ● More like an algebraic variable than a programming variable ● Think of it as similar to a constant.
Accessing Data Using XML CHAPTER NINE Matakuliah: T0063 – Pemrograman Visual Tahun: 2009.
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.
CS 603: Programming Language Organization Lecture 10 Spring 2004 Department of Computer Science University of Alabama Joel Jones.
©2004 Joel Jones 1 CS 403: Programming Languages Lecture 4 Fall 2004 Department of Computer Science University of Alabama Joel Jones.
Using XML to store Descriptive Metadata Richard Murphy Rosarie O’Riordan Central Statistics Office Ireland.
Jennifer Widom XML Data Introduction, Well-formed XML.
CS 614: Theory and Construction of Compilers Lecture 7 Fall 2002 Department of Computer Science University of Alabama Joel Jones.
CS 614: Theory and Construction of Compilers Lecture 8 Fall 2003 Department of Computer Science University of Alabama Joel Jones.
School of Computing and Mathematics, University of Huddersfield CHA2545: WEEK 4 LECTURE: DENOTIONAL SEMANTICS OF A SIMPLE LANGUAGE TUTORIAL: Do exercises.
CS 614: Theory and Construction of Compilers Lecture 17 Fall 2003 Department of Computer Science University of Alabama Joel Jones.
CS 403: Programming Languages Lecture 24 Fall 2003 Department of Computer Science University of Alabama Joel Jones.
David Evans CS200: Computer Science University of Virginia Computer Science Lecture 19: Environments.
CS 603: Programming Language Organization Lecture 8 Spring 2004 Department of Computer Science University of Alabama Joel Jones.
CS 603: Programming Language Organization Lecture 9 Spring 2003 Department of Computer Science University of Alabama Joel Jones.
CS 614: Theory and Construction of Compilers Lecture 15 Fall 2003 Department of Computer Science University of Alabama Joel Jones.
1 FP Foundations, Scheme In Text: Chapter Chapter 14: FP Foundations, Scheme Mathematical Functions Def: A mathematical function is a mapping of.
Haskell Chapter 5, Part II. Topics  Review/More Higher Order Functions  Lambda functions  Folds.
Functions (2) - 1ICOM 4075 (Spring, 2010) UPRM Department of Electrical and Computer Engineering University of Puerto Rico at Mayagüez ICOM 4075: Foundations.
CS 614: Theory and Construction of Compilers Lecture 10 Fall 2003 Department of Computer Science University of Alabama Joel Jones.
CS 614: Theory and Construction of Compilers Lecture 8 Fall 2002 Department of Computer Science University of Alabama Joel Jones.
CHAPTER NINE Accessing Data Using XML. McGraw Hill/Irwin ©2002 by The McGraw-Hill Companies, Inc. All rights reserved Introduction The eXtensible.
CS 603: Programming Language Organization Lecture 6 Spring 2003 Department of Computer Science University of Alabama Joel Jones.
CS 614: Theory and Construction of Compilers Lecture 4 Fall 2002 Department of Computer Science University of Alabama Joel Jones.
©2004 Joel Jones 1 CS 403: Programming Languages Lecture 3 Fall 2004 Department of Computer Science University of Alabama Joel Jones.
CSE 3302 Programming Languages Chengkai Li Spring 2008 Functional Programming Language: Haskell (cont’d) Lecture 20 – Functional Programming, Spring 2008.
April 20023CSG1XSL 1 Electronic Commerce XSL transformations John Wordsworth Department of Computer Science The University of Reading
October 19th 2016 Meeting Minutes.
Lecture 7: List Recursion CS200: Computer Science
CS 614: Theory and Construction of Compilers
Prepared for Md. Zakir Hossain Lecturer, CSE, DUET Prepared by Miton Chandra Datta
XML Data Introduction, Well-formed XML.
SOEN 343 Software Design Computer Science and Software Engineering Department Concordia University Fall 2005 Instructor: Patrice Chalin.
FP Foundations, Scheme In Text: Chapter 14.
Lecture #6 מבוא מורחב.
CSE-321 Programming Languages Introduction to Functional Programming
Programming Languages
Announcements Quiz 5 HW6 due October 23
CS 403: Programming Languages
CS 403: Programming Languages
Presentation transcript:

CS 403: Programming Languages Lecture 12 Fall 2003 Department of Computer Science University of Alabama Joel Jones

Lecture 12©2003 Joel Jones2 Overview Announcements Higher-order functions on lists XSLT Higher order functions for polymorphism

Lecture 12©2003 Joel Jones3 Science and Engineering Institutes Summer 2004 Become a globally-engaged researcher. Spend eight weeks conducting research and experiencing life in Japan, Korea, Taiwan, China, Australia For U.S. Graduate Students Sponsor: U.S. National Science Foundation Application deadline: December 23,

Lecture 12©2003 Joel Jones4 Higher-order functions on lists (cont.) Foldl Pair Up: Write the definitions of foldl

Lecture 12©2003 Joel Jones5 But how is this useful? See Handout sum product exists alltrue maximum minimum

Lecture 12©2003 Joel Jones6 Pair Up: Write the definitions for the map function using foldl Let’s try this technique map f L – apply f to each element of L and return a list of the results map: (    ) x  list   list Example: (map even? ‘(1 2 3)) = (#f #t #f)

Lecture 12©2003 Joel Jones7 XSLT as a Functional Programming Language XML—eXtensible Markup Language XSL—eXtensible Stylesheet Language XSLT—eXtensible Stylesheet Language Transformations A W3C standard for transforming XML documents into other XML documents or other formats. This was conceived as part of XSL but has been found to have wider applications. See handout

Lecture 12©2003 Joel Jones8 Higher-order functions for polymorphism Implementing sets Constructing mono-morphic sets requires definition of equality—simple if primitive elements ->(val emptyset ‘()) ->(define member? (lambda (x s) (exists? ((curry equal? x) s))) ->(define add-element (lambda (x s) (if (member? X s) s (cons x s)))) ->(define union (lambda (s1 s2) (foldl add-element s1 s2))) ->(define set-from-list (lambda (l) (foldl add-element ‘() l))) Problem is equality for complex types

Lecture 12©2003 Joel Jones9 Higher-order functions for polymorphism (cont.) Pair Up: Implement a data type for sets which uses the usual list representation. Therefore, all you have to do is implement =set? ->(=set? ‘(a b c) ‘(c b a)) #t Implement sets of sets, where the set functions are passed an eqfun for comparing sets. ->(define member? (x s eqfun) …) ->(define add-element (x s eqfun) …)

Lecture 12©2003 Joel Jones10 Higher-order functions for polymorphism (cont.) How to construct? Add parameter to every function Make part of “object” (set in previous example) Make list of functions (like C++ templates)