Mastering XML Premium Edition

Size: px
Start display at page:

Download "Mastering XML Premium Edition"

Transcription

1 SYBEX Sample Chapter Mastering XML Premium Edition Chuck White Liam Quin Linda Burman Chapter 16: Displaying XML: Using XSLFO for Document Creation Copyright 2001 SYBEX Inc., 1151 Marina Village Parkway, Alameda, CA World rights reserved. part of this publication may be stored in a retrieval system, transmitted, or reproduced in any way, including but not limited to photocopy, photograph, magnetic or other record, without the prior agreement and written permission of the publisher. ISBN: SYBEX and the SYBEX logo are either registered trademarks or trademarks of SYBEX Inc. in the USA and other countries. TRADEMARKS: Sybex has attempted throughout this book to distinguish proprietary trademarks from descriptive terms by following the capitalization style used by the manufacturer. Copyrights and trademarks of all products and services listed or described herein are property of their respective owners and companies. All rules and laws pertaining to said copyrights and trademarks are inferred. This document may contain images, text, trademarks, logos, and/or other material owned by third parties. All rights reserved. Such material may not be copied, distributed, transmitted, or stored without the express, prior, written consent of the owner. The author and publisher have made their best efforts to prepare this book, and the content is based upon final release software whenever possible. Portions of the manuscript may be based upon pre-release versions supplied by software manufacturers. The author and the publisher make no representation or warranties of any kind with regard to the completeness or accuracy of the contents herein and accept no liability of any kind including but not limited to performance, merchantability, fitness for any particular purpose, or any losses or damages of any kind caused or alleged to be caused directly or indirectly from this book.

2 C HAPTER 16 Displaying XML: Using XSLFO for Document Creation Learning about formatting objects Understanding formatting data types Putting it all together

3 380 Chapter 16 Displaying XML: Using XSLFO for Document Creation One of the most vexing problems in the publishing world concerns content management. Whether you re talking about managing advertising campaigns, books, annual reports, or technical documentation, versioning is always an issue. Solutions have ranged from simply re-importing text or making corrections within a page layout program, to investing heavily in complex SGML. These issues have always stalked companies whose only focus was print, but now these issues are magnified for anyone attempting to make the transition to today s media environment in which content must often be migrated instantly to media such as web browsers and wireless devices. In the previous chapter we discussed methods for formatting XML documents using XSLT (Extensible Stylesheet Language Transformations). XSLT provides a way to manage these content issues. XML provides a shell within which we can maintain content, and XSLT gives us the means to deliver that content simultaneously to different media types. One such process involves formatting objects, which describe how an XML document should be formatted for a variety of media, particularly print media and e-books (or even an FO web browser, if one existed). These are defined in the W3C s XSL Candidate Recommendation, which you can find at You can create four-color publications from your XML documents by using this emerging standard, called XSLFO (Extensible Style Language Formatting Objects). XSLFO is a style sheet language that the W3C actually still calls XSL, which can be a source of confusion if you haven t been watching the way the language has morphed over the past couple years. Originally, XSL encompassed both XSLT and a formatting language that looked quite different from the current recommendation. XSLT was later split from XSL and then was in turn split into XSLT and XPath. XSL continues to exist as a language devoted exclusively to formatting objects, but we refer to it in this book as XSLFO to differentiate between XSLT and formatting objects. This reference is consistent with industry trends. The end results of XSLFO provide most of the page layout capabilities that traditional page layout software programs such as Quark XPress, Adobe InDesign, FrameMaker, PageMaker, and others provide. These results include the high degree of control over typographic features such as kerning and leading that graphic artists expect in page layout software. In order for this language to be fully accepted by the graphic designers who will use it to its fullest potential, visual development tools similar to Quark XPress and Adobe InDesign will need to enter the picture, and at this point there are none because the language was not finalized as this book went to press. A fairly basic question thus arises. Do you even want or need to learn this language? It isn t that the language is particularly difficult to learn. You must first grasp XSLT to fully reap its

4 Learning about Formatting Objects 381 benefits, but the language itself is straightforward. However, most graphic designers, who will be the chief beneficiaries of the language, don t have the time to learn a language as detailed as XSLFO. Visual tools will need to enter the fray, along with browsers that take full advantage of the e-print capabilities of XSLFO. Thus, many of the elements and properties will exist under the hood, hidden from most users, who will manipulate them using visual tools. But if you re interested in the future trends affecting the publishing and graphic arts industries, you ll be interested in what this chapter offers. If you are not a software developer, it probably isn t necessary to grasp every nuance of this language. If you are a software developer, you ll get an idea of how the language works after reading this chapter, but you ll still need to do more research. Your best bet, of course, is the language specification itself. In this chapter we use the words elements and objects interchangeably when referring to formatting objects. When we refer to an object as a specific element, such as the fo:root element, we use a code-style typeface to denote it as an element. However, when we refer to a formatting object as an object, no special typeface is used. Therefore, for example, a pagesequence object may also be referred to more specifically as a page-sequence element. Learning about Formatting Objects XSLFO is a detailed, comprehensive language. Using XSLFO you can output XML into printed media either by converting an XSLFO result document into a PDF file or by using an XSLFO browser such as Antenna House XSL Formatter. In the long term, however, you can expect to see more robust tools that will allow you to manage your content and perform visual layout tasks using a visual page layout program. If you are working on the Windows platform, you can download the Antenna House XSL Formatter from and then use it to browse completed XSLFO documents. If you are a Unix or Mac user, you can visit the Apache Foundation s FOP web site (xml.apache.org/fop/index.html) and download FOP, which allows you to convert XSLFO documents to PDF documents. You don t need a web server to run FOP; you can simply run it from the command line as shown in the sidebar Running Your Formatted Documents. The formatting object specification was a Candidate Recommendation when this book went to press. Thus, the potential exists for the language to change significantly if the W3C determines that implementation issues require substantial language modifications. By contrast, the XSLT Working Draft was a W3C Recommendation, meaning no more changes would be made to the first version of the language.

5 382 Chapter 16 Displaying XML: Using XSLFO for Document Creation Running Your Formatted Documents Currently, at least two programs run XSLFO in the real world, but neither was beyond the beta stage as this book went to press. The approaches of the two are quite different. One, FOP, is a Java program that can be run from the command line to create PDF files from XSLFO files. To run it, you need a SAX-based XML parser with DOM support. The default FOP parser is Xerces. The easiest way to run the program from the command line is with the following command: java org.apache.fop.apps.commandline fo-file pdf-file This assumes the FO file has already been created (from an XSLT transformation). You can also run the program in a number of other ways. Go to xml.apache.org/fop/running.html to learn about the various configurations. Antenna House will create an XSLFO layout directly from its File menu. Choose File Open to display a dialog box that asks you to choose an XML source file and an XSLT file. You don t need to use the tree file you get from an XSLT transformation. You need only the XSLT style sheet itself (using XSL formatting objects as the result, of course). Then simply click the Run Formatter button to create your pages. The result is a lot like Adobe Acrobat Reader. XSL Formatter lets you advance through the pages by clicking a button on the menu bar. If there is a problem with the way you set up the XSL file, the program will complain to you, and the layout won t be created. An Introduction to Formatting Concepts All XSLFO documents are based on the same principle as page-layout software programs when it comes to the way pages are output. A set of master pages is produced, and the content pages of a document are created using the master pages as templates that control the flow of the document. Pages that are based on master pages are part of what is called a page sequence. When a page within a page sequence is created, one of the master pages is chosen as the template from which to base each document page. The master page may have nothing more than basic size and margin information, but it will have something to say about how the pages on which it is based will look. It may also have headers and footers, and if the document is a publication, such as a book or a magazine, the master page will most likely have a page-numbering sequence. This process is begun (after you ve defined the root element) with the fo:layout-master-set element. This element contains a number of page master definition elements that you ll learn about shortly. From that point, each page is then individually designed and styled, all the way down to each character if needed. Page content is distributed either by flowing (using the fo:flow element) content from page to page, following the order prescribed by your master pages, or statically, which means that each page contains the same content defined by a fo:staticcontent element. Usually, this static content consists of headers, footers, and page numbers anything that might need to appear on multiple pages.

6 Learning about Formatting Objects 383 The style generation continues its way down to the block and character level so that individual paragraphs and characters can be formatted. XSLFO elements such as fo:character allow you to tightly manage typographic formatting. For example, you can control font size, character width, bolding options, and leading. Before we take a closer look at each of the specific elements that help define page and content formatting, it may be useful to examine the properties associated with these elements that help make these formatting options possible. By first looking at these properties, you ll find it easier to negotiate your way toward a fundamental understanding of how XSLFO works when you encounter the elements that use them. Understanding XSLFO Properties As you ll discover soon, XSLFO elements are primarily focused on page management, flow management (how the content pours into the series of pages you create), and paragraph/ character management. Before we take a closer look at these elements, we need to briefly examine the attributes, or properties, that give these elements their power. These properties, represented as element attributes within the XSLFO data model, offer fine-tuning for everything from writing direction and font size to margins and spacing. XSLFO has a set of core properties, represented by attribute/value pairs, that many formatting elements share. Some of these are based on the CSS model. Others are specific to XSLFO, such as master-name, which is an attribute for describing a master page name. There are several general categories of property types, and we ll briefly describe them next. But first, we re going to start with a basic list of attribute values. Next, we ll describe some of those that play a big role in XSLFO. Space does not allow us to describe each and every attribute, but hopefully this section will be useful as you write and experiment with your own code. Cross-Referencing Attribute Values To make it easier to use the elements we describe later in this chapter, we ve included a table of properties that shows the possible values of each property currently available to XSLFO as of the vember 21 Candidate Recommendation. When reviewing the elements, you can cross-reference Table 16.1 to retrieve property values and their initial values and to find out if they are inherited. The Values column in Table 16.1 works like this. The symbol is an OR operator, meaning that a value can take any value on either side of the symbol. Values denoted by angle brackets (such as <length>) indicate that you need to provide a value representing that type of data. Length is generally integer, percentage is a percentage value, and so on. Often, the values in angle brackets refer to other style properties or CSS2-type properties.

7 384 Chapter 16 Displaying XML: Using XSLFO for Document Creation TABLE 16.1: XSL-FO Attribute Values Property Name Values Initial Value Inherited absolute-position auto absolute fixed inherit auto active-state link visited active hover ne focus alignment-adjust auto baseline before-edge textbefore-edge middle central after-edge text-after-edge ideographic alphabetic hanging mathematical <percentage> <length> inherit auto alignment-baseline auto baseline before-edge textbefore-edge middle central after-edge text-after-edge ideographic alphabetic hanging mathematical inherit auto-restore true false false Yes azimuth <angle> left-side far-left left center-left center center-right right far-right right-side ] behind ] leftwards rightwards inherit center Yes background <background-color> <backgroundimage> <background-repeat> <background-attachment> <background-position> ]] inherit auto These are shorthand properties, which have no default values. background-attachment scroll fixed inherit scroll background-color <color> transparent inherit transparent background-image <uri-specification> none inherit none background-position <percentage> <length> ]{1,2} top center bottom] left center right] ] ] inherit 0% 0% background-positionhorizontal background-positionvertical background-repeat baseline-shift <percentage> <length> left center right inherit <percentage> <length> top center bottom inherit repeat repeat-x repeat-y norepeat inherit baseline sub super <percentage> <length> inherit 0% 0% repeat baseline blank-or-not-blank blank not-blank any inherit any block-progressiondimension auto <length> <percentage> <length-range> inherit auto

8 Learning about Formatting Objects 385 TABLE 16.1: XSL-FO Attribute Values (continued) Property Name Values Initial Value Inherited border <border-width> <border-style> <color> ] inherit These are shorthand properties, which have no default values. border-after-color <color> inherit The value of the color property force <integer> inherit fo:table: 1, fo:table-cell: 0 border-after-style <border-style> inherit default value border-after-width <border-width> <length-conditional> medium inherit border-before-color <color> inherit The value of the color property. border-afterprecedence border-beforeprecedence force <integer> inherit fo:table: 1, fo:table-cell: 0 border-before-style <border-style> inherit default value border-before-width <border-width> <length-conditional> medium inherit border-bottom <border-top-width> <border-style> default value <color> ] inherit border-bottom-color <color> inherit The value of the color property border-bottom-style <border-style> inherit default value border-bottom-width <border-width> inherit medium border-collapse collapse separate inherit medium Yes border-color <color>{1,4} transparent inherit default value border-end-color <color> inherit The value of the color property border-end-precedence force <integer> inherit fo:table: 1, fo:table-cell: 0 border-end-style <border-style> inherit default value border-end-width <border-width> <length-conditional> medium inherit border-left <border-top-width> <border-style> default value <color> ] inherit border-left-color <color> inherit The value of the color property border-left-style <border-style> inherit default value border-left-width <border-width> inherit medium

9 386 Chapter 16 Displaying XML: Using XSLFO for Document Creation TABLE 16.1: XSL-FO Attribute Values (continued) border-spacing <length> <length>? inherit medium Yes border-start-color <color> inherit The value of the color property Property Name Values Initial Value Inherited border-right <border-top-width> <border-style> default value <color> ] inherit border-right-color <color> inherit The value of the color property border-right-style <border-style> inherit default value border-right-width <border-width> inherit medium border-separation <length-bp-ip-direction> inherit.block-progressiondirection=0pt; inline-progressiondirection=0pt Yes border-startprecedence force <integer> inherit fo:table: 1, fo:table-cell: 0 border-start-style <border-style> inherit default value border-start-width <border-width> <length-conditional> medium inherit border-style <border-style>{1,4} inherit default value border-top <border-top-width> <border-style> default value <color> ] inherit border-top-color <color> inherit The value of the color property border-top-style <border-style> inherit default value border-top-width <border-width> inherit medium border-width <border-width>{1,4} inherit default value bottom <length> <percentage> auto auto inherit break-after auto column page even-page auto odd-page inherit break-before auto column page even-page auto odd-page inherit caption-side before after start end top before Yes bottom left right inherit case-name <name> ne, but a value is ne required. case-title <string> ne, but a value is required. ne

10 Learning about Formatting Objects 387 TABLE 16.1: XSL-FO Attribute Values (continued) Property Name Values Initial Value Inherited character <character> N/A; a value is required. ne clear start end left right both ne none inherit clip <shape> auto inherit auto color <color> inherit XSL processor default Yes color-profile-name <name> inherit N/A; a value is required. column-count <number> inherit 1 column-gap <length> <percentage> inherit 12.0 column-number <number> Depends on usage column-width <length> <percentage> Depends on usage content-height auto scale-to-fit <length> auto <percentage> inherit content-type <string> auto auto content-width auto scale-to-fit <length> auto <percentage> inherit country none <country> inherit none Yes cue <cue-before> <cue-after> inherit These are shorthand properties, which have no default values. cue-after <uri-specification> none inherit none cue-before <uri-specification> none inherit none destination-placementoffset <length> 0 direction ltr rtl inherit ltr Yes display-align auto before center after auto Yes inherit dominant-baseline auto use-script no-change reset-size ideographic alphabetic hanging mathematical inherit auto elevation <angle> below level above level Yes higher lower inherit empty-cells show hide inherit show Yes end-indent <length> inherit 0 Yes ends-row true false false extent <length> <percentage> inherit 0.0 external-destination <uri-specification> Empty string

11 388 Chapter 16 Displaying XML: Using XSLFO for Document Creation TABLE 16.1: XSL-FO Attribute Values (continued) Property Name Values Initial Value Inherited float before start end left right none none inherit flow-name <name> An empty name ne font <font-style> <font-variant> <font-weight> ]? <font-size> / <lineheight>]? <font-family> ] caption icon menu message-box small-caption status-bar inherit See specific font properties. Yes font-family <family-name> <generic-family> ],]* <family-name> <generic-family>] inherit auto character-by-character inherit font-size <absolute-size> <relative-size> <length> <percentage> inherit XSL processor default auto medium font-size-adjust <number> none inherit none Yes font-stretch normal wider narrower ultra-condensed extra-condensed condensed semi-condensed semi-expanded expanded extra-expanded ultra-expanded inherit normal Yes font-style normal italic oblique backslant normal Yes inherit font-variant normal small-caps inherit normal Yes font-weight normal bold bolder lighter inherit normal Yes font-selectionstrategy force-page-count auto even odd end-on-even auto end-on-odd no-force inherit format <string> 1 glyph-orientationhorizontal <angle> inherit 0 degrees Yes glyph-orientationvertical auto <angle> inherit auto Yes grouping-separator <character> separator grouping-size <number> grouping Yes Yes Yes, the computed value is inherited.

12 Learning about Formatting Objects 389 TABLE 16.1: XSL-FO Attribute Values (continued) Property Name Values Initial Value Inherited height <length> <percentage> auto auto inherit hyphenate false true inherit false Yes hyphenation-character <character> inherit The Unicode hyphen Yes character U+2010 hyphenation-keep auto column page inherit auto Yes hyphenationladder-count no-limit <number> inherit no-limit Yes hyphenation-pushcharacter-count <number> inherit 2 Yes hyphenation-remaincharacter-count <number> inherit 2 Yes id <id> Depends on usage ; depends on usage. indicate-destination true false false initial-page-number auto auto-odd auto-even <number> inherit auto inline-progressiondimension auto <length> <percentage> <length-range> inherit internal-destination empty string <idref> Empty string keep-together <keep> inherit within-line=auto; within-column=auto; within-page=auto Yes keep-with-next <keep> inherit within-line=auto; within-column=auto; within-page=auto keep-with-previous <keep> inherit within-line=auto; within-column=auto; within-page=auto language none <language> inherit none yes last-line-end-indent <length> <percentage> inherit 0 Yes leader-alignment none reference-area page inherit none Yes leader-length <length-range> inherit leader-length.minimum= 0pt,.optimum=12.0pt;.maximum=100% Yes leader-pattern space rule dots use-content space Yes inherit leader-pattern-width use-font-metrics <length> inherit use-font-metrics yes auto

13 390 Chapter 16 Displaying XML: Using XSLFO for Document Creation TABLE 16.1: XSL-FO Attribute Values (continued) Property Name Values Initial Value Inherited left <length> <percentage> auto auto no inherit letter-spacing normal <length> <space> inherit normal yes letter-value auto alphabetic traditional auto no linefeed-treatment ignore preserve treat-as-space treat-as-space yes treat-as-zero-width-space inherit line-height normal <length> <number> <percentage> <space> inherit normal yes line-height-shiftadjustment consider-shifts disregard-shifts inherit consider-shifts line-stacking-strategy line-height font-height max-height inherit line-height margin <margin-width>{1,4} inherit These are shorthand properties, which have no default values. margin-bottom <margin-width> inherit 0 margin-left <margin-width> inherit 0 margin-right <margin-width> inherit 0 margin-top <margin-width> inherit 0 marker-class-name <name> An empty name ne master-name <name> An empty name ne max-height <length> <percentage> none 0 inherit maximum-repeats <number> no-limit inherit no-limit max-width <length> <percentage> none ne inherit media-usage auto paginate bounded-in-onedimension auto unbounded min-height <length> <percentage> inherit 0 min-width <length> <percentage> inherit Depends on UA number-columnsrepeated <number> 1 number-columns-spanned <number> 1 number-rows-spanned <number> 1 odd-or-even odd even any inherit any orphans <integer> inherit 2 Yes yes Yes

14 Learning about Formatting Objects 391 TABLE 16.1: XSL-FO Attribute Values (continued) Property Name Values Initial Value Inherited overflow visible hidden scroll error-ifoverflow auto auto inherit padding <padding-width>{1,4} inherit These are shorthand properties, which have no default values. padding-after <padding-width> <length-conditional> 0 inherit padding-before <padding-width> <length-conditional> 0 inherit padding-bottom <padding-width> inherit 0 padding-end <padding-width> <length-conditional> 0 inherit padding-left <padding-width> inherit 0 padding-right <padding-width> inherit 0 padding-start <padding-width> <length-conditional> 0 inherit padding-top <padding-width> inherit 0 page-break-after auto always avoid left right auto inherit page-break-before auto always avoid left right auto inherit page-break-inside avoid auto inherit auto Yes page-height auto indefinite <length> inherit auto page-position first last rest any inherit any page-width auto indefinite <length> inherit auto pause <time> <percentage>]{1,2} inherit XSL processor default pause-after <time> <percentage> inherit XSL processor default pause-before <time> <percentage> inherit XSL processor default pitch <frequency> x-low low medium medium Yes high x-high inherit pitch-range <number> inherit 50 Yes play-during <uri-specification> mix? repeat? auto auto none inherit position static relative absolute fixed static inherit precedence true false inherit false

15 392 Chapter 16 Displaying XML: Using XSLFO for Document Creation TABLE 16.1: XSL-FO Attribute Values (continued) provisional-distancebetween-starts provisional-label-separation reference-orientation inherit <length> inherit 24.0pt Yes <length> inherit 6.0pt Yes 0 Yes; depends on usage. ref-id <idref> inherit ne region-name xsl-region-body xsl-region-start Depends on usage ne xsl-region-end xsl-region-before xsl-region-after xsl-before-floatseparator xsl-footnote-separator <name> relative-align before baseline inherit before Yes relative-position static relative inherit static rendering-intent auto perceptual relative-colorimetric auto saturation absolute-colo- rimetric inherit retrieve-boundary page page-sequence document page-sequence retrieve-class-name <name> An empty name ne retrieve-position first-starting-within-page firstincluding-carryover last-startingwithin-page last-ending-within-page first-starting-withinpage richness <number> inherit 50 Yes right <length> <percentage> auto auto inherit role <string> <uri-specification> none none inherit rule-style none dotted dashed solid double solid Yes groove ridge inherit rule-thickness <length> 1.0pt Yes scaling uniform non-uniform inherit uniform scaling-method auto integer-pixels resample-anymethod auto inherit score-spaces true false inherit true Yes script none auto <script> inherit auto Yes show-destination replace new replace no size <length>{1,2} auto landscape portrait inherit auto N/A; XSL:no is optional.

16 Learning about Formatting Objects 393 TABLE 16.1: XSL-FO Attribute Values (continued) Property Name Values Initial Value Inherited source-document <uri-specification> <uri-specification>]* none inherit none space-after <space> inherit space.minimum=0pt;.optimum=0pt;.maximum=0pt;.conditionality-discard;.precedence=0pt space-before <space> inherit space.minimum=0pt;.optimum=0pt;.maximum=0pt;.conditionality-discard;.precedence=0 space-end <space> inherit space.minimum=0pt;.optimum=0pt;.maximum=0pt;.conditionality-discard;.precedence=0 space-start <space> inherit space.minimum=0pt;.optimum=0pt;.maximum=0pt;.conditionality-discard;.precedence=0 space-treatment ignore preserve ignore-if-beforelinefeed ignore-if-after-linefeed ignore-if-surrounding-linefeed inherit preserve span none all inherit none speak normal none spell-out inherit normal Yes speak-header once always inherit once Yes speak-numeral digits continuous inherit continuous Yes speak-punctuation code none inherit none Yes speech-rate <number> x-slow slow medium fast x-fast faster slower inherit medium Yes src <uri-specification> inherit ne start-indent <length> inherit 0 Yes starting-state show hide show starts-row true false false stress <number> inherit 50 Yes Yes

17 394 Chapter 16 Displaying XML: Using XSLFO for Document Creation TABLE 16.1: XSL-FO Attribute Values (continued) use-target-processing-context <uri-specification> Property Name Values Initial Value Inherited suppress-at-line-break auto suppress retain inherit auto switch-to xsl-preceding xsl-following xsl-any xsl-any <name> <name>]* table-layout auto fixed inherit auto table-omit-footer-atbreak true false false table-omit-header-atbreak true false false target-presentationcontext target-processingcontext use-target-processingcontext document-root <uri-specification> document-root target-stylesheet use-normal-stylesheet <uri-specification> text-align start center end justify inside outside left right <string> inherit text-align-last relative start center end justify inside outside left right inherit use-normal-stylesheet start relative text-altitude use-font-metrics <length> inherit use-font-metrics text-decoration none underline no-underline] overline no-overline ] line-through no-line-through ] blink no-blink ] ] inherit none Yes Yes, but depends on usage. text-depth use-font-metrics <length> inherit use-font-metrics text-indent <length> <percentage> inherit 0 Yes text-shadow none <color> <length> <length> <length>?,]* <color> <length> <length> <length>?] inherit none ; depends on usage. text-transform capitalize uppercase lowercase none Yes none inherit top <length> <percentage> auto auto inherit treat-as-word-space auto true false inherit auto unicode-bidi normal embed bidi-override normal inherit vertical-align baseline middle sub super text-top text-bottom <percentage> <length> top bottom inherit baseline

18 Learning about Formatting Objects 395 TABLE 16.1: XSL-FO Attribute Values (continued) Property Name Values Initial Value Inherited visibility visible hidden collapse inherit visible voice-family <specific-voice> <generic-voice> ],]* <specific-voice> <generic-voice> ] inherit XSL processor default Yes volume <number> <percentage> silent x-soft soft medium loud x-loud inherit medium white-space normal pre nowrap inherit normal Yes white-space-collapse false true inherit true Yes widows <integer> inherit 2 Yes width <length> <percentage> auto auto inherit word-spacing normal <length> <space> inherit normal Yes wrap-option no-wrap wrap inherit wrap Yes writing-mode lr-tb rl-tb tb-rl lr rl tb inherit lr-tb xml:lang <country-language> inherit These are shorthand properties, which have no default values. z-index auto <integer> inherit auto Yes Yes; depends on usage. Yes Area Alignment Properties These types of properties manage inline areas within the scope of other inline areas and are particularly useful for baseline control. A baseline is a specific line within an inline area that exists within a base area defined by the type of alphabet (the specification refers to alphabets as scripts) being used. Figure 16.1 shows the baseline of a typical English language inline area. tice that certain parts of the letters drop below the baseline, which in roman alphabets is based on an imaginary line that exists at the base of most letters. FIGURE 16.1 The baseline as seen in an English language document

19 396 Chapter 16 Displaying XML: Using XSLFO for Document Creation The alignment-baseline property is the key property for managing inline alignment issues. The default value is generally baseline, except for the fo:character element. Baselines can be defined in a number of ways, however, depending on the type of script being used. Ideographic scripts, such as Chinese, Japanese, and Korean, are defined differently from roman alphabet scripts such as English. Properties within this framework include the following: alignment-adjust Used by any inline formatting object to fine-tune alignment. alignment-baseline Specifies how an object is aligned relative to a parent element. baseline-shift Specifies the repositioning of the dominant-baseline of an inline formatting object relative to the dominant-baseline of its parent area. display-align Specifies the alignment of fo:table-cell, fo:region-body, fo:regionbefore, fo:region-after, fo:region-start, and fo:region-end elements in the blockprogression-direction of areas that are children of the reference area. dominant-baseline Determines a scaled baseline table. relative-align Used by the fo:list-item and fo:table-cell elements to manage alignment between themselves and their parents. Area Dimension Properties These properties control the dimensions of block areas and inline areas. Block areas are boxlike containers to which you can apply specific formatting properties, and in this case, you can set sizing properties through any of the properties listed in this section. A typical block area is a paragraph, but there is no paragraph element in XSLFO. You define paragraphs using the fo:block or fo:block-container element. You can specify a size for the container that holds the paragraph, or you can supply a range within which the rendering agent should size the container, which gives the rendering agent some leeway. This might be particularly helpful for online documents. Area dimension properties include the following: block-progression-dimension Similar to the writing-mode CSS2 property, this property is used with block-container and external-graphics objects. This property assigns a size value to the content rectangle to which one of those elements belongs. content-height An XSL-specific property that specifies the content height of an externalgraphic object or an instream-foreign-object object. content-width An XSL-specific property that specifies the content width of an externalgraphic object or instream-foreign-object object. height A CSS2-based property that denotes the height of a block or replacement element. inline-progression-dimension Similar to the writing-mode CSS2 property, this property is used with block-container and external-graphics objects. This property assigns a size value to the inline-progression of a content rectangle.

20 Learning about Formatting Objects 397 max-height, min-height A CSS2 property that applies to most elements, allowing you to set maximum and minimum heights on rectangle areas. max-width, min-width A CSS2 property that applies to most elements, allowing you to set maximum and minimum widths on rectangle areas. scaling An XSL property that applies to fo:external-graphic and fo:instreamforeign-object elements and indicates whether scaling should preserve the intrinsic aspect ratio. scaling-method An XSL property that applies to fo:external-graphic and fo: instream-foreign-object elements and indicates which scaling method is acceptable on an object. width A CSS2-based property that denotes the width of a block or replacement element. Block and Line-Related Properties Good typography requires that you pay attention to nuances. The web world has never really paid attention to typography, but as content management systems evolve and online content shares some of the same formatting characteristics of print, typography will be begin to play an increasingly greater role. The block and line-related properties manage line areas relative to parent block areas, particularly as they relate to type. For example, the following properties manage leading, hyphenation, text alignment, and line feeds: hyphenation-keep An XSL property used by the block object to specify whether hyphenation can occur at the last line. hyphenation-ladder-count An XSL property used by the block object to indicate how many successive hyphenations can occur at the end of a line. last-line-end-indent An XSL property used by the block object to indicate the indent of a block s last line. line-height Equivalent to leading in a page layout program, this property uses the same general definition as the CSS equivalent to specify the amount of space between lines. line-height-shift-adjustment An XSL property used by the block object to indicate whether the line-height should be adjusted to account for a baseline shift. line-stacking-strategy An XSL property used by the block object to indicate whether adjacent lines should be positioned relative to one another using the line-height, fontheight, or max-height properties. linefeed-treatment An XSL property that manages line feeds. space-treatment An XSL property that indicates whether any special white space treatment is necessary, particularly in relation to line feeds. text-align A CSS2 property that manages text alignment within block elements.

21 398 Chapter 16 Displaying XML: Using XSLFO for Document Creation text-align-last text-indent An XSL property that indicates the text alignment of the last line of text. A CSS2 property that manages text indention within block elements. white-space-collapse An XSL property that indicates whether white space should be collapsed. wrap-option An XSL property that indicates how line wrapping should be managed. Character Properties These properties manage the formatting of individual characters or groups of characters. For example, if you want to create a drop shadow, use the text-shadow property. One common typographical trait is the use of tracking and kerning, which manage the space between characters. A word with more tracking than normal might look like this: t r a c k i n g or this: t r a c k i n g The untrained designer might wonder why anyone would want do this. Suffice it to say that designers do want to manage the space between characters and will be glad to have the power given to them through the use of the letter-spacing property. The following character properties are available: character An XSL property that applies to the fo:character element and allows you to specify a Unicode character. letter-spacing A CSS2 property that applies to all elements, letting you specify spacing between characters. suppress-at-line-break An XSL property that applies to the fo:character element and allows you to specify whether characters should be suppressed when the formatter creates a line break. text-decoration A CSS2 property available to all elements that allows you to add an underline or some other decorative feature to text characters. text-shadow A CSS2 property available to all elements that allows you to add a drop shadow to text characters. text-transform A CSS2 property available to all elements that allows you to control the case of text characters (upper- or lowercase or capitalized words). treat-as-word-space An XSL property that applies to the fo:character element and allows you to specify whether a character should be treated as a word space or as a letter. word-spacing A CSS2 property available to all elements that allows you to control the amount of spacing between words.

22 Learning about Formatting Objects 399 Color-Related Properties Color on the web has long been something of a joke to serious designers. Although the color profiling scheme introduced in XSLFO is far from perfect, it is a good start, because it supports the RGB standard and ICC (International Color Consortium) color profiles, the latter of which is an international standard used for comparing the gamut (a range of colors a device produces or that a software application supports) in which a color was created (such as input from a scanner) to the gamut to which that color will be output. The following properties manage color: color A CSS2 property available to all elements that allows you to specify the foreground color of an object (for example, the color of a type face). color-profile-name An XSL property that applies to the fo:color-profile element and allows you to choose a color profile for the document. rendering-intent An XSL property that applies to the fo:color-profile element and allows you to choose how to manage color gamut issues. This can be an important consideration because the rendering intent you choose for color laser copies will be different from the rendering intent for film sent to a pre-press house for printing on an offset printer. Float-Related Properties The following properties manage floating areas, which are similar to text-wrap controls for images and objects in traditional desktop publishing software: clear A CSS2 property that applies to block elements and indicates which sides of a box should not be adjacent to an adjoining box. float A CSS2 property that indicates how a box should float relative to another box (either right, left, or not at all). Keeps and Breaks Properties These properties manage page breaks, as well as breaks across columns and lines. The latter helps manage widows and orphans, which are lines consisting of only a few characters before or after another paragraph. break-after An XSL property that applies to block, list, and table elements to indicate that no more content should appear within a page after the referenced element. break-before An XSL property that applies to block, list, and table elements to indicate that no more content should appear within a page before the referenced element keep-together An XSL property that manages a rather complex set of keep-together rules for a variety of elements to help manage grouping within the context of a page flow. keep-with-next An XSL property that manages a rather complex set of keep-with rules for a variety of elements to help manage grouping within the context of a page flow.

23 400 Chapter 16 Displaying XML: Using XSLFO for Document Creation keep-with-previous An XSL property that manages a rather complex set of keep-with rules for a variety of elements to help manage grouping within the context of a page flow. orphans, widows CSS2 properties that apply to block elements. The orphans property indicates how many paragraph lines must remain at the bottom of a page; the widows property indicates how many paragraph lines must remain at the top of a page. Layout-Related Properties These properties control the orientation of an object and its clip, overflow, and span properties. Some of these properties have more relevance in an online scenario than in a printbased one. The overflow property s scroll value, for example, is not going to mean much in a print environment because it creates a scrolling window for content that overflows its container. The span property, on the other hand, is quite useful in a print environment because it allows you to specify whether an object should span more than one column. The following are layout-related properties: clip A CSS2 property that applies to block-level elements whose overflow property is not visible. This property governs how an object should be clipped when the object s size exceeds its containing rectangle. overflow A CSS2 property that applies to block-level elements and indicates whether an element s content is clipped when it is larger than the containing rectangle. reference-orientation An XSL property that manages the rotation of objects. span An XSL property that indicates whether an object spans multiple columns. Leader and Rule Properties A leader is a line that extends from one object to another. A good example of a leader is within a table of contents, which might contain listings, then a wide space filled with what look like small periods, and then the number of the page on which the listing starts: Chapter 1 4 You use the following properties to create leaders and horizontal rules: leader-alignment An XSL property that denotes the alignment of leaders with the same patterns. leader-pattern An XSL property that describes the type of pattern used in the leader. leader-pattern-width An XSL property that describes the width of a pattern used in the leader. leader-length An XSL property that constrains the length of a leader to minimum and maximum lengths set as part of the value.

24 Learning about Formatting Objects 401 rule-style If the leader-pattern property value is rule, this property determines the style of the rule. rule-thickness If the leader-pattern property value is rule, this property determines the thickness of the rule. Dynamic Effects Properties A number of dynamic properties are available for creating online content. These properties manage links and other dynamic effects. For details on these (there are no real implementations yet), see the section of the specification that refers to these properties ( xsl/slice7.html#section-n43328-properties-for-dynamic-effects-formatting- Objects). Properties for Markers Markers are used for running headers and footers. The following are properties for markers: marker-class-name: An XSL property for establishing a common name among more than one marker that might be retrieved by the retrieve-class-name property. retrieve-class-name An XSL property that is used to fetch markers based on the name established by the marker-class-name property, which can be given to several markers at once to retrieve them in groups. retrieve-position An XSL property used to specify the order in which children of marker objects are returned. retrieve-boundary An XSL property that specifies that children of an fo:marker element may be retrieved by the marker. Properties for Number-to-String Conversions These properties manage number-to-string conversions, particularly as they relate to page numbering. They are all defined in the XSLT spec (discussed in the previous chapter): format, grouping-separator, grouping-size, and letter-value. Pagination and Layout Properties All these properties are defined within the context of XSL, meaning you won t find any of them within the CSS2 model. The following properties manage a number of pagination issues: blank-or-not-blank Manages how master pages are chosen in relation to the content of the master page so that master pages can be selected based on whether they are blank or whether they are part of a flow. Choose blank if you want the master page to be able to generate a page following a specific page sequence but with no flow content. Choose any if the master page is always available, no matter the content, and choose not-blank if the page is available only when the page contains areas with flow content.

25 402 Chapter 16 Displaying XML: Using XSLFO for Document Creation column-count Specifies, in integers, the number of columns in a region. column-gap Specifies, in a length, a percentage, or an inherited value, the gap between columns. extent Specifies, in a length, a percentage, or an inherited value, the width of a regionstart or region-end or the height of a region-before or region-after. flow-name A value that provides the name of a flow. force-page-count A constraining property that determines how a last page should be counted and whether a last, empty page should be created in order to satisfy a constraint, such as one that specifies that the folio of the last page must be an even number (such as the final page of a book). initial-page-number Indicates the initial page number in a page-numbering sequence. master-name When used in conjunction with the fo:simple-page-master element, this property provides a name for the master page. When used in conjunction with the fo:page-sequence-master element, this property references the name provided in the fo:simple-page-master e element. maximum-repeats Used by the fo:repeatable-page-master-reference and fo:repeatable-page-master-alternatives elements to constrain the number of pages indicated within the scope of these elements. media-usage Tells the XSL processor how (or if) to render pagination. odd-or-even Indicates the availability, based on whether an odd or even page is used, of a master page that is called by a page-sequence object. page-height Used by the fo:simple-page-master element to specify the height of a page. page-position Used by the fo:conditional-page-master-reference element to determine if a page-sequence object can call on this element as a master page based on its order of appearance within a sequence. If the value is first, the master page can be used as the first page of a sequence. If the value is last, the master page can be used as a last page. If the value is rest, the master page can be used for any page in between the first and last pages, and if the value is any, the master page can be used anywhere in the sequence. page-width: page-height Used by the fo:simple-page-master element to specify the width of a page. precedence Used by the fo:before-region, fo:after-region, fo:start-region, and fo:end-region elements when determining which regions take precedence when determining which regions can extend into page margins. region-name Used to provide a name to a region that appears within a simple-pagemaster object.

26 Learning about Formatting Objects 403 Table Properties The following properties manage table layouts: border-after-precedence, border-before-precedence, border-end-precedence, borderstart-precedence XSL properties used by the fo:table and fo:table-cell elements that determine table border precedence for descriptive border properties. border-collapse A CSS2 property used by table objects that choose either a collapsing table model or a non-collapsing model. If you ve ever seen a table shrink in a web browser window as you resize the window, you ve seen a collapsing table. border-separation An XSL property used by table objects that indicates the gap between borders of adjacent cells. caption-side A CSS2 property used by the fo:table-caption element that positions a caption within the element. column-number An XSL property used by the fo:table-column object in conjunction with the from-table-column() function to denote which column number can use the properties defined within this element. Also used by the fo:table-cell element to indicate which column should be spanned by a table cell. column-width An XSL property that accesses the fo:table-column element s columnnumber property and assigns a column width to the column chosen. empty-cells A CSS2 property that applies to table-cell objects that indicates whether borders are drawn around empty cells. ends-row, starts-row An XSL property used by table-cell objects to indicate whether a cell ends or begins a row. number-columns-repeated This XSL property contains an integer value applied to a table-column object that defines the number of times a column is repeated. number-columns-spanned, number-rows-spanned An XSL property used by tablecolumn objects to indicate how many columns or rows can use the values derived from a from-table-column() function, and by table-cell cell objects to indicate the number of columns or rows a specific cell spans (similar to the HTML colspan and rowspan attributes). table-layout A CSS2 property that chooses either an automatic or a fixed table algorithm to determine table layout. table-omit-footer-at-break, table-omit-header-at-break An XSL property used by table objects to allow the omission or inclusion of table footers or table headers at the end of table areas.

27 404 Chapter 16 Displaying XML: Using XSLFO for Document Creation Writing-Mode Related Properties XSLFO makes a serious effort to achieve independence from any one human language type. Thus, it supports languages that are written in directions different from the left-right modes seen in English. You use the following properties to manage this process. direction A CSS2 property that supplies the base writing direction of blocks and embeddings. glyph-orientation-horizontal XSL properties that define the vertical or horizontal angle of a glyph relative to the base writing mode. text-altitude An XSL property used by fo:block, fo:character, and fo:leader elements to specify the depth at which glyphs can stretch above a baseline. text-depth An XSL property used by fo:block, fo:character, and fo:leader elements to specify the depth at which glyphs can stretch below a baseline. unicode-bidi A CSS2 property that manages bidirectional writing modes. writing-mode An XSL property that specifies the writing mode of an object. Miscellaneous Properties A number of other XSLFO properties are more difficult to categorize. We ve included descriptions of them here. content-type An XSL property used by the fo:external-graphic and fo:instreamforeign-object elements to specify a content-type. id An XSL property that provides a unique identifier to an object. provisional-label-separation An XSL property used by list-block objects for providing computational values to a label-end variable that describe the amount of space between list-item labels and list-item bodies. provisional-distance-between-starts An XSL property used by list-block objects for providing computational values to a body-start variable that describe the distance between the start-indent of a list-item-label and the start-indent of a list-item-body. ref-id An XSL property used by the fo:page-number-citation element that references an object referenced by the property s value. score-spaces An XSL property used by fo:bidi-override, fo:character, fo:initialproperty-set, fo:page-number, and fo:page-number-citation elements to indicate whether spaces should be affected by text-decoration properties. src An XSL property used by the fo:external-graphic element to reference a URI for locating a resource. visibility A CSS2 property that applies to all elements indicating whether they are visible or are collapsed in response to user action. z-index A CSS2 property that indicates the order of an element on the stack of the page.

28 Learning about Formatting Objects 405 CSS Properties XSLFO makes extensive use of the same kinds of properties that CSS uses. If you re not familiar with them, you may want to read Chapter 17, Displaying XML: Working with Cascading Style Sheets, and then come back to this section, or you can simply refer to Chapter 17 when you need more information about a CSS-like property. If you are already familiar with CSS, you should know the difference between using CSS properties in an XSLFO document and using them in HTML or XML. In traditional use, CSS rules are defined either as a separate entity or within an element. An element definition looks like this: <body style="font-size:12px">foo</body> The key difference is the use of the colon, which does not exist in XSLFO style sheet property definitions. Instead, XSLFO style definitions use the = operator to achieve the same thing: <fo:block font-size="12px"> Rather than using a style attribute, each CSS property is broken down to the attribute level. Consequently, there is a difference between multiple style rule definitions in the two languages (CSS and XSLFO). Here is a multiple property definition in traditional CSS: <body style="font-size:12px; font-weight: 100">foo</body> And here is the same definition in XSLFO: <fo:block font-size="12px font-weight="100"> It may seem that XSLFO is breaking the rules of CSS, but, technically, XSLFO doesn t actually use CSS. It simply borrows the property definitions from that language and incorporates them into the XSLFO syntax. This design decision provides portability of code and makes it easier to create style sheets using XSLFO by incorporating a previously defined language, CSS, with which many developers are familiar. In the previous section, we described a number of properties used by XSLFO for formatting, and we alluded to the following properties that are based on the CSS model (specifically, the CSS2 model): Common Accessibility properties, which support accessibility features. Common Absolute Position properties, which control the position and size of objects. Common Aural properties, which aurally render content and are based on the CSS2 model. Common Border, Padding, and Background properties, which control background and border areas at both the block level and the inline level. These properties are based on the CSS2 model.

29 406 Chapter 16 Displaying XML: Using XSLFO for Document Creation Common Font properties, which manage fonts and font formatting and are borrowed from the CSS2 model. Common Hyphenation properties, which manage hyphenation for line breaks and are based on the CSS2 model. Common Margin Properties-Block, which manage spacing surrounding block-level elements and are based on the CSS2 model. Common Margin Properties-Inline, which manage spacing issues at the inline level and are based on the CSS2 model. Common Relative Position properties, which control the position of formatting objects relative to the position of their parent objects and are based on the CSS2 model. Although many of these properties do have XSL extensions, they are by and large safe to use within your projects in ways that you would expect, as long as you follow the rules we previously described. Page Management Page management is handled through a process that involves setting up master pages and choosing which of your document pages match each master page you create. The first step in creating a master page involves determining the page s basic geometry. Is your document an 8 1/2 by 11-inch pamphlet? Or is it a 7-panel brochure with each panel 5 inches by 5 inches, as shown in Figure 16.2? You will also want to take into consideration the color profile of the document. The default profile is srgb and is declared in a global declarative FO element called fo:color-profile. FIGURE 16.2 A seven-panel brochure XSLFO takes great care to make itself international in scope when dealing not only with measurements, such as inches and centimeters, but with reading direction, to accommodate languages that read from left to right or up and down. Thus, rather than stating that a margin is on a left side of the page, a reference is made to an area called region-start, since languages handle page layout differently.

30 Learning about Formatting Objects 407 In the next several sections we ll look at many of the elements associated with formatting objects. Formatting object element categories are more localized as they are broken down, starting with such global objects as pages and working all the way down to the inline and character level. These elements can be categorized as follows: Page management Flow level Block level (such as paragraphs) Inline The elements in this chapter are as they appeared in the Candidate Recommendation for XSL published vember 21, 2000 ( All the listings in this chapter will use Listing 16.1 as their source document. Listing 16.1 is a truncated version of the document named FreedomsDream.xml, which is in the Chapter 16 folder on the CD-ROM. You can also find the full XSLFO document there. The document name is FreedomStyleFO.xsl. Listing 16.2 shows a typical FO document that develops a set of master pages. Listing 16.1: The Source XML for Some XSLFO Output <?xml version="1.0" encoding="utf-8"?> <!DOCTYPE lillybook SYSTEM "lillybookv4.dtd"> <lillybook id="freedomsdream" xmlns:xlink=" <Title>Freedom&apos;s Dream</Title> <Author> <FirstName>Chuck</FirstName> <LastName>White</LastName> </Author> <Abstract copyright="2001, Chuck White"> <Paragraph>Descriptive narration for interactive short story "Freedom's Dream"</Paragraph> </Abstract> <Chapter> <ChapterTitle>One</ChapterTitle> <score source="chapter_1score"/> <Section classification="multimedia" level="one"> <SectionTitle>PartOne</SectionTitle> <Paragraph>Had it been a dream, Antron Crimea's memory of the clenched fist piercing the sky of a tumultuous, thundering crowd would have been bearable solitude. As it was though, the reality brought him to another place, to a distance only something like a dream could take him.

31 408 Chapter 16 Displaying XML: Using XSLFO for Document Creation </Paragraph> </Section> </Chapter> </lillybook> Listing 16.2 is a result set generated by applying Listing 16.3, which is an XSLT document, to an XML source document (parts of which are shown in Listing 16.1). Take a look at Listing 16.3, and see if you can determine how XSLT was used to insert some of the basic XSLFO objects into the result set. Listing 16.2: An XSLFO Result Set Generated from Listing 16.3 <fo:layout-master-set> <fo:simple-page-master master-name="cover" page-height="11in" page-width="8.5in" margin-top="0.5in" margin-bottom="0.5in" margin-left="1in" margin-right="0.5in"> <fo:region-body margin-top="1in" /> </fo:simple-page-master> <fo:simple-page-master master-name="leftpage" page-height="11in" page-width="8.5in" margin-left="0.5in" margin-right="1in" margin-top="0.5in" margin-bottom="0.5in"> <fo:region-before extent="1in" /> <fo:region-after extent="1in" /> <fo:region-body margin-top="1.25in" margin-bottom="1.25in" /> </fo:simple-page-master> <fo:simple-page-master master-name="rightpage" page-height="11in" page-width="8.5in" margin-left="1 in" margin-right="0.5in" margin-top="0.5in" margin-bottom="0.5in"> <fo:region-before extent="1in" /> <fo:region-after extent="1in" /> <fo:region-body margin-top="1.25in" margin-bottom="1.25in" /> </fo:simple-page-master> <fo:page-sequence-master master-name="contents"> <fo:repeatable-page-master-alternatives> <fo:conditional-page-master-reference master-name="leftpage" odd-or-even="even" /> <fo:conditional-page-master-reference master-name="rightpage" odd-or-even="odd" /> </fo:repeatable-page-master-alternatives> </fo:page-sequence-master> </fo:layout-master-set> You ll need to recall how XSLT works here to fully grasp all this. Remember that XSLT allows you to define a group of one or more templates, which we ve done in Listing 16.3, for outputting however you can. If you were to run Listing 16.3 through an XSLT processor, it would give you the result in Listing To display the results of Listing 16.2, you need to run it through an XSLFO processor, unless your processor understands both languages (and some can be expected to, making that extra step unnecessary).

32 Learning about Formatting Objects 409 Listing 16.3: An XSLT Document Using an XSLFO Namespace <?xml version="1.0" encoding="utf-8"?> <xsl:stylesheet version="1.0" xmlns:xsl=" xmlns:fo=" <xsl:output indent="yes"/> <xsl:template match="lillybook"> <fo:root> <fo:layout-master-set> <fo:simple-page-master master-name="cover" page-height="11in" page-width="8.5in" margin-top="0.5in" margin-bottom="0.5in" margin-left="1in" margin-right="0.5in"> <fo:region-body margin-top="1in" /> </fo:simple-page-master> <fo:simple-page-master master-name="leftpage" page-height="11in" page-width="8.5in" margin-left="0.5in" margin-right="1in" margin-top="0.5in" margin-bottom="0.5in"> <fo:region-before extent="1in"/> <fo:region-after extent="1in"/> <fo:region-body margin-top="1.25in" margin-bottom="1.25in" /> </fo:simple-page-master> <fo:simple-page-master master-name="rightpage" page-height="11in" page-width="8.5in" margin-left="1 in" margin-right="0.5in" margin-top="0.5in" margin-bottom="0.5in"> <fo:region-before extent="1in"/> <fo:region-after extent="1in"/> <fo:region-body margin-top="1.25in" margin-bottom="1.25in" /> </fo:simple-page-master> <fo:page-sequence-master master-name="contents"> <fo:repeatable-page-master-alternatives> <fo:conditional-page-master-reference master-name="leftpage" odd-or-even="even"/>

33 410 Chapter 16 Displaying XML: Using XSLFO for Document Creation <fo:conditional-page-master-reference master-name="rightpage" odd-or-even="odd"/> </fo:repeatable-page-master-alternatives> </fo:page-sequence-master> </fo:layout-master-set> </fo:root> </xsl:template> <!-- additional elements here --> </xsl:stylesheet> You may find this syntax somewhat different, so let s focus on what is familiar. First, take a look at the way the namespace is used. Rather than using the HTML 4 or XHTML namespace, which you might use for generating HTML output from an XSL transformation, you can use a formatting object namespace. There is no guarantee that an XSL processor will recognize that namespace. We used the Antenna House XSL Formatter to render the XML document, because it understands that namespace. You could also process an XSL file that outputs formatting objects by using a processor such as XT and then read the result file into another program that converts the file into a.pdf format, such as the Apache Software Foundation s FOP application. You are probably also familiar with the template elements in Listing If you recall how HTML fragments are placed in templates, you can see how this is the same with the formatting objects, but instead of inserting HTML, you insert the formatting objects. Remember that this is the essence of XSLT transformations: outputting a result set according to your needs. You could also output RTF (Rich Text Format) or SVG (Scalable Vector Graphics). If the properties associated with formatting objects look familiar, it s because many of them are based on the CSS model. Many are also based on the DSSSL (Document Style Semantics and Specification Language) model, as is CSS. DSSSL is a large, complex style language used in the SGML world. Much of what you find in CSS and XSL is derived from that language. Page Flow Master page objects handle the basic geometry of a master page. The simple-page-master object handles the basic task of creating master pages. You create a simple-page-master object, assign it a name, and call on it later when deciding how your content should flow. The pagesequence-master object determines the order in which a group of simple-page-master objects flow within a document. If you look at Figure 16.3, you can see how Master Page B is used for one page of a document and Master Page A is used for all the rest. Within each master page, you can define gutters and other sections using the regionstart, region-end, region-before, and region-after elements. All these objects are descended from a root element, called the root object, and make up a tree.

34 Learning about Formatting Objects 411 FIGURE 16.3 Using master pages Page Management Elements The following elements manage page layout and the master pages that act as templates for other pages. fo:root This is the top-level element for a formatting-object result tree. It doesn t generate any containing area itself, but is instead used to define the root level of the formatting-object tree. It can contain layout-master-set, declarations, and page-sequence objects. All other formatting objects must be contained within this element. This element has one available property, media-usage. fo:page-sequence This element grabs a master page (as defined by a page-sequence-master object or a simplepage-master object) and manages the flow of content into a series of one or more pages. When you use this element, simply call the page master by using the master-name attribute: <fo:page-sequence master-name="contents">

35 412 Chapter 16 Displaying XML: Using XSLFO for Document Creation The preceding code snippet calls a previously defined page master named contents. A page-sequence-master object or a simple-page-master object defines the page master that is called by this element. The fo:page-sequence attributes include the following: country force-page-count format grouping-separator grouping-size id initial-page-number language letter-value master-name fo:layout-master-set This element contains all the page masters used in a document. Its main function is to act as a container for all the page masters you define. Listing 16.4 shows a layout-master-set with a number of page masters defined within it. Its child elements are the simple-page-master and page-sequence-master elements. Listing 16.4: Using a fo:layout-master-set <fo:layout-master-set> <fo:simple-page-master master-name="cover" page-height="11in" page-width="8.5in"> <fo:region-body margin-top="1in" /> </fo:simple-page-master> <fo:simple-page-master master-name="leftpage" page-height="11in" page-width="8.5in"> <fo:region-body margin-top="1.25in" margin-bottom="1.25in" margin-left="1.75in" margin-right=".5in"/> </fo:simple-page-master> <fo:simple-page-master master-name="rightpage" page-height="11in" page-width="8.5in" margin-left="1 in" margin-right="0.5in" margin-top="0.5in" margin-bottom="0.5in"> <fo:region-end extent="1.5in" background-color="#6600ff" > </fo:region-end> <fo:region-body margin-top="1.25in" margin-bottom="1.25in"

36 Learning about Formatting Objects 413 margin-right="1.75in" margin-left=".5in"/> </fo:simple-page-master> </fo:layout-master-set> properties are available for this object. fo:simple-page-master This element contains information about the geometry of a master page, which is a template containing characteristics common to a group of pages. See Listing 16.3 for an example. This element is always a child of the layout-master-set element and can never be nested within another flow object. There are five child elements: region-body, region-before, region-after, region-start, and region-end. These child elements define regions of the page on which content is placed. Generally, most of your flow content will fall into your region-body object. This object is the central repository for basic content. The other child elements are used for side region areas for use as sidebars, headers and footers, or décor. The properties available for this element are: end-indent margin-bottom margin-left margin-right margin-top master-name page-height page-width reference-orientation space-after space-before start-indent writing-mode fo:page-sequence-master This element is used to automatically generate pages based on the content flow. It is used in conjunction with any of its child elements: single-page-master-reference, repeatable-page-master-reference, and the repeatable-page-master-alternatives. See the repeatable-page-master-alternatives section for information about how this element is used. This element is always a child of the layout-master-set element. See Listing 16.4, earlier in this chapter, for an example of how it works. The master-name property is the only property available for this element: fo:conditional-page-master-reference This element is used in conjunction with the repeatable-page-master-alternatives element. See the next section and Listing 16.4, earlier in this chapter, for an explanation of how it works. This element has no children. Allowable attributes include master-name, page-position odd-or-even, and blank-or-not-blank.

37 414 Chapter 16 Displaying XML: Using XSLFO for Document Creation fo:repeatable-page-master-alternatives This important page management element makes it possible to dump content into a series of alternating pages. It contains reference objects that allow you to name previously defined master pages as flow targets. In other words, if you want to dump pages into a series of alternating left and right pages with even and odd numbering, all you need to do is name those pages in a reference object called the conditional-page-master-reference element, which is a child of the fo:repeatable-page-master-alternatives element. Listing 16.5 shows how the odd-or-even attribute of the conditional-page-master-reference object is used to specify whether a page is even-numbered or odd numbered. The XSL processor will then flow all the content into each successive page when the page-sequence is called later. The maximum-repeats property is the only property available for this element. Listing 16.5: Using the fo:repeatable-page-master-alternatives Element <fo:page-sequence-master master-name="contents"> <fo:repeatable-page-master-alternatives> <fo:conditional-page-master-reference master-name="leftpage" odd-or-even="even"/> <fo:conditional-page-master-reference master-name="rightpage" odd-or-even="odd"/> </fo:repeatable-page-master-alternatives> </fo:page-sequence-master> In Listing 16.5, the fo:page-sequence-master element named contents is defined by the repeatable-page-master-alternatives object, instead of a simple-page-master. Nevertheless, it gets called by a page-sequence object. Listing 16.6: Calling a fo:page-sequence-master Element <fo:page-sequence master-name="contents"> <fo:static-content flow-name="xsl-region-after"> <fo:block height="18pt" background-color="black" color="white" font-size="10pt" font-weight="900" font-family="frutiger, sans-serif" text-indent="10pt" > <fo:page-number/> </fo:static-content> <fo:static-content flow-name="xsl-region-before">

38 Learning about Formatting Objects 415 <fo:block height="18pt" border-bottom="1pt outset #6600FF" padding-bottom="6pt" color="#6600ff" font-size="10pt" font-weight="300" font-family="frutiger, sans-serif" text-indent="10pt" text-align="end"> <xsl:text> Freedom&apos;s Dream </xsl:text> </fo:static-content> <fo:flow flow-name="xsl-region-body" > <fo:block> <xsl:apply-templates select="chapter"/> </fo:flow> </fo:page-sequence> Listing 16.7 shows how the result set looks after the XSL transformation has been processed by an XSLT processor. The final result set has been truncated significantly to save space. Listing 16.7: An XSLFO Result Set <fo:page-sequence master-name="contents"> <fo:static-content flow-name="xsl-region-after"> <fo:block height="18pt" background-color="black" color="white" font-size="10pt" font-weight="900" font-family="frutiger, sans-serif" text-indent="10pt"> <fo:page-number /> </fo:static-content> <fo:static-content flow-name="xsl-region-before"> <fo:block height="18pt" border-bottom="1pt outset #6600FF" padding-bottom="6pt" color="#6600ff" font-size="10pt" font-weight="300" font-family="frutiger, sans-serif" text-indent="10pt" text-align="end"> Freedom's Dream </fo:static-content> <fo:flow flow-name="xsl-region-body"> <fo:block> <fo:block font-size="14pt" font-family="frutiger, sans-serif" space-before="6pt" space-after="6pt" text-align="center"> Chapter One

39 416 Chapter 16 Displaying XML: Using XSLFO for Document Creation <fo:block space-before="6pt" space-after="6pt" text-align="center"> <fo:external-graphic id="sectional" src="bbbar.jpg" /> <fo:block space-after="6pt" font-family="garamond, Palatino, Georgia, serif" font-size="12pt" text-indent="0pt">had it been a dream, Antron Crimea's memory of the clenched fist piercing the sky of a tumultuous, thundering crowd would have been bearable solitude. As it was though, the reality brought him to another place, to a distance only something like a dream could take him. <fo:block space-after="6pt" font-family="garamond, Palatino, Georgia, serif" font-size="12pt" text-indent="6pt"> 2001 by Charles White <fo:block space-after="6pt" font-family="garamond, Palatino, Georgia, serif" font-size="12pt" text-indent="6pt"> part of this story or any of its associated links, graphics, or text, may be reproduced without express written permission from the author. </fo:flow> </fo:page-sequence> Table 16.2 shows some additional page management elements you might want to employ in your XSLFO development efforts. TABLE 16.2: Additional Page Management Elements Formatting Object fo:single-pagemaster-reference fo:repeatablepage-masterreference fo:region-body fo:region-before fo:region-after Use Specifies a single instance of a single page-master object. Specifies multiple instances of a single page-master object. Defines the dimensions, writing alignment, background, border, margin, and padding properties of the main content of a page. Defines the dimensions, writing alignment, background, border, margin, and padding properties of a side region of a page. The exact meaning depends on the target language. For example, region-before objects would be used for headers in English language documents. Defines the dimensions, writing alignment, background, border, margin, and padding properties of a side region of a page. The exact meaning depends on the target language. For example, region-after objects would be used for footers in English language documents. Child Elements ne ne ne ne ne

40 Learning about Formatting Objects 417 TABLE 16.2: Additional Page Management Elements (continued) Formatting Object fo:region-start fo:region-end Use Defines the dimensions, writing alignment, background, border, margin, and padding properties of a side region of a page. The exact meaning depends on the target language. For example, region-start objects would be used for sidebars or other margin décor in English language documents. Defines the dimensions, writing alignment, background, border, margin, and padding properties of a side region of a page. The exact meaning depends on the target language. For example, region-end objects would be used for sidebars or other margin décor in English language documents. Child Elements fo:declarations Groups a style sheet s global declarations. color-profile fo:color-profile Declares an ICC Color Profile. If the profile is ne unavailable, the srgb color space is used. fo:title Returns a sequence of areas defined by those child elements that are used as flow objects for the purpose of associating a title with a document. bidi-override, character, external-graphic, instream-foreign-object, inline, inline-container, leader, page-number, page-number-citation, basic-link, multi-toggle Flow-Level Objects Once you ve established a set of master pages, you need to define how the content will flow into the pages of your XSLFO document. To accomplish this, you choose a master page upon which each page you want to flow content into will be based. You can name more than one master page so that odd and even pages can be generated separately, with the content you chose spilling into each successive page. Listing 16.8 defines a master page named leftpage. This is then flowed into a sequence of pages in Listing 16.9, using the page-sequence object, which contains a flow object. Listing shows the result after an XSLT transformation. ne ne Listing 16.8: A Simple Page Master Used for a Cover Page <fo:simple-page-master master-name="cover" page-height="11in" page-width="8.5in" margin-top="0.5in" margin-bottom="0.5in"

41 418 Chapter 16 Displaying XML: Using XSLFO for Document Creation margin-left="1in" margin-right="0.5in"> <fo:region-body margin-top="1in" /> </fo:simple-page-master> Listing 16.9: Applying a Cover Page Master to a Page-Sequence Flow Object <fo:page-sequence master-name="cover"> <fo:flow flow-name="xsl-region-body" > <fo:block border="1pt outset black" padding="12pt" > <fo:block font-family="frutiger, Helvetica, sans-seri" font-size="18pt" position="absolute" top="0in" left="0in" text-align="center"> <xsl:apply-templates select="title"/> <fo:block position="absolute" top="1in" left="1.5in" font-family="frutiger, Helvetica, sans-serif" font-size="12pt" text-align="center" space-after="36pt"> <xsl:apply-templates select="author"/> <fo:block position="absolute" top="3in" left="1in" font-family="garamond, serif" text-align="center"> A Lillyming Production <fo:block position="absolute" top="4in" left="1.5in" font-family="frutiger, Helvetica, sans-serif" font-size="8pt" text-align="center" space-after="36pt"> <xsl:apply-templates select="abstract"/> </fo:flow> Listing shows the result fragment that is generated by Listing 16.9.

42 Learning about Formatting Objects 419 Listing 16.10: An XSLFO Result Set <fo:page-sequence master-name="cover"> <fo:flow flow-name="xsl-region-body"> <fo:block border="1pt outset black" padding="12pt"> <fo:block font-family="frutiger, Helvetica, sans-seri" font-size="18pt" position="absolute" top="0in" left="0in" text-align="center">freedom's Dream <fo:block position="absolute" top="1in" left="1.5in" font-family="frutiger, Helvetica, sans-serif" font-size="12pt" text-align="center" space-after="36pt"> by Chuck White <fo:block position="absolute" top="3in" left="1in" font-family="garamond, serif" text-align="center"> A Lillyming Production <fo:block position="absolute" top="4in" left="1.5in" font-family="frutiger, Helvetica, sans-serif" font-size="8pt" text-align="center" space-after="36pt"> 2001, Chuck White </fo:flow> </fo:page-sequence> The two kinds of flow objects are flow and fo:static-content. The flow object is used to flow, or distribute, content across a sequence of one or more pages. All you need to do is define which pages will accept the flow of content. You use the page-sequence element to choose your master page. The fo:static-content object is used to hold unchanging content, particularly for headers and footers. fo:flow Most of the work for this object is done by its children, such as the fo:block element. Its children are the block, block-container, table-and-caption, table, and list-block elements. Listing 16.4 shows the flow object. The flow contains content defined by the block object. When you include a block object inside a flow object, you can use that block object to apply specific styling, much in the way you use CSS to apply style to HTML objects. To accomplish this, let s add a block object to a flow object: <fo:flow><fo:block></fo:flow> Next, we ll add some styling properties to the block object: <fo:flow> <fo:block font-size="12pt" text-align="center"> </fo:flow>

43 420 Chapter 16 Displaying XML: Using XSLFO for Document Creation The next step is to drop an object from the source XML document into the block object: <fo:flow> <fo:block font-size="12pt" text-align="center"> <xsl:apply-templates select="chapter"/> </fo:flow> w all the child nodes of the Chapter element as defined by the XSLT Chapter template will appear as defined by the styles in the preceding snippet of code. The only attribute available for this element is flow-name. fo:static-content This object manages content that appears on many pages, particularly headers and footers. Listing shows how you can use a static-content object to insert page numbers into repeating pages. The pages count automatically (this capability is intrinsic to the language through the use of the page-number object). The only attribute available for this element is flow-name. Listing 16.11: Using the fo:static-content Element to Add Page Numbers <fo:static-content flow-name="xsl-region-after"> <fo:block height="18pt" background-color="black" color="white" font-size="10pt" font-weight="900" font-family="frutiger, sans-serif" text-indent="10pt"> <fo:page-number/> </fo:static-content> The page-number object is placed within a block (this block is not a prerequisite) within a region-after object. Because this is an English language document, the region-after is an area for footers that appear at the bottom of the page. Block-Level Objects Flow objects dump content into a sequence of one or more pages. Next on the global formatting hierarchy are block-level objects. These allow you to work with blocks of objects. Blocks of objects consist of entities such as groups of paragraphs and text, groups of images, and so on.

44 Learning about Formatting Objects 421 fo:block This object denotes a block area whose height and width by default are determined by a combination of the containing area (such as an application window) and the number of lines of text within the block. This element should be used for formatting paragraphs and can also be used for such other block-level type objects as titles, captions, and headlines. The following child elements are available to the block object: basic-link bidi-override block block-container character external-graphic inline, inline-container instream-foreign-object leader list-block multi-toggle page-number page-number-citation table table-and-caption Attributes available for this element include the following: background-attachment background-color background-image background-position-horizontal background-position-vertical background-repeat border-after-color border-after-style border-after-width border-before-color border-before-style border-before-width border-bottom-color border-bottom-style border-bottom-width border-end-color border-end-style border-end-width border-left-color border-left-style border-left-width border-right-color border-right-style border-right-width border-start-color border-start-style border-start-width border-top-color border-top-style border-top-width break-after break-before color country cue-after cue-before elevation end-indent font-family font-model font-selection-strategy font-size font-size-adjust font-stretch

45 422 Chapter 16 Displaying XML: Using XSLFO for Document Creation font-style font-variant font-weight hyphenate hyphenation-character hyphenation-keep hyphenation-ladder-count hyphenation-push-character-count hyphenation-remain-character-count id keep-together keep-with-next keep-with-previous language last-line-end-indent linefeed-treatment line-height line-height-shift-adjustment line-stacking-strategy margin-bottom margin-left margin-right margin-top orphans padding-after padding-before padding-bottom padding-end padding-left padding-right padding-start padding-top pause-after pause-before pitch pitch-range play-during relative-position richness role, azimuth script source-document space-after space-before space-treatment span, speak speak-header speak-numeral speak-punctuation speech-rate start-indent stress text-align text-align-last text-altitude text-depth text-indent visibility voice-family volume white-space-collapse widows wrap-option z-index fo:block-container This object generates a block-level reference area. The following child elements are available to the block-container object: block, block-container, table-and-caption, table, and list-block.

46 Learning about Formatting Objects 423 Attributes available for this element include the following: absolute-position break-before background-attachment clip background-color display-align background-image end-indent background-position-horizontal height background-position-vertical id background-repeat inline-progression-dimension block-progression-dimension keep-together border-after-color keep-with-next border-after-style keep-with-previous border-after-width left border-before-color margin-bottom border-before-style margin-left border-before-width margin-right border-bottom-color margin-top border-bottom-style overflow border-bottom-width padding-after border-end-color padding-before border-end-style padding-bottom border-end-width padding-end border-left-color padding-left border-left-style padding-right border-left-width padding-start border-right-color padding-top border-right-style reference-orientation border-right-width right border-start-color space-after border-start-style space-before border-start-width span border-top-color start-indent border-top-style top border-top-width width bottom writing-mode break-after

47 424 Chapter 16 Displaying XML: Using XSLFO for Document Creation List-Formatting Objects You can also manage list formatting with the elements shown in Table The top-level object is the list-block object, which in turn holds the list-item object, which is itself a container for the list-item-body and list-item-label objects. TABLE 16.3: List-Formatting Objects Formatting Object Use Child Elements fo:list-block Master container used to list-item generate lists fo:list-item Contains the label and body list-item-label, list-item-body of the list-block object fo:list-item-body Returns areas generated by any of its children to create the content of the list-item block, block-container, table-and-caption, table, list-block fo:list-item-label Identifies a list-item object s body through enumeration or some other process block, block-container, table-and-caption, table, list-block Managing Inline Areas You can also manage inline areas. In today s page layout programs such as Quark Xpress, PageMaker, and InDesign, it s possible to include a graphic inline. This means that the graphic flows with the text, rather than the other way around. Typically, text flows around a graphic, but not an inline graphic. In a desktop publishing program, an inline graphic will move along with the character it was inserted next to. The most commonly used inline elements are the fo:external-graphic element, the fo:character element, and the fo:page-number element. Additional inline elements are shown in Table TABLE 16.4: Additional Inline Formatting Objects Formatting Object fo:bidi-override fo:initial-property-set Use Forces a change in the direction of a string; used when the Unicode-bide algorithm fails. Formats the first line of an foblock object. Child Elements bidi-override, character, externalgraphic, instream-foreign-object, inline, inline-container, leader, page-number, page-number-citation, basic-link, multi-toggle, block, block-container, table-and-caption, table, list-block ne

48 Learning about Formatting Objects 425 TABLE 16.4: Additional Inline Formatting Objects (continued) Formatting Object fo:instreamforeign-object fo:inline fo:inlinecontainer fo:leader fo:page-numbercitation Use Primarily intended for generating subtrees within non-xsl namespaces. This object makes it possible to include SVG documents (or other XML-based document) within an XSLFO document. Formats inline text areas with a background or border Generates inline reference areas. Provides character glyphs for decorative or other purposes (such as leaders for tabbed spaces in table of content sections). According to the W3C Recommendation, references the page-number for the page containing the first normal area returned by the cited formatting object. Child Elements ne bidi-override, character, externalgraphic, instream-foreign-object, inline, inline-container, leader, page-number, page-number-citation, basic-link, multitoggle, block, block-container, tableand-caption, table, list-block block, block-container, table-and-caption, table, list-block bidi-override, character, externalgraphic, instream-foreign-object, inline, inline-container, leader, page-number, page-number-citation, basic-link, multi-toggle ne fo:external-graphic This manages an external graphic object. child formatting objects are available for this object. Some of the attributes available for this include the following: alignment-adjust alignment-baseline azimuth background-attachment background-color background-image background-position-horizontal background-position-vertical background-repeat baseline-shift block-progression-dimension border-after-color border-after-style border-after-width border-before-color border-before-style border-before-width border-bottom-color border-bottom-style border-bottom-width

49 426 Chapter 16 Displaying XML: Using XSLFO for Document Creation border-end-color border-end-style border-end-width border-left-color border-left-style border-left-width border-right-color border-right-style border-right-width border-start-color border-start-style border-start-width border-top-color border-top-style border-top-width content-height content-type content-width cue-after cue-before display-align dominant-baseline elevation height id inline-progression-dimension keep-with-next keep-with-previous line-height line-height-shift-adjustment overflow padding-after padding-before padding-bottom padding-end padding-left padding-right padding-start padding-top pause-after pause-before pitch pitch-range play-during relative-position richness role scaling scaling-method source-document space-end space-start speak speak-header speak-numeral speak-punctuation speech-rate src stress text-align voice-family volume width fo:character You can keep drilling down in specificity when developing flow objects. You can use the fo:character element to format specific characters. This element has no children. It overrides any previously applied formatting. Among the properties available to this element are:

50 Learning about Formatting Objects 427 cue-after alignment-adjust cue-before alignment-baseline dominant-baseline azimuth elevation background-attachment font-family background-color font-model background-image font-selection-strategy background-position-horizontal font-size background-position-vertical font-size-adjust background-repeat font-stretch baseline-shift font-style border-after-color font-variant border-after-style font-weight border-after-width glyph-orientation-horizontal border-before-color glyph-orientation-vertical border-before-style hyphenate border-before-width hyphenation-character border-bottom-color hyphenation-push-character-count border-bottom-style hyphenation-remain-character-count border-bottom-width id border-end-color keep-with-next border-end-style keep-with-previous border-end-width language border-left-color letter-spacing border-left-style line-height border-left-width line-height-shift-adjustment border-right-color padding-after border-right-style padding-before border-right-width padding-bottom border-start-color padding-end border-start-style padding-left border-start-width padding-right border-top-color padding-start border-top-style padding-top border-top-width pause-after character pause-before color pitch country pitch-range

51 428 Chapter 16 Displaying XML: Using XSLFO for Document Creation play-during relative-position richness score-spaces script space-end space-start speak speak-header speak-numeral speak-punctuation speech-rate stress suppress-at-line-break text-altitude text-decoration text-depth text-shadow text-transform treat-as-word-space voice-family volume word-spacing fo:inline-container This element is used to embed block-level objects in inline-level areas. These elements move with the general flow of the page inline like other inline elements do, but the objects they contain act like block level objects. The attributes used by this element are the same as those used by fo:block. fo:page-number This element contains the page number of a page. Available properties for this object are: alignment-adjust alignment-baseline baseline-shift border-bottom-color border-bottom-style border-bottom-width border-left-color border-left-style border-left-width border-right-color border-right-style border-right-width dominant-baseline font-family font-model font-selection-strategy font-size font-size-adjust font-stretch font-style font-variant font-weight id keep-with-next keep-with-previous letter-spacing line-height line-height-shift-adjustment padding-after padding-before padding-bottom padding-end padding-left padding-right padding-start padding-top

52 Learning about Formatting Objects 429 relative-position score-spaces space-end space-start text-decoration text-shadow text-transform word-spacing Additional Formatting Objects We can t cover every formatting object in a book of this scope, since an entire book could easily be devoted to formatting objects. However, we have provided a series of tables that introduce you to the other elements available in the XSLFO language. These are shown in Tables 16.5 through TABLE 16.5: Table Level Formatting Objects Formatting Object fo:table-andcaption Use Formats a table and caption together. Although table is a child object, don t mistake this to mean you must wrap a table within a table-and-caption object. A table object does stand on its own. Child Elements table-caption, table fo:table Formats a table s tabular data. table-column, table-header, tablefooter, table-body fo:table-caption A block-level container for labeling a table, used in conjunction with the table-and-caption object table fo:table-column Applies formatting to shared column table-and-caption areas fo:table-header Formats the table header table-row, table-cell fo:table-footer Formats the table footer table-row, table-cell fo:table-body Formats the table body table-row, table-cell fo:table-row Groups table cells into rows table-cell fo:table-cell Groups content placed into a table cell block, block-container, table-andcaption, table, list-block TABLE 16.6: Link and Multiformatting Objects Formatting Use Child Elements Object fo:basic-link Represents the start of a simple link. bidi-override character, externalgraphic, instream-foreign-object, inline, inline-container, leader, page-number, page-number-citation, basic-link, multi-toggle, block, block-container, table-and-caption, table, list-block

53 430 Chapter 16 Displaying XML: Using XSLFO for Document Creation TABLE 16.6: Link and Multiformatting Objects (continued) Formatting Use Child Elements Object fo:multi-switch Used in conjunction with multi-toggle. multi-case fo:multi-case fo:multi-toggle fo:multiproperties fo:multiproperty-set The object that is toggled is either hidden or displayed within a multi-switch object. Only one multi-case object is visible at a time. The toggling event is triggered by the multi-toggle object. Designates an area that triggers a switch from one multi-case object to another. These areas are the children of this object. Allows a set of alternating properties. The HTML/CSS equivalent of this would be a highlight that appears over a link during a mouse-over event. If you change characteristics that might change the body of the text (such as font-size), the flow of the pages will change. Therefore use this object with caution. A set of traits for specifying alternative formatting properties. TABLE 16.7: Out-of-Line Formatting Objects bidi-override, character, externalgraphic, instream-foreign-object, inline, inline-container, leader, page-number, page-number-citation, basic-link, multi-toggle, block, block-container, table-and-caption, table, list-block bidi-override, character, externalgraphic, instream-foreign-object, inline, inline-container, leader, page-number, page-number-citation, basic-link, multi-toggle, block, block-container, table-and-caption, table, list-block multi-property-set, wrapper multi-properties Formatting Use Child Elements Object fo:float Allows flow around an object. block, block-container, table-andcaption, table, list-block fo:footnote fo:footnote-body Supplies footnotes by returning its child elements within a region-body or absolutely positioned block-container object s generated objects. Returns one or more block-level child objects for the purpose of creating the body of a footnote object. inline, footnote-body block, block-container, table-andcaption, table, list-block

54 Understanding Formatting Data Types 431 TABLE 16.8: Unclassified Formatting Objects Formatting Object Use Child Elements fo:wrapper Defines shared properties of any objects contained within bidi-override, character, external-graphic, instream-foreign-object, inline, inlinecontainer, leader, page-number, page-numbercitation, basic-link, multi-toggle, block, blockcontainer, table-and-caption, table, list-block fo:marker fo:retrieve-marker Produces running headers and footers Produces running headers and footers bidi-override character, external-graphic, instream-foreign-object, inline, inlinecontainer, leader page-number, page-numbercitation, basic-link, multi-toggle, block, blockcontainer, table-and-caption, table, list-block retrieve-class-name, retrieve-position, retrieve-boundary Understanding Formatting Data Types The vocabulary for XSL formatting objects allows a number of data types that are listed in Table Advanced users may want access to these descriptions when developing programs that manage XML documents and data types. However, you don t need to be a programmer to know that if, for example, you re preparing an annual report, it might be nice to show losses in red and gains or positive values in black. XSL allows you to do that by giving access to these data types. TABLE 16.9: XSL Data Types Data Type Boolean Char Color Country Enumeration Font List Font Name ID IDREF Description A string containing a true or false values. Also the only valid string values. A Unicode character with no surrounding white space. A hexadecimal (such as # for black or #FFFFFF for white) or named color. A string representing a country in accordance with ISO 3166 country code. XML NMTOKEN values enumerated into a list. A white space delimited list of font names. A string representing a font name. String of characters conforming to NMTOKEN and that are unique within a given style sheet. String of characters conforming to NMTOKEN and that match a specific ID within the style sheet.

55 432 Chapter 16 Displaying XML: Using XSLFO for Document Creation TABLE 16.9: XSL Data Types (continued) Data Type Language Name Percent Positive Integer Positive Length Positive Real Signed Integer Signed Length Signed Real Space Specifier String Unsigned Integer Unsigned Length Unsigned Real URI Description A string specifying the human language in accordance with either ISO 639 three-letter code or with xml:lang in the XML 1 specification (which of these would be used was not determined as this book went to press). String of characters conforming to NMTOKEN. A signed real value representing a percentage. An unsigned integer (not including 0) consisting of digits in sequence. A positive real number (not including 0) with a unit qualification. A signed integer (not including 0) that can include an additional trailing character and trailing digits. A signed integer that can include the + or and trailing digits. A signed real number (meaning they can hold positive or negative values) with a unit qualification. A signed integer that can include the + or and trailing digits, in addition to a trailing character and trailing digits. A data type that can hold several kinds of data representing maximum, minimum, and optimum lengths, as well as conditional values and values that specify precedence. A sequence of one or more characters. An unsigned integer (including 0) consisting of digits in sequence. An unsigned real number (meaning they can t hold positive or negative values, but can hold 0) with a unit qualification. An unsigned integer that can include the + or and trailing digits, in addition to a trailing character and trailing digits. A series of characters denoting a Uniform Resource Identifier. Putting It All Together w it is time to see how an entire document looks applying what we ve covered so far. To conserve space, rather than provide a blow-by-blow explanation of each element, we ve added comments to Listing that explain each step within the XSLFO segment of the document. We don t provide any additional explanation about how each XSLT template is created. For further reference on XSLT, see the previous chapter. We have also included the result set, which consists entirely of FO objects, on the CD-ROM in a document called FOResult.fo. Figure 16.4 shows the cover page for this document, and Figure 16.5 shows the first interior page.

56 Putting It All Together 433 FIGURE 16.4 The cover for a short story generated by XSLFO FIGURE 16.5 An interior page for a short story generated by XSLFO

Appendix D CSS Properties and Values

Appendix D CSS Properties and Values HTML Appendix D CSS Properties and Values This appendix provides a brief review of Cascading Style Sheets (CSS) concepts and terminology, and lists CSS level 1 and 2 properties and values supported by

More information

XSL:FO Reference Guide OmniUpdate Training Conference 2018

XSL:FO Reference Guide OmniUpdate Training Conference 2018 XSL:FO Reference Guide OmniUpdate Training Conference 2018 omniupdate.com Formatting Object Elements fo:root The fo:root is the top node of the formatting object tree and wraps the entire Formatting Object

More information

What is it? Example of XSL Syntax. Basis of formatting. Transformation & Formatting. Formatting. Areas and Area Tree. 6.1 Overview of XSL Formatting

What is it? Example of XSL Syntax. Basis of formatting. Transformation & Formatting. Formatting. Areas and Area Tree. 6.1 Overview of XSL Formatting 6 XSL: Extensible Stylesheet Language What is it? An advanced style language for XML documents: 1. Language for transforming XML documents: XSLT 2. XML vocabulary for specifying formatting: XSL 1.0, W3C

More information

Introduction to Multimedia. MMP100 Spring 2016 thiserichagan.com/mmp100

Introduction to Multimedia. MMP100 Spring 2016 thiserichagan.com/mmp100 Introduction to Multimedia MMP100 Spring 2016 profehagan@gmail.com thiserichagan.com/mmp100 Troubleshooting Check your tags! Do you have a start AND end tags? Does everything match? Check your syntax!

More information

CSS. Text & Font Properties. Copyright DevelopIntelligence LLC

CSS. Text & Font Properties. Copyright DevelopIntelligence LLC CSS Text & Font Properties 1 text-indent - sets amount of indentation for first line of text value: length measurement inherit default: 0 applies to: block-level elements and table cells inherits: yes

More information

Extensible Stylesheet Language (XSL)

Extensible Stylesheet Language (XSL) Extensible Stylesheet Language (XSL) Version 1.0 W3C Recommendation 15 October 2001 This version: Latest version: http://www.w3.org/tr/2001/rec-xsl-20011015/ (PDF by RenderX, XML file, HTML (one large

More information

Client-Side Web Technologies. CSS Part II

Client-Side Web Technologies. CSS Part II Client-Side Web Technologies CSS Part II Topics Box model and related properties Visual formatting model and related properties The CSS Box Model Describes the rectangular boxes generated for elements

More information

Extensible Stylesheet Language (XSL)

Extensible Stylesheet Language (XSL) Extensible Stylesheet Language (XSL) Version 1.0 18 October 2000 This version: Latest version: http://www.w3.org/tr/2000/wd-xsl-20001018/ (PDF by RenderX, XML file, HTML (one large file), ZIP file) http://www.w3.org/tr/xsl/

More information

Adding CSS to your HTML

Adding CSS to your HTML Adding CSS to your HTML Lecture 3 CGS 3066 Fall 2016 September 27, 2016 Making your document pretty CSS is used to add presentation to the HTML document. We have seen 3 ways of adding CSS. In this lecture,

More information

USER GUIDE MADCAP FLARE Tables

USER GUIDE MADCAP FLARE Tables USER GUIDE MADCAP FLARE 2018 Tables Copyright 2018 MadCap Software. All rights reserved. Information in this document is subject to change without notice. The software described in this document is furnished

More information

IMY 110 Theme 6 Cascading Style Sheets

IMY 110 Theme 6 Cascading Style Sheets IMY 110 Theme 6 Cascading Style Sheets 1. Cascading Style Sheets 1.1. Cascading Style Sheets Up to now we have done styling by using the style attribute. e.g. paragraph What

More information

INFS 2150 Introduction to Web Development

INFS 2150 Introduction to Web Development INFS 2150 Introduction to Web Development 3. Page Layout Design Objectives Create a reset style sheet Explore page layout designs Center a block element Create a floating element Clear a floating layout

More information

INFS 2150 Introduction to Web Development

INFS 2150 Introduction to Web Development Objectives INFS 2150 Introduction to Web Development 3. Page Layout Design Create a reset style sheet Explore page layout designs Center a block element Create a floating element Clear a floating layout

More information

CSS Selectors. element selectors. .class selectors. #id selectors

CSS Selectors. element selectors. .class selectors. #id selectors CSS Selectors Patterns used to select elements to style. CSS selectors refer either to a class, an id, an HTML element, or some combination thereof, followed by a list of styling declarations. Selectors

More information

Cascading Style Sheet Quick Reference

Cascading Style Sheet Quick Reference Computer Technology 8/9 Cascading Style Sheet Quick Reference Properties Properties are listed in alphabetical order. Each property has examples of possible values. Properties are not listed if they are

More information

8/19/2018. Web Development & Design Foundations with HTML5. Learning Objectives (1 of 2) Learning Objectives (2 of 2)

8/19/2018. Web Development & Design Foundations with HTML5. Learning Objectives (1 of 2) Learning Objectives (2 of 2) Web Development & Design Foundations with HTML5 Ninth Edition Chapter 3 Configuring Color and Text with CSS Slides in this presentation contain hyperlinks. JAWS users should be able to get a list of links

More information

COSC 2206 Internet Tools. CSS Cascading Style Sheets

COSC 2206 Internet Tools. CSS Cascading Style Sheets COSC 2206 Internet Tools CSS Cascading Style Sheets 1 W3C CSS Reference The official reference is here www.w3.org/style/css/ 2 W3C CSS Validator You can upload a CSS file and the validator will check it

More information

Unit D Lecture Notes Word 2003

Unit D Lecture Notes Word 2003 Unit D Lecture Notes Word 2003 Objectives: In this project you will learn: Set document margins Divide a document into sections Insert page breaks Insert page numbers Add headers and footers Edit headers

More information

Web Design and Implementation

Web Design and Implementation Study Guide 3 - HTML and CSS - Chap. 13-15 Name: Alexia Bernardo Due: Start of class - first day of week 5 Your HTML files must be zipped and handed in to the Study Guide 3 dropbox. Chapter 13 - Boxes

More information

UNIVERSITI TEKNOLOGI MALAYSIA TEST 1 SEMESTER II 2012/2013

UNIVERSITI TEKNOLOGI MALAYSIA TEST 1 SEMESTER II 2012/2013 UNIVERSITI TEKNOLOGI MALAYSIA TEST 1 SEMESTER II 2012/2013 SUBJECT CODE : SCSV1223 (Section 05) SUBJECT NAME : WEB PROGRAMMING YEAR/COURSE : 1SCSV TIME : 2.00 4.00 PM DATE : 18 APRIL 2013 VENUE : KPU 10

More information

The American University in Cairo. Academic Computing Services. Word prepared by. Soumaia Ahmed Al Ayyat

The American University in Cairo. Academic Computing Services. Word prepared by. Soumaia Ahmed Al Ayyat The American University in Cairo Academic Computing Services Word 2000 prepared by Soumaia Ahmed Al Ayyat Spring 2001 Table of Contents: Opening the Word Program Creating, Opening, and Saving Documents

More information

Getting Started with Eric Meyer's CSS Sculptor 1.0

Getting Started with Eric Meyer's CSS Sculptor 1.0 Getting Started with Eric Meyer's CSS Sculptor 1.0 Eric Meyer s CSS Sculptor is a flexible, powerful tool for generating highly customized Web standards based CSS layouts. With CSS Sculptor, you can quickly

More information

INFS 2150 Introduction to Web Development

INFS 2150 Introduction to Web Development INFS 2150 Introduction to Web Development 6. Tables and Columns Objectives Explore the structure of a web table Create table heading and data cells Apply CSS styles to a table Create cells that span multiple

More information

INFS 2150 Introduction to Web Development

INFS 2150 Introduction to Web Development INFS 2150 Introduction to Web Development 6. Tables and Columns Objectives Explore the structure of a web table Create table heading and data cells Apply CSS styles to a table Create cells that span multiple

More information

Creating Interactive PDF Forms

Creating Interactive PDF Forms Creating Interactive PDF Forms Using Adobe Acrobat X Pro for the Mac University Information Technology Services Training, Outreach, Learning Technologies and Video Production Copyright 2012 KSU Department

More information

GoSquared Equally Rounded Corners Equally Rounded Corners -webkit-border-radius -moz-border-radius border-radius Box Shadow Box Shadow -webkit-box-shadow x-offset, y-offset, blur, color Webkit Firefox

More information

BIRT Report Paging Feature Specification (BPS19)

BIRT Report Paging Feature Specification (BPS19) BIRT Report Paging Feature Specification (BPS19) Draft 3: January 18, 2006 Abstract This document specifies the BIRT report paging features. Document Revisions Version Date Description of Changes Draft

More information

How to use text. Adding a text frame

How to use text. Adding a text frame How to use text Because Adobe InDesign CS6 is a page layout tool, working with text is an important skill. With InDesign, you add all text (and all content) into frames. Frames are shapes (called paths)

More information

Publisher 2016 Foundation SAMPLE

Publisher 2016 Foundation SAMPLE Publisher 2016 Foundation Publisher 2016 Foundation Microsoft Publisher 2016 Foundation - Page 2 2015 Cheltenham Group Pty. Ltd. All trademarks acknowledged. E&OE. No part of this document may be copied

More information

Creating indexes using RenderX extensions

Creating indexes using RenderX extensions Creating indexes using RenderX extensions Building page number lists for indexes is not possible within XSL 1.0. RenderX XEP provides this functionality via extension elements/properties. indexes creation

More information

Microsoft Publisher 2013 Foundation. Publisher 2013 Foundation SAMPLE

Microsoft Publisher 2013 Foundation. Publisher 2013 Foundation SAMPLE Microsoft Publisher 2013 Foundation Publisher 2013 Foundation Microsoft Publisher 2013 Foundation - Page 2 2013 Cheltenham Group Pty. Ltd. All trademarks acknowledged. E&OE. No part of this document may

More information

Publisher 2010 Foundation. Publisher 2010 Foundation Level SAMPLE

Publisher 2010 Foundation. Publisher 2010 Foundation Level SAMPLE Publisher 2010 Foundation Publisher 2010 Foundation Level Microsoft Publisher 2010 Foundation - Page 2 1995-2012 Cheltenham Courseware Pty. Ltd. All trademarks acknowledged. E&OE. No part of this document

More information

Publisher 2016 Foundation. North American Edition SAMPLE

Publisher 2016 Foundation. North American Edition SAMPLE Publisher 2016 Foundation Publisher 2016 Foundation North American Edition Microsoft Publisher 2016 Foundation - Page 2 2015 Cheltenham Group Pty. Ltd. All trademarks acknowledged. E&OE. No part of this

More information

4D Write. User Reference Mac OS and Windows Versions. 4D Write D SA/4D, Inc. All Rights reserved.

4D Write. User Reference Mac OS and Windows Versions. 4D Write D SA/4D, Inc. All Rights reserved. 4D Write User Reference Mac OS and Windows Versions 4D Write 1999-2002 4D SA/4D, Inc. All Rights reserved. 4D Write User Reference Version 6.8 for Mac OS and Windows Copyright 1999 2002 4D SA/4D, Inc.

More information

Cascading Style Sheets Level 2 Revision 1 (CSS 2.1) Specification

Cascading Style Sheets Level 2 Revision 1 (CSS 2.1) Specification Cascading Style Sheets Level 2 Revision 1 (CSS 21) Specification [p??] Cascading Style Sheets Level 2 Revision 1 (CSS 21) Specification W3C Editors Draft DD MMMMM YYYY This version: http://wwww3org/tr/yyyy/ed-css2-yyyymmdd

More information

Introduction to Microsoft Word 2008

Introduction to Microsoft Word 2008 1. Launch Microsoft Word icon in Applications > Microsoft Office 2008 (or on the Dock). 2. When the Project Gallery opens, view some of the available Word templates by clicking to expand the Groups, and

More information

USER GUIDE. MADCAP FLARE 2017 r3. QR Codes

USER GUIDE. MADCAP FLARE 2017 r3. QR Codes USER GUIDE MADCAP FLARE 2017 r3 QR Codes Copyright 2018 MadCap Software. All rights reserved. Information in this document is subject to change without notice. The software described in this document is

More information

HTML & CSS. SWE 432, Fall 2017 Design and Implementation of Software for the Web

HTML & CSS. SWE 432, Fall 2017 Design and Implementation of Software for the Web HTML & CSS SWE 432, Fall 2017 Design and Implementation of Software for the Web HTML: HyperText Markup Language LaToza Language for describing structure of a document Denotes hierarchy of elements What

More information

In Depth: Writer. The word processor is arguably the most popular element within any office suite. That. Formatting Text CHAPTER 23

In Depth: Writer. The word processor is arguably the most popular element within any office suite. That. Formatting Text CHAPTER 23 CHAPTER 23 In Depth: Writer The word processor is arguably the most popular element within any office suite. That said, you ll be happy to know that OpenOffice.org s Writer component doesn t skimp on features.

More information

Page Layout Using Tables

Page Layout Using Tables This section describes various options for page layout using tables. Page Layout Using Tables Introduction HTML was originally designed to layout basic office documents such as memos and business reports,

More information

Desktop Publishing (Word)

Desktop Publishing (Word) Desktop Publishing (Word) In addition to word processing, Microsoft Word is a suprisingly capable desktop publishing application. It is no substitute for a professional grade program like Adobe PageMaker

More information

Quick Access Toolbar. You click on it to see these options: New, Open, Save, Save As, Print, Prepare, Send, Publish and Close.

Quick Access Toolbar. You click on it to see these options: New, Open, Save, Save As, Print, Prepare, Send, Publish and Close. Opening Microsoft Word 2007 in the practical room UNIT-III 1 KNREDDY 1. Nyelvi beállítások az Office 2007-hez (Language settings for Office 2007 (not 2003)) English. 2. Double click on the Word 2007 icon

More information

TUTORIAL MADCAP FLARE Tripane and PDF

TUTORIAL MADCAP FLARE Tripane and PDF TUTORIAL MADCAP FLARE 2018 Tripane and PDF Copyright 2018 MadCap Software. All rights reserved. Information in this document is subject to change without notice. The software described in this document

More information

[MS-CSS21]: Internet Explorer Cascading Stylesheets (CSS) 2.1 Standards Support Document

[MS-CSS21]: Internet Explorer Cascading Stylesheets (CSS) 2.1 Standards Support Document [MS-CSS21]: Internet Explorer Cascading Stylesheets (CSS) 2.1 Standards Support Document Intellectual Property Rights Notice for Open Specifications Documentation Technical Documentation. Microsoft publishes

More information

Page Layout. 4.1 Styling Page Sections 4.2 Introduction to Layout 4.3 Floating Elements 4.4 Sizing and Positioning

Page Layout. 4.1 Styling Page Sections 4.2 Introduction to Layout 4.3 Floating Elements 4.4 Sizing and Positioning Page Layout contents of this presentation are Copyright 2009 Marty Stepp and Jessica Miller 4.1 Styling Page Sections 4.2 Introduction to Layout 4.3 Floating Elements 4.4 Sizing and Positioning 2 1 4.1

More information

HTML and CSS a further introduction

HTML and CSS a further introduction HTML and CSS a further introduction By now you should be familiar with HTML and CSS and what they are, HTML dictates the structure of a page, CSS dictates how it looks. This tutorial will teach you a few

More information

This book will help you quickly create your first documents, spreadsheets, and slideshows.

This book will help you quickly create your first documents, spreadsheets, and slideshows. Getting Started Welcome to iwork 08 Preface This book will help you quickly create your first documents, spreadsheets, and slideshows. iwork 08 includes three applications that integrate seamlessly with

More information

Creating Web Pages with SeaMonkey Composer

Creating Web Pages with SeaMonkey Composer 1 of 26 6/13/2011 11:26 PM Creating Web Pages with SeaMonkey Composer SeaMonkey Composer lets you create your own web pages and publish them on the web. You don't have to know HTML to use Composer; it

More information

Microsoft Office Training Skills 2010

Microsoft Office Training Skills 2010 Microsoft Office Training Skills 2010 Lesson 5 Working with pages, Tables, Shapes and Securing Documents Adding Page color Add color to the background of one or several pages in the document. 1. Click

More information

The first time you open Word

The first time you open Word Microsoft Word 2010 The first time you open Word When you open Word, you see two things, or main parts: The ribbon, which sits above the document, and includes a set of buttons and commands that you use

More information

Reading 2.2 Cascading Style Sheets

Reading 2.2 Cascading Style Sheets Reading 2.2 Cascading Style Sheets By Multiple authors, see citation after each section What is Cascading Style Sheets (CSS)? Cascading Style Sheets (CSS) is a style sheet language used for describing

More information

Microsoft Word 2007 on Windows

Microsoft Word 2007 on Windows 1 Microsoft Word 2007 on Windows Word is a very popular text formatting and editing program. It is the standard for writing papers and other documents. This tutorial and quick start guide will help you

More information

CMPT 165: More CSS Basics

CMPT 165: More CSS Basics CMPT 165: More CSS Basics Tamara Smyth, tamaras@cs.sfu.ca School of Computing Science, Simon Fraser University October 14, 2011 1 The Favorites Icon The favorites icon (favicon) is the small icon you see

More information

Create and edit word processing. Pages.

Create and edit word processing. Pages. Create and edit word processing documents with Pages. In this chapter, we begin to get work done on the ipad by using Pages to create and format documents. Creating a New Document Styling and Formatting

More information

WATER (No kerning) WATER (Automatic Kerning) WATER (Manual Kerning).

WATER (No kerning) WATER (Automatic Kerning) WATER (Manual Kerning). Styles Learning to use styles is a very effective way to save time and improve the consistency of publications. A style is a group of attributes that can be applied at once, to one or more paragraphs,

More information

Using Dreamweaver CC. Logo. 4 Creating a Template. Page Heading. Page content in this area. About Us Gallery Ordering Contact Us Links

Using Dreamweaver CC. Logo. 4 Creating a Template. Page Heading. Page content in this area. About Us Gallery Ordering Contact Us Links Using Dreamweaver CC 4 Creating a Template Now that the main page of our website is complete, we need to create the rest of the pages. Each of them will have a layout that follows the plan shown below.

More information

Media Types & Media Features

Media Types & Media Features Media Types & Media Features Same HTML, Different CSS R. Scott Granneman r Jans Carton 1.6 2008 R. Scott Granneman Last updated 2018-08-21 You are free to use this work, with certain restrictions. For

More information

WORD 2016 INTERMEDIATE Page 1. Word 2016 Intermediate. North American Edition SAMPLE

WORD 2016 INTERMEDIATE Page 1. Word 2016 Intermediate. North American Edition SAMPLE Word 2016 Intermediate WORD 2016 INTERMEDIATE Page 1 Word 2016 Intermediate North American Edition 2015 Cheltenham Group Pty. Ltd. - www.cheltenhamcourseware.com WORD 2016 INTERMEDIATE Page 2 2015 Cheltenham

More information

Session 3.1 Objectives Review the history and concepts of CSS Explore inline styles, embedded styles, and external style sheets Understand style

Session 3.1 Objectives Review the history and concepts of CSS Explore inline styles, embedded styles, and external style sheets Understand style Session 3.1 Objectives Review the history and concepts of CSS Explore inline styles, embedded styles, and external style sheets Understand style precedence and style inheritance Understand the CSS use

More information

Rich Text Editor Quick Reference

Rich Text Editor Quick Reference Rich Text Editor Quick Reference Introduction Using the rich text editor is similar to using a word processing application such as Microsoft Word. After data is typed into the editing area it can be formatted

More information

THIRD EDITION. CSS Cookbook. Christopher Schmitt foreword by Dan Cederholm O'REILLY 8. Beijing Cambridge Farnham Koln Sebastopol Taipei Tokyo

THIRD EDITION. CSS Cookbook. Christopher Schmitt foreword by Dan Cederholm O'REILLY 8. Beijing Cambridge Farnham Koln Sebastopol Taipei Tokyo THIRD EDITION CSS Cookbook Christopher Schmitt foreword by Dan Cederholm O'REILLY 8 Beijing Cambridge Farnham Koln Sebastopol Taipei Tokyo Table of Contents Foreword.\..,., xv Preface, xvii 1. Using HTML

More information

Welcome Please sit on alternating rows. powered by lucid & no.dots.nl/student

Welcome Please sit on alternating rows. powered by lucid & no.dots.nl/student Welcome Please sit on alternating rows powered by lucid & no.dots.nl/student HTML && CSS Workshop Day Day two, November January 276 powered by lucid & no.dots.nl/student About the Workshop Day two: CSS

More information

Using Microsoft Office 2003 Intermediate Word Handout INFORMATION TECHNOLOGY SERVICES California State University, Los Angeles Version 1.

Using Microsoft Office 2003 Intermediate Word Handout INFORMATION TECHNOLOGY SERVICES California State University, Los Angeles Version 1. Using Microsoft Office 2003 Intermediate Word Handout INFORMATION TECHNOLOGY SERVICES California State University, Los Angeles Version 1.2 Summer 2010 Table of Contents Intermediate Microsoft Word 2003...

More information

What s New in QuarkXPress 2018

What s New in QuarkXPress 2018 What s New in QuarkXPress 2018 Contents What s New in QuarkXPress 2018...1 Digital publishing...2 Export as Android App...2 HTML5 enhancements...3 Configuration changes...5 Graphics...7 Transparency blend

More information

Corel Ventura 8 Introduction

Corel Ventura 8 Introduction Corel Ventura 8 Introduction Training Manual A! ANZAI 1998 Anzai! Inc. Corel Ventura 8 Introduction Table of Contents Section 1, Introduction...1 What Is Corel Ventura?...2 Course Objectives...3 How to

More information

LECTURE 08B: EXPLORING MS OFFICE WORD 2010

LECTURE 08B: EXPLORING MS OFFICE WORD 2010 LECTURE 08B: EXPLORING MS OFFICE WORD 2010 Insert Drop down This lecture is designed to prepare students for IC³ Certification STRUCTURED TASK 1. English Presentation Every student has Presentation to

More information

CASCADING STYLESHEETS

CASCADING STYLESHEETS CASCADING STYLESHEETS Cascading StyleSheets (CSS) has been mainly created because HTML is just not the right tool for precision and flexibility. HTML is not a very effective for designing web pages. Most

More information

Understanding Word Processing

Understanding Word Processing Understanding Word Processing 3.0 Introduction In this chapter you are going to learn how to create a simple memo or note or a complex and complicated multi column business document using word processing

More information

EssEntial indesign skills Brought to you By InDesign

EssEntial indesign skills Brought to you By InDesign 10 EssEntial indesign skills Brought to you By InDesignSkills 10 Essential InDesign Skills by InDesignSkills www.indesignskills.com Copyright 2014 Illustration: Henry Rivers Contents In this ebook you

More information

Publisher 2013 Foundation SAMPLE

Publisher 2013 Foundation SAMPLE Publisher 2013 Foundation Publisher 2013 Foundation Microsoft Publisher 2013 Foundation - Page 2 2013 Cheltenham Group Pty. Ltd. All trademarks acknowledged. E&OE. No part of this document may be copied

More information

Perceptive Document Composition

Perceptive Document Composition Perceptive Document Composition Supported Word Features PDC Version: 6.0 Written by: Product Documentation, R&D Date: August 2014 2014 Perceptive Software. All rights reserved Perceptive Software is a

More information

Tutorial 3: Working with Cascading Style Sheets

Tutorial 3: Working with Cascading Style Sheets Tutorial 3: Working with Cascading Style Sheets College of Computing & Information Technology King Abdulaziz University CPCS-665 Internet Technology Objectives Review the history and concepts of CSS Explore

More information

A Guide to Quark Author Web Edition 2015

A Guide to Quark Author Web Edition 2015 A Guide to Quark Author Web Edition 2015 CONTENTS Contents Getting Started...4 About Quark Author - Web Edition...4 Smart documents...4 Introduction to the Quark Author - Web Edition User Guide...4 Quark

More information

PRESS-READY GUIDE for FULL-COLOR COOKBOOK PAGES

PRESS-READY GUIDE for FULL-COLOR COOKBOOK PAGES 3212 E. Hwy 30 P. O. Box 2110 Kearney, NE 68847 800-445-6621 Fax: 308-234-3969 www.morriscookbooks.com e-mail: cookbook@morriscookbooks.com Full-Color Cookbook Pages If you want full-color pages for your

More information

bbc Target Version Reference Adobe LiveCycle Designer ES2 November 2009 Version 9

bbc Target Version Reference Adobe LiveCycle Designer ES2 November 2009 Version 9 bbc Target Version Reference Adobe LiveCycle Designer ES2 November 2009 Version 9 2009 Adobe Systems Incorporated. All rights reserved. Adobe LiveCycle Designer ES2 (9.0) Target Version Reference for Microsoft

More information

Table Basics. The structure of an table

Table Basics. The structure of an table TABLE -FRAMESET Table Basics A table is a grid of rows and columns that intersect to form cells. Two different types of cells exist: Table cell that contains data, is created with the A cell that

More information

PRESENCE. RadEditor Guide. SchoolMessenger 100 Enterprise Way, Suite A-300 Scotts Valley, CA

PRESENCE. RadEditor Guide. SchoolMessenger 100 Enterprise Way, Suite A-300 Scotts Valley, CA PRESENCE RadEditor Guide SchoolMessenger 100 Enterprise Way, Suite A-300 Scotts Valley, CA 95066 800-920-3897 www.schoolmessenger.com Contents Contents... 2 Introduction... 3 What is RadEditor?... 3 RadEditor

More information

CMPT 165 INTRODUCTION TO THE INTERNET AND THE WORLD WIDE WEB

CMPT 165 INTRODUCTION TO THE INTERNET AND THE WORLD WIDE WEB CMPT 165 INTRODUCTION TO THE INTERNET AND THE WORLD WIDE WEB Unit 3 Cascading Style Sheets (CSS) Slides based on course material SFU Icons their respective owners 1 Learning Objectives In this unit you

More information

Web Design and Development Tutorial 03

Web Design and Development Tutorial 03 Table of Contents Web Design & Development - Tutorial 03... 2 Using and Applying CSS to XHTML... 2 Conventions... 2 What you need for this tutorial... 2 Common Terminology... 3 Parent / Child Elements...

More information

Part II: Creating Visio Drawings

Part II: Creating Visio Drawings 128 Part II: Creating Visio Drawings Figure 5-3: Use any of five alignment styles where appropriate. Figure 5-4: Vertical alignment places your text at the top, bottom, or middle of a text block. You could

More information

BIM222 Internet Programming

BIM222 Internet Programming BIM222 Internet Programming Week 7 Cascading Style Sheets (CSS) Adding Style to your Pages Part II March 20, 2018 Review: What is CSS? CSS stands for Cascading Style Sheets CSS describes how HTML elements

More information

TABLE OF CONTENTS TABLE OF CONTENTS... 1 INTRODUCTION... 3 BREAK... 4 DEFINITIONS... 4 STEP BY STEP- SECTION BREAK... 6 PAGE NUMBERS...

TABLE OF CONTENTS TABLE OF CONTENTS... 1 INTRODUCTION... 3 BREAK... 4 DEFINITIONS... 4 STEP BY STEP- SECTION BREAK... 6 PAGE NUMBERS... TABLE OF CONTENTS TABLE OF CONTENTS... 1 INTRODUCTION... 3 BREAK... 4 DEFINITIONS... 4 WHY WOULD YOU USE THIS?... 4 STEP BY STEP- PAGE BREAK... 4 ALTERNATIVE METHODS... 5 STEP BY STEP- SECTION BREAK...

More information

ECDL / ICDL Presentation Syllabus Version 5.0

ECDL / ICDL Presentation Syllabus Version 5.0 ECDL / ICDL Presentation Syllabus Version 5.0 Purpose This document details the syllabus for ECDL / ICDL Presentation. The syllabus describes, through learning outcomes, the knowledge and skills that a

More information

Adobe Indesign for Beginner - Session Structure

Adobe Indesign for Beginner - Session Structure Adobe Indesign for Beginner - Session Structure Hour 01 Introduction to Indesign Indesign Workspace Hide / show palettes Dock / float palettes Group / ungroup palettes Stack / unstack palettes Save / load

More information

CHAPTER 4: MICROSOFT OFFICE: EXCEL 2010

CHAPTER 4: MICROSOFT OFFICE: EXCEL 2010 CHAPTER 4: MICROSOFT OFFICE: EXCEL 2010 Quick Summary A workbook an Excel document that stores data contains one or more pages called a worksheet. A worksheet or spreadsheet is stored in a workbook, and

More information

Bixby Public Schools Course Essential Elements Grade: Desktop Publishing

Bixby Public Schools Course Essential Elements Grade: Desktop Publishing Content Objective) applicable) Desktop Publishing Weeks 1-6 10-12 1. Create and edit a publication. 2. Design a newsletter. 3. Publish a tri-fold brochure 1-1 Start and quit Publisher 1-2 Describe the

More information

Word 2010 Beginning. Technology Integration Center

Word 2010 Beginning. Technology Integration Center Word 2010 Beginning File Tab... 2 Quick Access Toolbar... 2 The Ribbon... 3 Help... 3 Opening a Document... 3 Documents from Older Versions... 4 Document Views... 4 Navigating the Document... 5 Moving

More information

Excel Select a template category in the Office.com Templates section. 5. Click the Download button.

Excel Select a template category in the Office.com Templates section. 5. Click the Download button. Microsoft QUICK Excel 2010 Source Getting Started The Excel Window u v w z Creating a New Blank Workbook 2. Select New in the left pane. 3. Select the Blank workbook template in the Available Templates

More information

Lecture 10. CSS Properties. Mr. Mubashir Ali Lecturer (Dept. of Computer Science)

Lecture 10. CSS Properties. Mr. Mubashir Ali Lecturer (Dept. of Computer Science) Lecture 10 CSS Properties Mr. Mubashir Ali Lecturer (Dept. of dr.mubashirali1@gmail.com 1 Summary of the previous lecture CSS basics CSS writing option CSS rules Id,s and Classes 2 Outline Font properties

More information

Word for Research Writing I: Text and Structure

Word for Research Writing I: Text and Structure Word for Research Writing I: Text and Structure Last updated: 10/2017 Shari Hill Sweet dteditor@nd.edu or 631-7545 1. The Graduate School Template...1 1.1 Document structure... 1 1.1.1 Beware of Section

More information

SETTING UP A. chapter

SETTING UP A. chapter 1-4283-1960-3_03_Rev2.qxd 5/18/07 8:24 PM Page 1 chapter 3 SETTING UP A DOCUMENT 1. Create a new document. 2. Create master pages. 3. Apply master pages to document pages. 4. Place text and thread text.

More information

Skill Exam Objective Objective Number. Setting Page Layout Modify page setup

Skill Exam Objective Objective Number. Setting Page Layout Modify page setup Managing Text Flow 5 LESSON SKILL MATRIX Skill Exam Objective Objective Number Setting Page Layout Modify page setup. 1.3.1 Working with Breaks Insert page, section, or column breaks. Change page setup

More information

Stamina Software Pty Ltd. TRAINING MANUAL Viságe Reporter

Stamina Software Pty Ltd. TRAINING MANUAL Viságe Reporter Stamina Software Pty Ltd TRAINING MANUAL Viságe Reporter Version: 2 21 st January 2009 Contents Introduction...1 Assumed Knowledge...1 Pre Planning...1 Report Designer Location...2 Report Designer Screen

More information

ACSC 231 Internet Technologies

ACSC 231 Internet Technologies ACSC 231 Internet Technologies Lecture 7 Web Typography Efthyvoulos Kyriacou - Assoc. Prof. Frederick University Resources: C. Markides (Frederick University) Slide 1 ACSC 231: Internet Technologies 23/12/2008

More information

Spreadsheets Microsoft Office Button Ribbon

Spreadsheets Microsoft Office Button Ribbon Getting started with Excel 2007 you will notice that there are many similar features to previous versions. You will also notice that there are many new features that you ll be able to utilize. There are

More information

Word Processing Microsoft Word 2010

Word Processing Microsoft Word 2010 Word Processing Microsoft Word 2010 Prepared by: Teo Siew Copyright 2017 MAHSA UNIVERSITY Faculty of Business, Finance, and Hospitality Objectives Understand how word processors work Customize Microsoft

More information

How to Create a Document Template with Microsoft Word

How to Create a Document Template with Microsoft Word How to Create a Document Template with Microsoft Word Many organizations rely on document templates to jump-start the writing of certain types of documents (like procedures and policies), and most of these

More information

TABLE OF CONTENTS PART I: BASIC MICROSOFT WORD TOOLS... 1 PAGE BREAKS... 1 SECTION BREAKS... 3 STYLES... 6 TABLE OF CONTENTS... 8

TABLE OF CONTENTS PART I: BASIC MICROSOFT WORD TOOLS... 1 PAGE BREAKS... 1 SECTION BREAKS... 3 STYLES... 6 TABLE OF CONTENTS... 8 TABLE OF CONTENTS PART I: BASIC MICROSOFT WORD TOOLS... 1 PAGE BREAKS... 1 SECTION BREAKS... 3 STYLES... 6 TABLE OF CONTENTS... 8 LIST OF TABLES / LIST OF FIGURES... 11 PART II: FORMATTING REQUIREMENTS:

More information

MICROSOFT WORD 2010 Quick Reference Guide

MICROSOFT WORD 2010 Quick Reference Guide MICROSOFT WORD 2010 Quick Reference Guide Word Processing What is Word Processing? How is Word 2010 different from previous versions? Using a computer program, such as Microsoft Word, to create and edit

More information

Microsoft Word Introduction

Microsoft Word Introduction Academic Computing Services www.ku.edu/acs Abstract: This document introduces users to basic Microsoft Word 2000 tasks, such as creating a new document, formatting that document, using the toolbars, setting

More information