SDPL 2002Notes 4: Intro to Style Sheets1 4. Introduction to Style Sheets n Discussed recently: –Programmatic manipulation of documents n Now a more human-oriented.

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

Introduction to HTML & CSS
XML: Managing Data Exchange Stylesheets. Lesson Contents CSS The basic XSL file XSL transforms Templates Sort Numbering Parameters and Variables Datatypes.
© 2004, Robert K. Moniot Chapter 6 CSS : Cascading Style Sheets.
1 Pengantar Teknologi Internet W03: CSS Cascading Style Sheets.
Recognizing the Benefits of Using CSS 1. The Evolution of CSS CSS was developed to standardize display information CSS was slow to be supported by browsers.
HTML5 and CSS3 Illustrated Unit B: Getting Started with HTML
Outline IS400: Development of Business Applications on the Internet Fall 2004 Instructor: Dr. Boris Jukic CSS: Cascading Style Sheets.
XSL Concepts Lecture 7. XML Display Options What can XSL Transformations do? generation of constant text suppression of content moving text (e.g., exchanging.
Jackson, Web Technologies: A Computer Science Perspective, © 2007 Prentice-Hall, Inc. All rights reserved Chapter 3 Style Sheets: CSS WEB.
Cornell CS 502 More XML XML schema, XPATH, XSLT CS 502 – Carl Lagoze – Cornell University.
September 15, 2003Houssam Haitof1 XSL Transformation Houssam Haitof.
Tutorial 3: Adding and Formatting Text. 2 Objectives Session 3.1 Type text into a page Copy text from a document and paste it into a page Check for spelling.
© 2012 Adobe Systems Incorporated. All Rights Reserved. LEARNING THE LANGUAGE OF THE WEB INTRODUCTION TO HTML AND CSS.
Sheet 1XML Technology in E-Commerce 2001Lecture 6 XML Technology in E-Commerce Lecture 6 XPointer, XSLT.
Principles of Web Design 6 th Edition Chapter 4 – Cascading Style Sheets.
Chapter 6 Web Typography. 2 Principles of Web Design Chapter 5 Objectives Understand principles for type design on a Web site Use the element Understand.
XP New Perspectives on XML Tutorial 6 1 TUTORIAL 6 XSLT Tutorial – Carey ISBN
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
Week 1 Understanding the Web Design Environment. 1-2 HTML: Then and Now HTML is an application of the Standard Generalized Markup Language Intended to.
Web Accessiblity Carol Gordon SIU Medical Library.
1 CIS336 Website design, implementation and management (also Semester 2 of CIS219, CIS221 and IT226) Lecture 6 XSLT (Based on Møller and Schwartzbach,
XML About XML Things to be known Related Technologies XML DOC Structure Exploring XML.
SDPL 2001Notes 4: Intro to Stylesheets1 4. Introduction to Stylesheets n Discussed recently: –Programmatic manipulation of (data-oriented) documents n.
1 XSLT An Introduction. 2 XSLT XSLT (extensible Stylesheet Language:Transformations) is a language primarily designed for transforming the structure of.
ECA 228 Internet/Intranet Design I XSLT Example. ECA 228 Internet/Intranet Design I 2 CSS Limitations cannot modify content cannot insert additional text.
CITA 330 Section 6 XSLT. Transforming XML Documents to XHTML Documents XSLT is an XML dialect which is declared under namespace "
XSLT Kanda Runapongsa Dept. of Computer Engineering Khon Kaen University.
VICTORIA UNIVERSITY OF WELLINGTON Te Whare Wananga o te Upoko o te Ika a Maui SWEN 432 Advanced Database Design and Implementation An Introduction to XML.
CA Professional Web Site Development Class 2: Anatomy of a Web Site and Web Page & Intro to HTML.
ITB Web programming for E- Commerce 1 ITB6227 Programming for E-COMMERCE Lecture Presentation of XML Documents.
Introduction to Markup David J. Birnbaum University of Pittsburgh Slavic Digital Text Workshop University.
Cascading Style Sheets CSS.  Standard defined by the W3C  CSS1 (released 1996) 50 properties  CSS2 (released 1998) 150 properties (positioning)  CSS3.
XP Review 2 New Perspectives on JavaScript, Comprehensive1 Introducing Cascading Style Sheets Formatting Web Pages with CSS.
1 herbert van de sompel CS 502 Computing Methods for Digital Libraries Cornell University – Computer Science Herbert Van de Sompel
SDPL 20064: Introduction to Style Sheets1 4. Introduction to Style Sheets n Discussed recently: –(APIs for) procedural manipulation of documents n Now.
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.
University of Nottingham School of Computer Science & Information Technology Introduction to XML 2. XSLT Tim Brailsford.
CSS Cascading Style Sheets A very brief introduction CSS, Cascading Style Sheets1.
Microsoft Expression Web 3 – Illustrated Unit D: Structuring and Styling Text.
XSLT: How Do We Use It? Nancy Hallberg Nikki Massaro Kauffman.
Basic HTML Document Structure. Slide 2 Goals (XHTML HTML5) XHTML Separate document structure and content from document formatting HTML 5 Create a formal.
SDPL 2004Notes 4: Intro to Style Sheets1 4. Introduction to Style Sheets n Discussed recently: –Programmatic manipulation of documents n Now a more human.
Department of Computer Science, Florida State University CGS 3066: Web Programming and Design Spring
B Copyright © 2011, Oracle and/or its affiliates. All rights reserved. Working with PDF and eText Templates.
Department of Computer Science, Florida State University CGS 3066: Web Programming and Design Spring
XP 2 HTML Tutorial 1: Developing a Basic Web Page.
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:
Jackson, Web Technologies: A Computer Science Perspective, © 2007 Prentice-Hall, Inc. All rights reserved Chapter 7 Representing Web Data:
Chapter 6 Introducing Cascading Style Sheets Principles of Web Design, Third Edition.
Rendering XML Documents ©NIITeXtensible Markup Language/Lesson 5/Slide 1 of 46 Objectives In this session, you will learn to: * Define rendering * Identify.
HTML5 and CSS3 Illustrated Unit B: Getting Started with HTML.
What is CSS? A set of style rules that tell the web browser how to present a web page or document. – In earlier versions of HTML, style characteristics,
CH 15 XSL Transformations 1. Objective What is XSL? Overview of XSL transformations Understanding XSL templates Computing the value of a node with xsl:value-of.
Blended HTML and CSS Fundamentals 3 rd EDITION Tutorial 1 Using HTML to Create Web Pages.
Working with Cascading Style Sheets
DHTML.
XML: Extensible Markup Language
Unit 4 Representing Web Data: XML
Chapter 11 Designing Effective Output
CSS: Cascading Style Sheets
INTRODUCTION TO HTML AND CSS
Digital Design – Copyright Law
INTRODUCTION TO HTML AND CSS
Chapter 6 Introducing Cascading Style Sheets
5.00 Apply procedures to organize content by using Dreamweaver. (22%)
More XML XML schema, XPATH, XSLT
HTML5 and CSS3 Illustrated Unit B: Getting Started with HTML
Presentation transcript:

SDPL 2002Notes 4: Intro to Style Sheets1 4. Introduction to Style Sheets n Discussed recently: –Programmatic manipulation of documents n Now a more human-oriented point of view: –How to specify formatting or rendering of structured documents? n Concepts, properties and requirements of style systems on a general level –a semantic analysis of style systems –later examples of concrete style languages (CSS, XSL)

SDPL 2002Notes 4: Intro to Style Sheets2 Introduction to Style Sheets (Inspired by Brüggemann-Klein, A., Wood, D., Electronic Style Sheets. Universität Freiburg, Institut für Informatik, Bericht 43, Januar 1992) n Declarative markup of structured documents indicates purely syntactic structure –no semantics (processing, formatting, …) n Electronic style sheets –specify layout and appearance of document content –e.g. FrameMaker templates, Word styles, or LaTeX style files (macros); CSS and XSL style sheets

SDPL 2002Notes 4: Intro to Style Sheets3 Style Sheets? n In traditional publishing: set of rules about diction and language for some manuscript n Electronic style sheets –deal with graphical layout of documents (In future with aural properties, too?) –setting and changing of properties controlling layout and appearance of document content –define a mapping from documents (structure+content) to external representation on a presentation medium (paper, screen, audio, …)

SDPL 2002Notes 4: Intro to Style Sheets4 Why Style Sheets? n Separation of content and presentation is a basic "dogma" in structured documenting –supports longevity and multi-use of documents –(unnecessary complication for single-purpose and single-use documents) n Relationship between documents and style sheets is many-to-many –single style for many documents »supports manageability (of, say, consistent look and feel of a corporate Web site) –many styles for a single document »supports multiple output media (print, different Web clients, hand-held-devices, …)

SDPL 2002Notes 4: Intro to Style Sheets5 Tasks of a Style Sheet n Style sheet guides the transformation of –descriptive markup into formatter input (stream of formatting commands and text) »called transcription by Brüggemann-Klein & Wood n Formatter is a device (program) capable of –hyphenation (breaking of character sequences) –typeface attribution (characters into glyphs) »e.g, single glyph fi for " fi" –line breaking (assembling glyphs into lines) –page breaking (lines into pages)

SDPL 2002Notes 4: Intro to Style Sheets6 Process of Transcription/Transformation

SDPL 2002Notes 4: Intro to Style Sheets7 Process of Formatting n Creates a detailed description of presentation –> style sheet may not have total control of the final formatted presentation!

SDPL 2002Notes 4: Intro to Style Sheets8 Process of Rendering n Display/play the document on output medium

SDPL 2002Notes 4: Intro to Style Sheets9 Style Rules n Style sheet is a set of style rules –Attach transcriptions to logical elements n Most style rules in practise structure-based –associated to instances of element types in the document structure tree n Also grammar-based style rules –associated to occurrences of element types in the document grammar

SDPL 2002Notes 4: Intro to Style Sheets10 Transcription types n Fundamental operations of style rules fall into following transcription types: 1. calls of parameterised formatting tasks 2. generation of text 3. automatic numbering 4. rearrangement of elements n Application of transcriptions can depend on element context

SDPL 2002Notes 4: Intro to Style Sheets11 Context Specification (1) n General rule: –semantically equivalent structures (instances of the same element type) should be formatted identically n Exceptions (due to conventions, aesthetics, etc) –all paragraphs indented, except for the first one –heading numbers 1, 2, … in body but A), B), … in appendix –author lists in references: ‘‘ Aho and Ullman ’’ (just a few)‘ ‘vs Aho et al. ’’ (if several authors) –indication of target element type ( Table, Figure, Section,...) for cross references

SDPL 2002Notes 4: Intro to Style Sheets12 Context Specification (2) n Need access to ancestors, siblings, descendants, targets of cross references n Context conditions by a context predicate –Boolean expression built of »a reference to the current element »functions like parent, leftSibling, leftMostSibling, children, and ref –Rule applied if the context condition is true n Context specification orthogonal to transcription types (In XSL through the XPath expression language)

SDPL 2002Notes 4: Intro to Style Sheets13 Parameterised Formatting Tasks n The most common transcription type: n set formatting characteristics for sub-elements –typeface attribution (for strings or inline-elements) –line breaking (for paragraphs or blocks) –page breaking (for documents) –parameterised by type size, line length, indentation, page height… hierarchy of elements  hierarchy of nested formatting tasks  hierarchy of nested presentation areas hierarchy of elements  hierarchy of nested formatting tasks  hierarchy of nested presentation areas

SDPL 2002Notes 4: Intro to Style Sheets14 Hierarchy in Formatting Document structure Formatting tasks / presentation areas

SDPL 2002Notes 4: Intro to Style Sheets15 Derived or Inserted Content n boilerplate text –text not present in the source document –e.g., letter headings, © marks, bullets, … n textual content inserted at the beginning or at the end of the current element n table of contents, indexes –need to specify the source of included material

SDPL 2002Notes 4: Intro to Style Sheets16 Numbering (1) n Different schemes –consecutively through document »same numbering sequence, possibly common to a set of element types (e.g., for Theorems and Examples) –nested numbering for, say, nested lists »relative to occurrences of another element type higher in document hierarchy

SDPL 2002Notes 4: Intro to Style Sheets17 Numbering (2) Example of different numbering schemes: Section 1 Theorem 1, or 1.1 Figure 2, or 1, or 1.1, or 1.2 Section 2 Theorem 3, or 2, or 2.1 Example of different numbering schemes: Section 1 Theorem 1, or 1.1 Figure 2, or 1, or 1.1, or 1.2 Section 2 Theorem 3, or 2, or 2.1 n often via named counters with a start value and a scope (e.g., in CSS2) –In XSLT: special expressions for generating numbers

SDPL 2002Notes 4: Intro to Style Sheets18 Sub-element Rearrangement n Examples –reverse the order of titles and authors in references –sorting of the reference list »requires functions operating on textual contents n Sub-element suppression a special case n Not supported by the weakest style systems

SDPL 2002Notes 4: Intro to Style Sheets19 Viewpoint on Style Languages n Style systems should support traditional stylistic design conventions n Next a look at CSS, and later at XSL –How do the discussed concepts appear in the languages? –How do the languages support these general requirements?