lecture10 - XML Presentation and Processing...

Info iconThis preview shows pages 1–10. Sign up to view the full content.

View Full Document Right Arrow Icon
Background image of page 1

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full DocumentRight Arrow Icon
COMP17032 Web Technology and Practice 1 2 XML Presentations • XML provides two methods for formatting: – Cascading Style Sheets (CSS) – Extensible Stylesheet Language (XSL) • Benefits of separating style from content – Allows authors to create elements that describe the data, not the format – Allows for multiple presentation layouts for a single document – Allows a single style document to format many XML documents
Background image of page 2
COMP17032 Web Technology and Practice 1 3 Cascading Style Sheets (CSS) • CSS was introduced as a recommendation by the W3C in 1996 • CSS is widely accepted by web browsers • CSS files are plain text files and can be edited with a text editor • CSS style sheets work with XML and HTML files
Background image of page 3

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full DocumentRight Arrow Icon
COMP17032 Web Technology and Practice 1 4 CSS Syntax • CSS Declaration: <?xml-stylesheet type=“text/css” href=“styles.css” ?> • CSS rules consists of two parts: – Element selector – Properties declarations • CSS rule example: address { font-size: 12pt ; font-family: arial } • CSS comments: /* This is a comment */
Background image of page 4
COMP17032 Web Technology and Practice 1 5 CSS Properties • Major property categories: – Font properties – Text properties – Color properties – Border properties – Display properties
Background image of page 5

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full DocumentRight Arrow Icon
COMP17032 Web Technology and Practice 1 6 CSS Example – XML Document 1 <?xml version=”1.0” standalone=”yes” ?> 2 <?xml-stylesheet type=”text/css” href=”emails-1.css” ?> 3 <emails> 4 <!-- Begin Message 1 --> 5 <message> 6 <to> mike&#64;duffshipping.com </to> 7 <from> julie&#64;xyzcompany.com </from> 8 <date_sent> 02/12/06 </date_sent> 9 <subject> Order 10011 </subject> 10 <body> 11 Mike, 12 Please let me know if order number 10011 has shipped. 13 Thanks, 14 Julie 15 </body> 16 </message> 17 <!-- End Message 1 --> 18 </emails>
Background image of page 6
COMP17032 Web Technology and Practice 1 7 CSS Example – CSS File 1 to, from { 2 font-weight: bold ; 3 text-align: left ; 4 border-style: solid 5} 6 date_sent { 7 font-style: italic ; 8 color: blue 9} 10 subject { 11 text-decoration: underline ; 12 background-color: green ; 13 color: yellow 14 } 15 body { 16 margin-top: 10 ; 17 display: block 18 }
Background image of page 7

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full DocumentRight Arrow Icon
COMP17032 Web Technology and Practice 1 8 Overview of XSL • The XSL specification was released by the W3C in October 2001 • XSL is a style sheet language developed specifically for XML • XSL provides more powerful formatting features than CSS • XSL behaves more like a programming language, making it very flexible
Background image of page 8
COMP17032 Web Technology and Practice 1 9 XSL Style Sheets • XSL stands for “Extensible Stylesheet Language” • XSL, like CSS, is a language for defining format and presentation of XML documents • The XSL specification is split into 3 main parts:
Background image of page 9

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full DocumentRight Arrow Icon
Image of page 10
This is the end of the preview. Sign up to access the rest of the document.

Page1 / 30

lecture10 - XML Presentation and Processing...

This preview shows document pages 1 - 10. Sign up to view the full document.

View Full Document Right Arrow Icon
Ask a homework question - tutors are online