Internet Applications Spring 2008. Review Last week –XML / RSS –PHP introduction –Exercises from last week –Unanswered questions.

Slides:



Advertisements
Similar presentations
XML III. Learning Objectives Formatting XML Documents: Overview Using Cascading Style Sheets to format XML documents Using XSL to format XML documents.
Advertisements

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.
XML: Managing Data Exchange Stylesheets. Lesson Contents CSS The basic XSL file XSL transforms Templates Sort Numbering Parameters and Variables Datatypes.
1/18 ITApplications XML Module Session 5: Extensible Stylesheet Language (XSL)
Web Pages and Style Sheets Bert Wachsmuth. HTML versus XHTML XHTML is a stricter version of HTML: HTML + stricter rules = XHTML. XHTML Rule violations:
LBSC 670 Organization of Information. Class plan Review Documents and document models Digital document exploration –HTML –CSS Putting it together – Why.
Creating Special Effects with CSS
Lecture 6 8/11/11.
CS428 Web Engineering Lecture 06 Introduction (Cascading Style Sheet) 1.
XSLT & XPATH. From Friday Everything in XML is machine readable Attributes describe elements, so does an element’s place in the tree (context) XML must.
Using Cascading Style Sheets CSS Basics. Goals Understand basic syntax of Cascading Style Sheets (CSS) Understand basic syntax of Cascading Style Sheets.
Jackson, Web Technologies: A Computer Science Perspective, © 2007 Prentice-Hall, Inc. All rights reserved Chapter 3 Style Sheets: CSS WEB.
XP 1 Working with Cascading Style Sheets Creating a Style for Online Scrapbooks Tutorial 7.
Tutorial 4 Creating Special Effects with CSS
Working with Cascading Style Sheets. 2 Objectives Introducing Cascading Style Sheets Using Inline Styles Using Embedded Styles Using an External Style.
September 15, 2003Houssam Haitof1 XSL Transformation Houssam Haitof.
17 Apr 2002 XML Stylesheets Andy Clark. What Is It? Extensible Stylesheet Language (XSL) Language for document transformation – Transformation (XSLT)
LBSC 670 Organization of Information. Review Metadata models Dublin Core Metadata Standards Dublin core, MARC Encoding Schemes HTML, XML, MARC… Advanced.
Sheet 1XML Technology in E-Commerce 2001Lecture 6 XML Technology in E-Commerce Lecture 6 XPointer, XSLT.
1 Working with Cascading Style Sheet (CSS). 2 Cascading Style Sheets (CSS)  a style defines the appearance of a document element. o E.g., font size,
Internet Applications Spring Review Last week –PHP/JavaScript – Form –Questions?
Using Cascading Style Sheets. Introduction to Styles and Properties  Cascading Style Sheets (CSS) are a standard set by the World Wide Web Consortium.
XP Tutorial 7New Perspectives on Creating Web Pages with HTML, XHTML, and XML 1 Working with Cascading Style Sheets Creating a Style for Online Scrapbooks.
Tutorial 4 Creating Special Effects with CSS. XP Objectives Work with CSS selectors Create styles for lists Create and apply class styles Create a rollover.
Cascading Style Sheet (CSS)
IS432 Semi-Structured Data Lecture 5: XSLT Dr. Gamal Al-Shorbagy.
XP New Perspectives on XML Tutorial 6 1 TUTORIAL 6 XSLT Tutorial – Carey ISBN
CIS 451: XSL Dr. Ralph Westfall February, Problems With XML no formatting capabilities contra formatting tags like, etc. in HTML CSS can be used.
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.
WORKING WITH XSLT AND XPATH
CSS Positioning Creating Special Effects with CSS CS202 Working with Cascading Style Sheets (Chapter 4) CS202 1.
XML About XML Things to be known Related Technologies XML DOC Structure Exploring XML.
CITA 330 Section 6 XSLT. Transforming XML Documents to XHTML Documents XSLT is an XML dialect which is declared under namespace "
IST 221 Internet Concepts and Applications Introduction to XML II CSS and XSLT Style Sheets.
Lecture 11 XSL Transformations (part 1: Introduction)
ITB Web programming for E- Commerce 1 ITB6227 Programming for E-COMMERCE Lecture Presentation of XML Documents.
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.
XP New Perspectives on XML, 2 nd Edition Tutorial 8 1 TUTORIAL 8 CREATING ELEMENT GROUPS.
Cascading Style Sheets Eugenia Fernandez IUPUI. CSS Purpose CSS allow you to specify the style in which your XML elements are displayed. CSS were originally.
XP Review 2 New Perspectives on JavaScript, Comprehensive1 Introducing Cascading Style Sheets Formatting Web Pages with CSS.
1 Working with Cascading Style Sheet (CSS). 2 Cascading Style Sheets (CSS)  a style defines the appearance of a document element. o E.g., font size,
Dr. Chunbo Chu Week 3. XML Not a replacement for HTML. XML and HTML were designed with different goals: XML was designed to transport and store data,
Unit 3 — Advanced Internet Technologies Lesson 11 — Introduction to XSL.
Positioning and Printing Creating Special Effects with CSS.
More XML XPATH, XSLT CS 431 – February 23, 2005 Carl Lagoze – Cornell University.
CNIT 132 – Week 4 Cascading Style Sheets. Introducing Cascading Style Sheets Style sheets are files or forms that describe the layout and appearance of.
 XSL – Extensible Style Sheet Language  XSLT – XSL Transformations › Used to transform XML documents to other formats,like HTML or other XML documents.
CSS Cascading Style Sheets A very brief introduction CSS, Cascading Style Sheets1.
Tutorial 4 Creating Special Effects with CSS. New Perspectives on HTML, XHTML, and XML, Comprehensive, 3rd Edition 2 Objectives Work with CSS selectors.
Tutorial 4 Creating Special Effects with CSS. New Perspectives on HTML, XHTML, and XML, Comprehensive, 3rd Edition 2 Objectives Work with CSS selectors.
Tutorial 4 Creating Special Effects with CSS. XP Objectives Work with CSS selectors Create styles for lists Create and apply class styles Create a rollover.
XSLT: How Do We Use It? Nancy Hallberg Nikki Massaro Kauffman.
1 Lecture 7 Style Sheets: CSS. 2 Motivation HTML markup can be used to represent –Semantics: h1 means that an element is a top-level heading –Presentation:
1 XSL Transformations (XSLT). 2 XSLT XSLT is a language for transforming XML documents into XHTML documents or to other XML documents. XSLT uses XPath.
XP Tutorial 7New Perspectives on HTML and XHTML, Comprehensive 1 Working with Cascading Style Sheets Creating a Style for Online Scrapbooks Tutorial 7.
CSCI N241: Fundamentals of Web Design Copyright ©2004  Department of Computer & Information Science Using Cascading Style Sheets Module A: CSS Basics.
Session IV Chapter 14 – Chapter 14 – XSLThttp://
Working with Cascading Style Sheets
Unit 4 Representing Web Data: XML
XML Related Technologies
Cascading Style Sheets
CSS Intro.
Chapter 7 Representing Web Data: XML
Second CSS Lecture Applications to XML
XML Data Introduction, Well-formed XML.
More CSS 22-Feb-19.
Tutorial 4 Creating Special Effects with CSS
Cascading Style Sheets
Presentation transcript:

Internet Applications Spring 2008

Review Last week –XML / RSS –PHP introduction –Exercises from last week –Unanswered questions

This week A word on our final projects google-gears-goes-mobile/ google-gears-goes-mobile/ Tech-topic presentations – XSL / CSS Exercises –Focus on using XSL to transform data –CSS for layout

What is style? Languages/Standards –CSS –XSL Similarities / differences Uses

XML DC record Alliance of Baptists Alliance of Baptists Records, en 2.1 linear feet [Lots of text omitted] Collection is open. Alliance of Baptists Southern Baptist Alliance Z. Smith Reynolds Library, Wake Forest University text/xml Alan P. Neely Papers, Z. Smith Reynolds Library, Relation>

XML RSS Record Sample RSS File This is a sample en-us Tue, 10 Jun :00:00 GMT …

XSL Overview Extensible Stylesheet Language Components –Defined XML standard which is used in conjunction with a transformation engine to transform XML data –Xquery/Xpath Capabilities, limitations –Document processing –Semi-functional programming language

XSL Introduction Styling –XSL - eXtensible Style Language Querying –XPath –XQuery –XPointer –XLink Good resources for reference – – – –

XSL Overview - 1 <xsl:stylesheet version="1.0" xmlns:xsl=" form"> Processing Instructions

Contents of Sample XSL transformation :

XSL – Sample Stylesheet <xsl:stylesheet version="1.0" xmlns:xsl=" Sample XML File :

XSL PHP Data driven –Static, replaceable No equivalent Process driven Foreach($t as $p){} Switch case; Var $myvar=val –Arrays, objects, updateable Require(‘’); Array (); Object->function();

XSL Features - 1 Defining the ‘main’ processing template – Defining named Templates – Variables – Comments –

XSL Features - 2 Inserting data XPATH Like directory structures /=root –/Dublin/title = title field an element attribute. Is the current node – // is a global search for an element –//title finds the title element anywhere in the document * is a wildcard Built-In Functions –Name(), Contains(), text(),

XSL Features - 3 Control Structures –For Each –Choosing – –If

XSL – Sample Stylesheet

XPath A DOM-style syntax that allows us to access elements in an XML file Examples –/dublinCore/title –Access the title of a DC record –Access an attribute of the subject element –/dublinCore/

Xpath (2) Xpath functions –Contains (//item/title, ‘England’) –substring-before(string1, string2), substring- after(string1, string2) Xpath selectors –//elementname – finds an element anywhere in the DOM –./ - from the current context –/ - from the root context –* - wildcard match

What is CSS? A styling language Client side Cascading / inheritance "subs.css";

CSS Syntax Element { Attribute:value; /*comment*/ }.class { attribute:value; attribute:value;} Ul.thumb li a {attrribute:value;}

CSS Selectors ul li {} – descendent li nodes of ul Ul, ol {} – both ul and ol elements a:hover {}– a pseudoclass.classname {}– all elements with class Div.classname {}– a div with a class #idname {}– the element with this id ul[attribute=“”] {}– ul with attribute

CSS Box Model All elements in CSS are rendered in a box:

Understanding size Font Sizes –em: the 'font-size' of the relevant font'font-size' –ex: the 'x-height' of the relevant font –px: pixels, relative to the viewing device. Absolute Measurements –in: inches -- 1 inch is equal to 2.54 centimeters. –cm: centimeters –mm: millimeters –pt: points -- the points used by CSS2 are equal to 1/72th of an inch. –pc: picas -- 1 pica is equal to 12 points. Relative Measurements –Percentage values are always relative to another value From:

Standards W3c - –CSS1 – Formatting –CSS2 – Positioning –CSS3 – Layout, Media, Interaction Browser compliance – – –

Cascading External stylesheets –From within –From within HTML Start with minimal styles (mobile/print), add functionality as needed Use media selectors: All – all media Aural – sound Handheld – mobile device Print – for printing – Screen – computer screen TV – for television

Class Exercises Exercise 1 - CSS Layout Practice basic CSS layout for HTML Exercise 2 - External style sheets Break apart exercise 3 from last week Exercise 3 - XSL Transformation Create an XSL parser for PHP Exercise 4 - Photo album via RSS feed Create a photo album using a Flickr feed, XSL transformation to XHTML and CSS

Next week Spring Break Post-break –Technology Topics PHP/JavaScript –More programming –Ideas for final projects