Computer Science E-259 XML with Java, Java Servlet, and JSP Lecture 6: Namespaces in XML 1.1 (Second Edition), SVG 1.1, and XSL (XSL-FO) 1.1 29 November 2007 David J. Malan [email protected]

1 Copyright © 2007, David J. Malan . All Rights Reserved.

Computer Science E-259 Last Time ƒ

XSLT, Continued

2 Copyright © 2007, David J. Malan . All Rights Reserved.

Last Time XSLT 1.0, Continued ƒ ƒ ƒ ƒ ƒ ƒ ƒ ƒ ƒ ƒ ƒ ƒ ƒ ƒ ƒ ƒ ƒ ƒ

Data Types Conditions Iteration Iteration, Sorted Patterns Modes Built-In Templates, Revisited Priorities Includes Imports Variables Result Tree Fragments Copying Nodes Outputting Nodes Attribute Value Templates Multiple Source Documents Recursion Extension Elements and Functions

3 Copyright © 2007, David J. Malan . All Rights Reserved.

Computer Science E-259 This Time ƒ ƒ ƒ ƒ

Namespaces in XML 1.0 (Second Edition) SVG 1.1 XSL (XSL-FO) 1.1 Project 2

4 Copyright © 2007, David J. Malan . All Rights Reserved.

Namespaces in XML 1.0 (Second Edition) History ƒ

Recommendation as of 1/99. ƒ "XML namespaces provide a simple method for qualifying element and attribute names used in Extensible Markup Language documents by associating them with namespaces identified by URI references."

5 Copyright © 2007, David J. Malan . All Rights Reserved.

Namespaces in XML 1.0 (Second Edition) Declaring a unique URI

6

Source available at http://www.fas.harvard.edu/~cscie259/distribution/lectures/6/examples6/xml/ns1.xml.

Copyright © 2007, David J. Malan . All Rights Reserved.

Namespaces in XML 1.0 (Second Edition) Defaulting

a unique URI



7

Source available at http://www.fas.harvard.edu/~cscie259/distribution/lectures/6/examples6/xml/ns2.xml.

Copyright © 2007, David J. Malan . All Rights Reserved.

SVG 1.1 History ƒ

Recommendation as of 1/03. ƒ “SVG is a language for describing two-dimensional graphics in XML. SVG allows for three types of graphic objects: vector graphic shapes (e.g., paths consisting of straight lines and curves), images and text.”

8 Copyright © 2007, David J. Malan . All Rights Reserved.

SVG 1.1 Bitmaps

9

Image from http://www.prepressure.com/image/bitmapvector.htm.

Copyright © 2007, David J. Malan . All Rights Reserved.

SVG 1.1 Bitmaps

10

Source of screen shot unknown.

Copyright © 2007, David J. Malan . All Rights Reserved.

SVG 1.1 Bitmaps

11 Copyright © 2007, David J. Malan . All Rights Reserved.

SVG 1.1 Vector Graphics

12

Image from http://www.macromedia.com/downloads/.

Copyright © 2007, David J. Malan . All Rights Reserved.

SVG 1.1 Vector Graphics

13

Image from http://www.adobe.com/support/downloads/main.html.

Copyright © 2007, David J. Malan . All Rights Reserved.

SVG 1.1 Animated Graphics

14

Screen shot from http://kartoweb.itc.nl/public_examples/UndergroundMorph.html.

Copyright © 2007, David J. Malan . All Rights Reserved.

SVG 1.1 Underground Graphics

15

Screen shot from http://home.referral.net.au/thesethings/svg/gtubemap.svgz.

Copyright © 2007, David J. Malan . All Rights Reserved.

SVG 1.1 Russian Graphics

16

Screen shot from http://www.aisee.com/svg/metro.htm.

Copyright © 2007, David J. Malan . All Rights Reserved.

SVG 1.1 Text This is SVG.

Adapted from http://www.adobe.com/svg/basics/getstarted2.html.

17

Viewable at http://www.fas.harvard.edu/~cscie259/distribution/lectures/6/examples6/svg/text.svg.

Copyright © 2007, David J. Malan . All Rights Reserved.

SVG 1.1 Shapes

Adapted from http://www.adobe.com/svg/basics/getstarted2.html.

18

Viewable at http://www.fas.harvard.edu/~cscie259/distribution/lectures/6/examples6/svg/text.svg.

Copyright © 2007, David J. Malan . All Rights Reserved.

SVG 1.1 Shapes











19

Excerpted from http://www.kevlindev.com/tutorials/basics/shapes/svg/index.htm.

Copyright © 2007, David J. Malan . All Rights Reserved.

SVG 1.1 Paths Paths are described using the following data attributes: "moveto" [M] (set a new current point), "lineto" [L] (draw a straight line), "curveto" [C] (draw a curve using a cubic Bezier), "arc" [A] (elliptical or circular arc), and "closepath" [z] (close the current path by drawing a line to the last "moveto" point).

Adapted from http://www.adobe.com/svg/basics/getstarted2.html.

20

Viewable at http://www.fas.harvard.edu/~cscie259/distribution/lectures/6/examples6/svg/path1.svg.

Copyright © 2007, David J. Malan . All Rights Reserved.

SVG 1.1 Paths Paths are described using the following data attributes: "moveto" [M] (set a new current point), "lineto" [L] (draw a straight line), "curveto" [C] (draw a curve using a cubic Bezier), "arc" [A] (elliptical or circular arc), and "closepath" [z] (close the current path by drawing a line to the last "moveto" point).

Adapted from http://www.adobe.com/svg/basics/getstarted2.html.

21

Viewable at http://www.fas.harvard.edu/~cscie259/distribution/lectures/6/examples6/svg/path2.svg.

Copyright © 2007, David J. Malan . All Rights Reserved.

SVG 1.1 Anchors

This is CSCI E-259.

22

Viewable at http://www.fas.harvard.edu/~cscie259/distribution/lectures/6/examples6/svg/anchor.svg.

Copyright © 2007, David J. Malan . All Rights Reserved.

SVG 1.1 Using Definitions

23

Excerpted from http://www.kevlindev.com/tutorials/basics/shapes/svg/index.htm.

Copyright © 2007, David J. Malan . All Rights Reserved.

SVG 1.1 XTube

24

Viewable at http://www.fas.harvard.edu/~cscie259/distribution/lectures/6/examples6/svg/circle.svg.

Copyright © 2007, David J. Malan . All Rights Reserved.

XSL (XSL-FO) 1.1 History ƒ

ƒ

Extensible Stylesheet Language (XSL) Version 1.0 is a recommendation since 10/01. ƒ “Given a class of arbitrarily structured XML documents or data files, designers use an XSL stylesheet to express their intentions about how that structured content should be presented; that is, how the source content should be styled, laid out, and paginated onto some presentation medium, such as a window in a Web browser or a hand-held device, or a set of physical pages in a catalog, report, pamphlet, or book.” Builds on CSS2 and Document Style Semantics and Specification Language (DSSSL).

25 Copyright © 2007, David J. Malan . All Rights Reserved.

XSL (XSL-FO) 1.1 Rendering ƒ ƒ ƒ ƒ ƒ ƒ ƒ ƒ ƒ ƒ

Framemaker's Maker Interchange Format (MIF) HP's Printer Control Language (PCL) Java's Abstract Window Toolkit (AWT) Portable Document Format (PDF) Postscript Rich Text Format (RTF) Scalable Vector Graphics (SVG) Text XML Area Tree ...

26 Copyright © 2007, David J. Malan . All Rights Reserved.

XSL (XSL-FO) 1.1 hello, world hello, world 27

Source available at http://www.fas.harvard.edu/~cscie259/distribution/lectures/6/examples6/xsl/hello.fo.

Copyright © 2007, David J. Malan . All Rights Reserved.

XSL (XSL-FO) 1.1 Terminology ƒ ƒ ƒ

ƒ

master ƒ "pagination and layout specifications" flow ƒ "the content that is distributed into the pages" block ƒ "The fo:block formatting object is commonly used for formatting paragraphs, titles, headlines, figure and table captions, etc." inline ƒ "The fo:inline formatting object is commonly used for formatting a portion of text with a background or enclosing it in a border."

28 Copyright © 2007, David J. Malan . All Rights Reserved.

XSL (XSL-FO) 1.1 hello, world

XML declaration

29 Copyright © 2007, David J. Malan . All Rights Reserved.

XSL (XSL-FO) 1.1 hello, world

"This is the top node of the formatting object tree. It holds an fo:layout-master-set formatting object (which holds all masters used in the document), an optional fo:declarations, and one or more fo:page-sequence objects. Each fo:page-sequence represents a sequence of pages that result from formatting the content children of the fo:page-sequence."

30 Copyright © 2007, David J. Malan . All Rights Reserved.

XSL (XSL-FO) 1.1 hello, world

"The fo:layout-master-set is a wrapper around all masters used in the document. This includes page-sequence-masters, page-masters, and region-masters."





31 Copyright © 2007, David J. Malan . All Rights Reserved.

XSL (XSL-FO) 1.1 hello, world

"The fo:simple-page-master is used in the generation of pages and specifies the geometry of the page. The page may be subdivided into up to five regions: regionbody, region-before, region-after, regionstart, and region-end."



32 Copyright © 2007, David J. Malan . All Rights Reserved.

XSL (XSL-FO) 1.1 hello, world

"Used in constructing a simple-pagemaster. This region specifies a viewport/reference pair that is located in the 'center' of the fo:simple-page-master."



33

Image from http://www.w3.org/TR/xsl/slice6.html, copyright © 1999 – 2003, W3C.

Copyright © 2007, David J. Malan . All Rights Reserved.

XSL (XSL-FO) 1.1 hello, world

"The fo:page-sequence formatting object is used to specify how to create a (sub-)sequence of pages within a document; for example, a chapter of a report. The content of these pages comes from flow children (consisting of the single fo:flow and any fo:static-content flow objects) of the fo:page-sequence. The layout of these pages comes from the fo:page-sequencemaster or page-master referenced by the master-reference trait on the fo:pagesequence."





34 Copyright © 2007, David J. Malan . All Rights Reserved.

XSL (XSL-FO) 1.1 hello, world

"The content of the fo:flow formatting object is a sequence of flow objects that provides the flowing text content that is distributed into pages. . . . The flow-names reserved in XSL are: xsl-region-body, xsl-region-before, xsl-regionafter, xsl-region-start, xsl-region-end, xslbefore-float-separator, xsl-footnote-separator."



35 Copyright © 2007, David J. Malan . All Rights Reserved.

XSL (XSL-FO) 1.1 hello, world

"The fo:block formatting object is commonly used for formatting paragraphs, titles, headlines, figure and table captions, etc."

hello, world

36 Copyright © 2007, David J. Malan . All Rights Reserved.

XSL (XSL-FO) 1.1 Font Properties (plus fo:inline) hello, world

37 Copyright © 2007, David J. Malan . All Rights Reserved.

XSL (XSL-FO) 1.1 Text Properties (plus fo:inline)

38

Intended for students with previous Java programming and web development experience, this course introduces XML as a key enabling technology in today's e-business applications. Students will learn the fundamentals of XML: schemas, XSL stylesheets, and programmatic access using standard APIs. Building on these foundations, the course will explore in detail a number of case studies that utilize XML in e-business: e-commerce, web personalization, portals, and web services. Data modeling techniques in XML will be introduced in the context of the case studies. Copyright © 2007, David J. Malan . All Rights Reserved.

XSL (XSL-FO) 1.1 Tables

Image from http://www.w3.org/TR/xsl/slice6.html, copyright © 1999 – 2003, W3C.

39 Copyright © 2007, David J. Malan . All Rights Reserved.

XSL (XSL-FO) 1.1 Multiple Blocks The Jabberwocky Lewis Carroll Twas brillig, and the slithy toves Did gyre and gimble in the wabe: All mimsy were the borogoves, And the mome raths outgrabe. Beware the Jabberwock, my son! The jaws that bite, the claws that catch! Beware the Jubjub bird, and shun The frumious Bandersnatch!

40



Example from http://www.renderx.com/Tests/doc/html/tutorial.html, copyright © 2000 – 2001, RenderX.

Copyright © 2007, David J. Malan . All Rights Reserved.

XSL (XSL-FO) 1.1 With XSLT Jabberwocky Lewis Carroll 'Twas brillig, and the slithy tovesDid gyre and gimble in the wabe; All mimsy were the borogoves,And the mome raths outgrabe. "Beware the Jabberwock, my son!The jaws that bite, the claws that catch! Beware the Jubjub bird, and shunThe frumious Bandersnatch!" He took his vorpal sword in hand:Long time the manxome foe he sought-- So rested he by the Tumtum tree,And stood awhile in thought. And, as in uffish thought he stood,The Jabberwock, with eyes of flame, Came whiffling through the tulgey wood,And burbled as it came! One two! One two! And through and throughThe vorpal blade went snicker-snack! He left it dead, and with its headHe went galumphing back. "And hast thou slain the Jabberwock?Come to my arms, my beamish boy! O frabjous day! Callooh! Callay!"He chortled in his joy. 'Twas brillig, and the slithy tovesDid gyre and gimble in the wabe; All mimsy were the borogoves,And the mome raths outgrabe.

41 Copyright © 2007, David J. Malan . All Rights Reserved.

XSL (XSL-FO) 1.1 The Big Picture

Image from http://www.w3.org/TR/xsl/slice1.html, copyright © 1999 – 2003, W3C.

42 Copyright © 2007, David J. Malan . All Rights Reserved.

Next Time HTTP 1.1, JavaServer Pages 2.1, and Java Servlet 2.5 ƒ ƒ ƒ ƒ ƒ

HTTP 1.1 n-Tier Enterprise Applications JavaServer Pages 2.1 Java Servlet 2.5 Project 3

43 Copyright © 2007, David J. Malan . All Rights Reserved.

Computer Science E-259 XML with Java, Java Servlet, and JSP Lecture 6: Namespaces in XML 1.1 (Second Edition), SVG 1.1, and XSL (XSL-FO) 1.1 29 November 2007 David J. Malan [email protected]

44 Copyright © 2007, David J. Malan . All Rights Reserved.

Computer Science E-259

Nov 29, 2007 - these foundations, the course will explore in detail a number of case studies that utilize XML in e-business: e-commerce, web personalization, ...

399KB Sizes 0 Downloads 404 Views

Recommend Documents

The Future of Computer Science - Cornell Computer Science
(Cornell University, Ithaca NY 14853, USA). Abstract ... Where should I go to college? ... search engine will provide a list of automobiles ranked according to the preferences, .... Rather, members of a community, such as a computer science.

Computer Science E-259 Lectures - Computer Science E-259: XML ...
Sep 17, 2007 - most important new technology development of the last two years." Michael Vizard ... applications: what are the tools and technologies necessary to put ... XML. When. ▫ The World Wide Web Consortium (W3C) formed an XML.

Computer Science E-259
Jan 7, 2008 - Yahoo! UI Library http://developer.yahoo.com/yui/ ..... how to program in JavaScript and PHP, how to configure. Apache and MySQL, how to ...

Computer Science E-259
Nov 19, 2007 - labeling the information content of diverse data sources .... .... ELEMENT article (url, headline_text, source, media_type, cluster,.

TEXTS IN COMPUTER SCIENCE
Java — Designed as a language to support mobile programs, Java has special .... We offer a few low-level coding hints that are helpful in building quality programs. ...... cheap in selecting your table size or else you will pay the price later.

Computer Science E-259
Oct 1, 2007 - DOCTYPE students SYSTEM "student.dtd">.

Computer Science E-259
Oct 1, 2007 - By Definition. ▫ The result of parsing a document with a DOM parser is a. DOM tree that matches the structure of that document. ▫ After parsing is ...

COMPUTER SCIENCE - Pune University
Poona College of Arts, Science and Commerce, Pune 411 001. 7. 001. 070 ... Sinhagad Technical Education Society's B.C.S. College, Pune 411 041.( 878-.

Computer Science E-259
Dec 3, 2007 - Redefines simple and complex types, groups, and attribute groups from an external schema redefine. Describes the format of non-XML data ...

BS Computer Science - GCUF
Nov 1, 2015 - GOVERNMENT COLLEGE UNIVERSITY, FAISALABAD. 2nd MERIT LIST OF BS Computer Science (EVENING). FOR FALL, 2015-2016.

Computer Science E-259
Nov 19, 2007 - ELEMENT article (url, headline_text, source, media_type, cluster, tagline, document_url ... http://www.oasis-open.org/specs/index.php#dbv4.1.

Computer Science E-259
Oct 22, 2007 - Computer Science E-259. XML with Java. Lecture 5: ... XPath 1.0. ▫ Location Paths. ▫ Data Types ... Data Types. ▫ boolean. ▫ number. ▫ string.

Computer Science E-259
Nov 29, 2007 - students with previous Java programming and web development experience, this course introduces XML as a key enabling technology in today's e-business applications. Students will learn the fundamentals of XML: schemas, XSL stylesheets,

Computer Science E-259
Oct 22, 2007 - 6. Copyright © 2007, David J. Malan . All Rights Reserved. XSLT 1.0, Continued. Data Types. ▫ boolean. ▫ number. ▫ string. ▫ node-set. ▫ external object. ▫ result tree fragment ...

Computer Science E-259
Jan 7, 2008 - . 4019 2445 .... with SQL, and how to use Ajax with both XML and JSON. The course ...

Computer Science E-259
Oct 1, 2007 - structure and content of an XML document. ▫ SAX does this by the type and order of events that are invoked. ▫ DOM does this by using objects in ...

BS Computer Science - GCUF
Nov 1, 2015 - GOVERNMENT COLLEGE UNIVERSITY, FAISALABAD. 2nd MERIT LIST OF BS Computer Science (EVENING). FOR FALL, 2015-2016.

TEXTS IN COMPUTER SCIENCE
thousand bright students, so look there for errata and revised solutions. ..... content, just like the house numbers on a street permit access by address, not ...

pdf-1466\communication-networks-computer-science-computer ...
... of the apps below to open or edit this item. pdf-1466\communication-networks-computer-science-computer-networking-by-cram101-textbook-reviews.pdf.

computer / information technology / computer science & engineering
GUJARAT TECHNOLOGICAL UNIVERSITY. B.E Semester: 4. Computer Engineering/ Computer Science & Engineering/. Information Technology. Subject Name ...