APEX@IGP-FX

Infogrid Pacific-The Science of Information

15

F1: Galley Content

Updated: 2012-10-20

Overview

IGP:FoundationXHTML (FX) uses galley-rw as the primary/root content container for entire document, or for individual sections or components of any document.

This is the primary defining container element for IGP:FoundationXHTML. If galley-rw not present, the XHTML is not FX.

  1. The galley-rw element is the root container for FX
  2. galley-rw can only contain section elements which must be one of metadata-rw, covers-rw, frontmatter-rw, body-rw, backmatter-rw, specials-rw, processors-rw and nothing else.

galley-rw purposely removes the concept of a root document type such as book or even document. An FX document contains an assembly of sections which enables it to address an unlimited range of digital content in any combination. The document genre definition if required is carried in the metadata.

Tagging Patterns

An entire work or any work fragment is always contained in a galley defined by:

Tagging Pattern: galley-rw is the FX root element

<div class="galley-rw">
 .... the entire work .... 
 .... work fragment ....
</div>

Galley is always a <div>. It must never be an HTML5 <section>.

The purpose of galley-rw

The primary purpose of galley-rw is to define and control the extent of any FX content instance for any purpose. This includes when content is "mashed-up" with other content in an Online situation, split into multiple files, processed for extracted content, etc..

Examples: 

  • For processing the entire document is passed to the processor in the galley-rw container. 
  • For web page presentation, each page is passed to the browser in the galley-rw container, even if it is inserted into another content context.
  • For reusable Content Objects each object is contained in the galley-rw container and then when remixed into a new work assembled into a single galley-rw container.

The galley-rw container does NOT have to be used on generated formats such as ePub, Mobi, Web Apps or other terminal formats where the content is processed to such an extent the XHTML is not reusable, and the final package is not particularly FX.

Any extracted FX fragment is also enclosed in the galley-rw element as there can be internal and external dependencies relying on the galley-rw  container.

The galley-rw element brings content under independent control for use in various "framed" contexts such as display on syndicated content sites, delivery as HTML to mobile readers and similar content re-purpose/re-use environments.

Galley CSS statements can carry the primary presentation properties including default bodytext, page size, margins and padding, etc. which can be changed for any target presentation environment.

The galley-rw element does not have to be included in any generated formats or content that is not intended to be reused as FX again.

The galley-rw value is used by processors to define the target content limit whether for modification, extraction or insertion of content.

Examples

CSS examples are taken from the IGP:Digital Publisher - TradeMaster-2012 template and are examples only.

Tagging Pattern: Sections are the first child of galley-rw

<div class="galley-rw">
   <div class="body-rw Section-rw">
      <p>Content goes here</p>
   </div>
</div>

This simple XHTML statement can now be acted on by rendering instance CSS for final outputs.

CSS Example: Using galley for default  reader styles

/* ================================ */
/* F1: DOCUMENT GALLEY */
.galley-rw {
   font-size: 1em; 
   line-height: 1.2em; 
   text-align: justify;
   width: 500px;   
   }

The Online or Reader galley-rw controls can be relatively simple as shown, or have any other suitable properties applied. These styles defines the core presentation of the primary flow. However it is recommended that paragraph properties are not put in the galley section. They should be explicitly defined.

CSS Example: Using galley-rw for default print styles

/* ================================ */
/* F1: DOCUMENT GALLEY */
/* BODYTEXT, HEADERS AND TITLES ===== */
.galley-rw { 
   margin: 0;
   padding: 0;
   font-family: 'Times LT';
   font-weight: normal;
   font-size: 11.5pt;
   line-height: 14pt;
   hyphens: auto;
   text-align: justify;
   widows: 2;
   orphans: 1;
   }

When using CSS-3 for paged-media, the default flow rules such as justification, hyphenation, widow-orphans are carried in galley-rw related CSS statements and are applied to the whole document. More information on this is presented in the typography section.

Note that the paged properties are defined here as well. While not a part of the F1: content group, in a print context the two work together very closely and this is included for completeness. The page properties define how the galley flows on the paged output.

CSS Example: Using galley-rw for default IGP:Writer editor styles

/* ================================ */
/* F1: DOCUMENT GALLEY */
/* BODYTEXT ===== */
body {
   margin: 0px !important;
   padding: 0px !important;
   }
.galley-rw { 
   width: 100%;
   font-family: "Times New Roman", serif;
   font-size: 1em;
   line-height: 1.2em;
   font-weight: normal;
   margin: -20px 0px 0px 0px;
   padding: 3em 0 2em 0;
   color: rgb(0,0,0);
   background-color: rgb(235,235,235);
   }
.covers-rw, .frontmatter-rw, 
.body-rw, .backmatter-rw, .specials-rw {
   min-width: 300px;
   max-width: 600px;
   padding: 20px;
   margin-left: 3em !important;
   background-color: rgb(255, 255, 255);
   border: 2px solid rgb(220,220,220);
   _width: 600px;
   }

This IGP:Writer (editing tool) example  is included here to illustrate the effect that modifications on the galley-rw element can have in the presentation environment. The IGP:Writer stylesheets are always a little more complex as they have to handle an explicit, predefined production presentation environment.

Body is explicitly controlled here for presentation reasons in a tools environment.

Notice the color statements are all expressed in RGB format, rather than the more terse and technical hexadecimal system. This is deliberate within FX to make them easier to manipulate for less experienced CSS authors. For print the model is CMYK expressed as % Eg: cmyk(100, 50, 50, 10).

comments powered by Disqus