XSL November 4, Unit 6. Default sorting is based on text However, we can also sort on numbers, more successfully than last class We use the data-type.

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

Table, List, Blocks, Inline Style
SERVICE MANAGER 9.2 VIEWS AND REPORTS July, 2011.
Cascading Style Sheets. Next Level Cascading Style Sheets (CSS) - control the look and feel of your HTML documents in an organized and efficient manner.
Cascading Style Sheets
HTML Overview - Cascading Style Sheets (CSS). Before We Begin Make a copy of one of your HTML file you have previously created Make a copy of one of your.
Technology Reviews :XSL Park, Ho-gun. What is XSL Extensible Style sheet LanguageExtensible Style sheet Language An XML-based language used to.
An Introduction to XML Based on the W3C XML Recommendations.
CSS cont. October 5, Unit 4. Padding We can add borders around the elements of our pages To increase the space between the content and the border, use.
กระบวนวิชา CSS. What is CSS? CSS stands for Cascading Style Sheets Styles define how to display HTML elements Styles were added to HTML 4.0 to.
My Penguin Math Book By:. I see How many penguins do you see? Count them & type the number in the box penguins.
Chapter 12 Creating and Using Templates. If you have already created and designed a page you like, you can use the layout and design for other pages in.
My Penguin Math Book By:. I see How many penguins do you see? Count them & type the number in the box penguins.
 2008 Pearson Education, Inc. All rights reserved JavaScript: Introduction to Scripting.
XSL Unit 6 November 2. XSL –eXtensible Stylesheet Language –Basically a stylesheet for XML documents XSL has three parts: –XSLT –XPath –XSL-FO.
April 7, 2009 While we teach, we learn. ~Seneca. April 7, 2009 Bring Class Notes on Thursday, 4/9 Test 3  Thursday, 4/16 Covers: Text sections 4.1, 4.2,
4.01 Cascading Style Sheets
September 15, 2003Houssam Haitof1 XSL Transformation Houssam Haitof.
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.
XHTML and CSS Introduction to XHTML and CSS Bharti Patel 1 phones off (please)
1 Working with Cascading Style Sheet (CSS) (contd.)  What we will cover… 1. Color (decimal and hexadecimal representation) 2. Floating elements 3. Styling.
SEG3210 DHTML Tutorial. DHTML DHTML is a combination of technologies used to create dynamic and interactive Web sites. –HTML - For creating text and image.
CIS234A Lecture 9 Instructor Greg D’Andrea. Working with Table's Column Groups We've formatted the content of the table columns by modifying the attributes.
CSS Classes.
Introduction To CSS.. HTML Review What is HTML used for? Give some examples of formatting tags in HTML? HTML is the most widely used language on the Web.
 This presentation introduces the following: › 3 types of CSS › CSS syntax › CSS comments › CSS and color › The box model.
XML Extensible Markup Language. What is XML? An infrastructure for describing text and data Developed by W3C(the World Wide Web Consortium)
Getting Started with HTML Please use speaker notes for additional information!
ECA 228 Internet/Intranet Design I XSLT Example. ECA 228 Internet/Intranet Design I 2 CSS Limitations cannot modify content cannot insert additional text.
JSTL, XML and XSLT An introduction to JSP Standard Tag Library and XML/XSLT transformation for Web layout.
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.
IST 221 Internet Concepts and Applications Introduction to XML II CSS and XSLT Style Sheets.
Essentials of HTML Class 4 Instructor: Jeanne Hart
College of Micronesia- FSM Pohnpei State Campus GEORGE S. MANGONON, MBA Chair, Math/Sci Division September 15-25, 2008.
McGraw-Hill/Irwin © 2004 by The McGraw-Hill Companies, Inc. All rights reserved. Applying eXtensible Style Sheets (XSL) Ellen Pearlman Eileen Mullin Programming.
IFS Intro to Data Management Chapter 5 Getting More Than Simple Columns.
XHTML Formatting font with a style declaration. Formatting Font HTML uses the font tag to change size and family of font But… the font tag is being deprecated.
Unit 3 — Advanced Internet Technologies Lesson 11 — Introduction to XSL.
12/20/20151 Color Fall, 2010 Modified by Linda Kenney 10/26/10.
 2008 Pearson Education, Inc. All rights reserved JavaScript: Introduction to Scripting.
HTML Links HTML uses a hyperlink to another document on the Web.
Basic HTML.
 A PHP script can be placed anywhere in the document.  A PHP script starts with  The default file extension for PHP files is ".php".  A PHP file normally.
JavaScript Functions. CSS Inheritance Which formatting applies? x y z input { display: block; } input.pref { background:red; } If you have a selector.
CIS67 Foundations for Creating Web Pages Professor Al Fichera Rev. September 22, 2010—All HTML code brought to XHTML standards. Reference for CIS127 and.
Department of Computer Science, Florida State University CGS 3066: Web Programming and Design Spring
File Handle and conditional Lecture 2. File Handling The Files associated with Perl are often text files: e.g. text1.txt Files need to be “opened for.
My Penguin Math Book By:. I see How many penguins do you see? Count them and type the number in the box penguins.
NASRULLAHIBA.  It is time to take your web designing skills to the next level with Cascading Style Sheets (CSS). They are a way to control the look and.
CSS Layout Cascading Style Sheets. Lesson Overview  In this lesson, we’ll cover:  Brief CSS review  Creating sections with the tag  Creating inline.
Displaying Data with XSLT ©NIITeXtensible Markup Language/Lesson 6/Slide 1 of 45 Objectives In this lesson, you will learn to: * Perform conditional formatting.
XML Schema – XSLT Week 8 Web site:
Rendering XML Documents ©NIITeXtensible Markup Language/Lesson 5/Slide 1 of 46 Objectives In this session, you will learn to: * Define rendering * Identify.
Hyper Text Markup Language.  My First Heading My first paragraph. Example Explained The DOCTYPE declaration defines the document type The text between.
1 Introduction to HTML. 2 Definitions  W W W – World Wide Web.  HTML – HyperText Markup Language – The Language of Web Pages on the World Wide Web.
This is the cover slide..
4.01 Cascading Style Sheets
>> Introduction to CSS
NDA Coaching in Chandigarh
My Penguin Math Book By:
My Penguin Math Book By:
>> Dynamic CSS Selectors
My Penguin Math Book By:
My Penguin Math Book By:
My Penguin Math Book By:
Cascading Style Sheets™ (CSS)
My Penguin Math Book By:
My Penguin Math Book By:
4.01 Cascading Style Sheets
Presentation transcript:

XSL November 4, Unit 6

Default sorting is based on text However, we can also sort on numbers, more successfully than last class We use the data-type attribute to specify if we are sorting on text or numbers –Since text is default only need to add this when we want to sort based on a number In this case, price.

on Multiple Tags What if want to sort by price, then by author? –Or perhaps last name, then by first name? We can use two elements to do this Another example: When using multiple elements, the order is important –First sort by last_name, then sort by first_name –First sort by price, then sort by author

In-Class Example Multiple Sorts Including sorting by numbers

If We can add conditional statements to our XSL file “If the item is out of stock, display the item in red” “If the cost is more than 6.95, show me the book details” “If the book is by C.S. Lewis, show me the books”

Using must have the attribute test Test is the expression we are testing –price > 6.95 –author = “C.S. Lewis” –Inventory < 10 must have a closing tag –The contents of the element should be the rules you want to apply For instance, turn the color red

Using Example Author: Price:$ Inventory: Date: *Will only display books which have a price less than $19.00

Using Example Author: Price:$ Inventory: Date: *Will only display books which are out of stock (inventory = 0)

Using Example Author: Price:$ Inventory: Date: *Will only display books that have C.S. Lewis for an author

Using Example Author: Price:$ Inventory: Date: *Will only display books that are NOT written by C.S. Lewis

Using Example Author: Price:$ Inventory: Inventory: Date: *Will display books that are fewer than 5 in stock in the color red and any books with inventory > 5 in black

In Class Example Using

Operators +, -. *, div : standard math operators = equal, can be used with numbers and text != not equal, used with both numbers and text < strictly less than, use < <= less than or equal to, use <= > strictly greater than, use > >= greater than or equal to, use >= or, “price = 9.50 or price = “9.60” and, “price > 9.00 and price < 10.00” mod, mathematical operator, provides the remainder after division. –e.g. 12 mod 5 = 2, 24 mod 7 = 3.

Choose We could use several if statements to cover every possibility –If inventory is greater than or equal to 100, show in black –If inventory is greater than or equal to 50 and less than 100, show in blue –If inventory is greater than or equal to 5 and less than 50, show in green –If inventory is less than 5 show in red Or we could use “xsl: choose”

is combined with and –Provides “if, else if, else” Basic format: ……….. ……….

Using Choose Author: Price: $ Price:$ Inventory: Date: *If the price is greater than $6.95, display the price in red. Otherwise, display the price normally (in black)

Using Choose, cont. Inventory: Inventory: Inventory: Inventory: *If inventory is >= 100, display in navy. If 50<=inventory<100, display in blue. If 5<=inventory<50, display in green. If inventory<5, display in red.

In Class Example of Choose

Back to Templates So far, we’ve only used a single template in our XSL files But it is possible to have multiple templates, and can make the XSL easier to read We will still have the element but now we can add additional template elements

Making a New Template Let’s add a new template which handles the information about the flowers in our bouquet Again, we use the element This time, though, we use match = “flower” to apply a template to the “flower” tag

Using Additional Templates If we have multiple templates how do we use them? We have to use the We can specify which templates to apply by using the select attribute

In Class Example Adding a template for “flower” Adding a template for “price”

Validating XML Can’t really validate XML like we can validate XHTML We don’t have any rules stating what a element can contain, or what it must contain We have no way of knowing whether or not the tags were used properly But, we can easily check for well- formedness

Well-Formedness XML follows very strict rules –e.g. All tags must be closed –Tags must be properly nested So we can check to be sure that our XML is “well-formed” The basic syntax rules for XML can be verified for our document There are well-formedness checkers online –Your browser will usually also tell you when you’ve got an error

Validating other XML Documents If we have the rules for each tag and its attributes, we can completely validate our XML document –We can validate XHTML because the schema is online We’ve had to specify where the “rules” for XHTML are in our doctype declaration at the top of the page If we have a schema for our document, we should be able to validate it. We can validate SVG and MathML

XHTML and HTML XHTML is an XML schema –Set of XML tags, attributes, and rules –Browsers know how to read this XML schema Older versions of HTML were not based on XML –Similar to XHTML but less strict XHTML is identical to HTML 4.01 –HTML 4.01 was last non-XML-based HTML standard developed –Only change between HTML 4.01 and XHTML 1.0 was that the tags and attributes had to conform to XML rules All tags and attributes are identical

XHTML 1.1 This course covers XHTM 1.0 But, there is a newer version, XHTML 1.1 –Needs the MIME type application/xhtml+xml Proper MIME type for XHTML documents But, some browsers don’t recognize this type (IE especially) This is why we use.html and not.xhtml for our file extensions There is no transitional version of XHTML 1.1 –No deprecated tags or attributes XHTML 1.1 requires the use of the xml:lang attribute instead of the lang attribute we covered earlier –Most browsers again do not support this yet XHTML 2.0 will be the next standard

Questions?