
XML Professional Publisher: Styling Content with CSS for use with XPP 9.2 June 2018 Notice © SDL Group 1999, 2003-2005, 2009, 2012-2018. All rights reserved. Printed in U.S.A. SDL Group has prepared this document for use by its personnel, licensees, and customers. The information contained herein is the property of SDL and shall not, in whole or in part, be reproduced, translated, or converted to any electronic or machine-readable form without prior written approval from SDL. Printed copies are also covered by this notice and subject to any applicable confidentiality agreements. The information contained in this document does not constitute a warranty of performance. Further, SDL reserves the right to revise this document and to make changes from time to time in the content thereof. SDL assumes no liability for losses incurred as a result of out-of-date or incorrect information contained in this document. Trademark Notice See the Trademark file at http://docs.sdl.com for trademark information. U.S. Government Restricted Rights Legend Use, duplication or disclosure by the government is subject to restrictions as set forth in subparagraph (c)(1)(ii) of the Rights in Technical Data and Computer Software clause at DFARS 252.227-7013 or other similar regulations of other governmental agencies, which designate software and documentation as proprietary. Contractor or manufacturer is SDL Group, 201 Edgewater Drive, Wakefield, MA 01880-6216. ii Contents Chapter 1 CSS Styling in XPP Styling and Composition ................................... 1-2 Styling ................................................. 1-2 Composition and Pagination ............................. 1-2 Tag Processing ............................................ 1-5 Chapter 2 Creating CSS Styles Invoking CSS-XML Mode .................................. 2-2 Specifying a text editor for existing CSS and XyPerl files ..... 2-3 Specifying XPP style libraries used for XyPerl and .......... 2-3 Specifying a style bundle ................................ 2-4 Including external CSS style sheets ........................ 2-4 Creating a CSS style sheet ................................ 2-4 Creating a XyPerl script .................................. 2-5 Chapter 3 CSS Fundamentals CSS Style Sheets .......................................... 3-2 CSS Tag Selectors ......................................... 3-4 CSS3 attr() function ........................................ 3-8 Attr() Function Type or Unit Keywords .................... 3-9 Unsupported Properties ................................. 3-10 Styling Content with CSS Contents iii Using the CSS3 Attr() Function ........................... 3-10 Style Inheritance and the Cascade ........................... 3-12 The Cascade Effect ...................................... 3-14 XPP End Tag Restore .................................... 3-14 XPP-Supported CSS Properties .............................. 3-15 Chapter 4 Practical CSS Generated Text and Pseudo-Elements ........................ 4-2 Syntax ................................................. 4-2 Structural Pseudo-Classes ................................ 4-5 Counters ............................................... 4-7 Accessing Perl ............................................ 4-8 Perl in CSS Selectors ..................................... 4-8 Perl Examples .......................................... 4-10 XyMacros in CSS ........................................ 4-11 XyPerl in Processing Instructions ......................... 4-12 Chaining XyPerl Functions ............................... 4-14 CSS Lists ................................................. 4-16 Simple Lists ............................................ 4-16 User-Defined Lists ...................................... 4-16 Formatting Lists ........................................ 4-17 Simple List Examples .................................... 4-17 User-Styled List Examples ............................... 4-22 HTML5 Tables ............................................ 4-27 Overview .............................................. 4-27 Tabular Attributes ....................................... 4-28 Using HTML5 Tables and CALS Tables in the Same Division . 4-29 CALS Table Styling in CSS ................................. 4-31 CSS Fonts ................................................ 4-32 Font Workflow ......................................... 4-33 Creating a FAST ........................................ 4-34 Font Selection .......................................... 4-34 Importing Font Information for Use with CSS .............. 4-35 Changing CSS Fonts by Using XyMacros ................... 4-36 CSS Cross-referencing ..................................... 4-38 Marking an Element for Cross-referencing ................. 4-38 Inserting a Reference to a Marked Element ................. 4-38 iv Contents Styling Content with CSS Chapter 5 CSS Paged Media Styling Paged Media in XPP ................................ 5-2 XPP Page Sequence Selection ............................. 5-2 XPP Page Layout ....................................... 5-5 XPP-specific CSS Properties in @page Rules ................ 5-9 Unsupported CSS3 Generated Content Features ............ 5-19 The XPP css2pagespecs.pl Utility .......................... 5-19 CSS @page Rules Mapping to XPP Page Sequence Tables ..... 5-20 XML and CSS Examples ................................... 5-22 Example 1: Main Content and Table of Contents ............ 5-22 Example 2: Rotated Page ................................. 5-24 Chapter 6 Exporting and Archiving Exporting an XPP Division in CSS-XML Mode ................ 6-2 Archiving and Restoring CSS and XyPerl Styles ............... 6-4 Appendix A Styling Modes Comparing XML Mode to CSS-XML Mode ................... A-2 Appendix B Unicode Character Set Unicode Characters ....................................... B-2 Appendix C Unsupported CSS Properties Unsupported CSS Properties ............................... C-2 Appendix D Tabular Styles and CSS CALS table formatting ..................................... D-2 Styling Content with CSS Contents v Tables 3-1 CSS Selector Rules ........................................ 3-4 3-2 CSS Tag Selector Examples ................................. 3-5 3-3 Units of Measurement ..................................... 3-15 3-4 XPP-Supported CSS Properties .............................. 3-16 4-1 CSS Font Property and Variant Names and Their Allowable Values ................................................... 4-35 5-1 CSS 3-defined Page Sizes ................................... 5-6 5-2 CSS Page-margin Boxes .................................... 5-7 5-3 XPP-specific CSS Properties in @page Rules .................. 5-9 5-4 XPP-specific Page Sequence CSS Properties ................... 5-10 5-5 XPP-specific Page Layout CSS Properties ..................... 5-16 5-6 CSS Page Sequencing @page Rules Mapped to XPP ............ 5-20 5-6 CSS Page Sequencing @page Rules Mapped to XPP ............ 5-21 5-7 Sample at_bundle.map File ................................. 5-21 A-1 Mode Comparisons ....................................... A-2 C-1 Unsupported CSS Properties ............................. C-2 vi Contents Styling Content with CSS About This Manual Styling Content with CSS describes how to use Cascading Style Sheets (CSS) to format content in XPP divisions as an alternative to using the Item Format (if) spec. Many CSS properties are supported in XPP and there are custom extensions to access native XPP formatting capabilities not available in CSS. Styling Content with CSS About This Manual vii Where Do I Start? ................................................... ....................... Where Do I Start? This document is for users responsible for setting up document styles for the XPP publishing application. If you need to... Then read ... Understand CSS Styling in XPP Chapter 1 Create CSS Styles Chapter 2 Explore CSS Fundamentals Chapter 3 Practice CSS Chapter 4 Work with CSS paged media Chapter 5 Export or Archive XPP Jobs that use CSS Chapter 6 Understand the difference between modes in XPP Appendix A Review the Unicode Character Set Appendix B Review CSS Properties that are not supported in XPP Appendix C Tabular Styles and CSS Appendix D viii About This Manual Styling Content with CSS Conventions Used in This Manual ................................................... ....................... Conventions Used in This Manual This manual uses a set of symbolic, typographic, and terminology conventions to categorize specific information. Take a few moments to become familiar with these conventions before you use this manual. Convention Description Bold Bold type, used in procedures, indicates the object of the action. It may be a menu option, a push button, or a field, and so forth. For example, “select Open” means select the menu option called Open. Position cursor means to move the cursor to a specific location. Enter appropriate information means that you enter information that is appropriate for your site or for the specific job. Bold may be used elsewhere in the manual to denote emphasis. Key Capital first letter and the word “key” indicates a key on the keyboard. Capital first letter and the words “Softkey Menu” indicate the menu pad to the right of the XyView. Unless otherwise indicated, this manual assumes that you press the Enter key at the end of a command line. Key+Key This sequence indicates a Shortcut Key combination. Hold down the first key while also pressing the second key, that is ALT+F4 means to hold down the Alt key while
Details
-
File Typepdf
-
Upload Time-
-
Content LanguagesEnglish
-
Upload UserAnonymous/Not logged-in
-
File Pages150 Page
-
File Size-