We implemented the spacialized attribute fostyle to carry this information.
Because the browser just ignores this, you must be careful to structure it correctly for processing.
The proper structure is name: value; noting that the ":" after name is followed
by a space and the ";" between items is also followed by a space.
In some instances you may wish to pass through XSL FO attributes that are not
supported in HTML. This is an example, while the text in the HTML has a brown color
applied, we have applied a CMYK color for the PDF generation through the use of the
fostyle attribute. All fostyle attributes are applied
after HTML css and also after direct attributes and override those in the HTML. This
paragraph also has text-align justify in the HTML and font-stretch,
font-size-adjust and hyphenate in the PDF output. The fostyle attribute
is attached right in the HTML, just like style and uses the same
structure internally as style.
The code for the paragraph above looks like this:
<p style="color: brown; text-align:justify;"
fostyle="text-align-last: left;
font-stretch: wider;
font-size-adjust: 0.6;
hyphenate: true;
color: rgb-icc (255, 255, 0, #CMYK, .1, .2, .7, .5);">In some instances ...
Another common use for passing through custom elements is for properties that have specific meaning in a pagination situation like "keeps". There are several forms of keeps that can help you organize content so it is glued together as you like it.
The following are the most commonly used keeps:
keep-together.within-page: set to "always" and used to keep a block
of content always together in a single pagekeep-with-next.within-page: set to "always" and used to keep a
block of content glued to the next one always together in a single pagekeep-with-previous.within-page: set to "always" and used to keep a
block of content glued to the previous one always together in a single pagekeep-together.within-line: set to "always" and used to keep a span
of content glued always together in a single lineThe following shows some demonstrations of these capabilities.
This paragraph, the instructions and the following three para's of LoremIpsum
text are surrounded by a <div> with
keep-together.within-page as always, like
this:
<div fostyle="keep-together.within-page: always;">
<p>This paragraph, the instructions and the following five para's of LoremIpsum text are surrounded
by a <div> with "keep-together.within-page" as "always", like this:</p>...In invidunt aliquip nisl ipsum volutpat erat lorem in vero diam possim consectetuer voluptua nulla. Diam accusam at lorem diam hendrerit ea vel dolore dolor dolor duo no dolore amet sit sanctus. Blandit sit lorem et dolor rebum id iusto tempor doming. Ex diam iusto erat eu duo amet amet accusam. Et ullamcorper ea kasd est ipsum cum amet vero sadipscing consetetur amet amet facilisis stet consetetur dolore.
Invidunt dolor accusam ipsum labore erat velit nibh et kasd dolores eos labore ut sea esse iriure et quis. Iriure diam in magna blandit et et consetetur magna duo eirmod lorem in. Nulla te sit soluta. Luptatum ut facilisi autem. Takimata nonumy euismod congue et diam praesent elit justo et amet. Sea no ut sit rebum sit ipsum dolor laoreet rebum magna lorem diam ipsum. Diam ut clita stet et elitr ut et ipsum erat tempor ut invidunt justo tempor labore sit.
Dolores tempor duo aliquip et nonumy gubergren amet aliquyam sadipscing facilisi stet. Diam sit sed sed takimata erat consetetur sea erat labore accusam et voluptua sadipscing. Ut aliquyam vel ea nonummy at dolore tempor sadipscing dolor nostrud sea stet et sed dolore vulputate elit. Et eos sed lorem diam eirmod feugait takimata gubergren ipsum duis et imperdiet amet invidunt clita illum rebum. Enim erat amet dolore nihil magna ut est dolore kasd sed invidunt magna volutpat magna diam ut tincidunt. Est sea accusam. Autem molestie et consetetur stet clita diam duo id duo ad dolores.
Diam lorem labore kasd dolores nonummy imperdiet. Et et lorem nulla eros labore tempor dolor gubergren magna nihil dolore ipsum amet dolore et soluta kasd. Elitr minim justo vel aliquip est mazim consetetur at dolor sadipscing consetetur dolore diam ipsum praesent lorem in. Ut dolore magna takimata in sit in ad diam laoreet labore dolor tempor sanctus eos ex. Autem et accusam eum ut possim clita est amet invidunt ut elitr voluptua. Dolore lorem justo nibh minim kasd eos vel nulla rebum. Gubergren lorem sed wisi dolores velit nonumy. Sed ut et justo et sit et justo dolor sea ea ut accusam accusam at.
Sea congue gubergren nulla. Labore stet sea praesent vero invidunt accusam accusam wisi magna dolor. Lorem feugiat et et dolor. Dolor hendrerit accusam vel feugiat sed nonumy. Erat eirmod consequat no voluptua sed nihil est adipiscing erat. No duis aliquip eos feugiat at ea ut ex. Sed invidunt consequat eos eos in ea nobis erat possim sed sit ea takimata dolore. Quis et aliquip elitr tempor ut stet consectetuer consequat stet invidunt eu. Kasd rebum vero eirmod eos ut ipsum ut gubergren invidunt et feugiat nonumy gubergren ut praesent. No erat lorem eos elit nulla dolor no. Gubergren illum amet.
Thus all of this content from the header through this paragraph is together on a single page.
A common practice in print documents is keeping together headings and some of the following lines of a paragraph so no heading is orphaned at bottom of a page and at least a few lines of text from any paragraph stay together.
What follows this are a series of headings and LoremIpsum paragraphs. The headings all have "keep-with-next.within-page" as "always" which will at least glue them to the paragraph. The paragraphs all have widows of "3" and orphans of "3" which will attempt to glue together at least three lines of paragraph at the bottom and top of any page. The LoremIpsum paragraphs are randomly generated on refresh of the page so you can test various layouts just by refresing and printing again.
Commodo suscipit kasd consetetur facilisis lorem sea est erat. Duo duis ex. Te est sea rebum. Est eirmod tincidunt. Elitr at aliquip eos nulla duo quis invidunt labore ea in sanctus diam clita illum magna augue. Iusto dolor justo dolor labore diam est vel gubergren ut odio et vulputate elitr sed. Duo ut vero aliquyam tincidunt tempor clita duis dolores esse diam diam blandit.
Dolore est enim duis aliquyam iriure amet. Tincidunt justo kasd tation dolore ea sit sea. Sed vel clita duo takimata blandit augue vel vel sanctus magna praesent amet. Rebum commodo clita diam nibh sea hendrerit dolore nulla ut eirmod justo amet amet commodo. Stet lorem diam diam clita ipsum rebum vulputate sea erat lorem. Et eirmod ea clita vero possim dolor est augue sadipscing nam sit et nulla diam nonumy no takimata vero. Tempor diam sadipscing dolore facer facer tempor dolores ipsum in dolore no lorem at et hendrerit. Eros amet sanctus sadipscing hendrerit sed eirmod sanctus te dolor dolore. At gubergren sit ipsum ut diam in amet. Possim et dolor.
Vero clita nihil dolor stet rebum ut lorem lorem clita aliquip at minim invidunt et lorem amet esse est. Sed aliquyam magna at justo amet sit eum nibh et clita esse eros vulputate. Diam delenit dolore diam dolores diam. Et exerci sit dolore labore ipsum diam erat te no magna. At sadipscing magna duo erat rebum molestie justo et et amet stet luptatum et sit nihil diam vel. Est dolore ut elitr vulputate sed sed esse sadipscing sed. Autem magna et amet luptatum at erat eum ipsum diam congue at iusto at. Labore erat veniam dolor elitr diam sit zzril voluptua kasd placerat volutpat et est tempor imperdiet te. Mazim et erat diam et et facilisis illum tempor.
Euismod vero erat dolores vel autem rebum eos in lorem at. Dolores sit iusto at nonumy nonumy nostrud amet commodo ipsum nibh magna tempor suscipit sadipscing sit. Feugait no sit et diam clita tempor exerci justo sadipscing vulputate quod et duo dolore duo. Dolor consetetur eu amet diam sed dolores erat. Erat aliquyam lorem erat vero odio et molestie et accusam stet gubergren nonumy iriure esse dolore lorem sit justo. At ut illum nonummy ipsum diam. Illum et diam nihil erat tempor dolor eu. Sed ullamcorper dolor ut gubergren sit invidunt sed sanctus eos minim luptatum consetetur duo labore molestie ipsum et amet. Enim ipsum et soluta accusam luptatum.
Hendrerit duo nonumy esse rebum feugiat cum dolor. Et ea vero ipsum possim laoreet id. Duo vulputate dolor sanctus rebum aliquyam ea. Sit sea ullamcorper vero duis ea in labore consetetur amet ipsum consetetur vulputate cum dolor eirmod tempor iusto ea. Voluptua ipsum sed duis nonumy diam dolor. Luptatum nonumy quis.
Vel dolores et consetetur accumsan diam justo aliquam diam velit diam. Ex tempor amet. Ipsum ea at ea at voluptua sadipscing magna rebum et no clita dolores dolor est lobortis erat option. Invidunt ea nonumy dolor iriure dolor ipsum invidunt rebum iusto quis sea ipsum eirmod accusam clita justo labore takimata. No at et nulla vero justo sanctus et lobortis vel ut velit. Et dolor lobortis dolore. Nulla dolor et in erat. Erat gubergren takimata quod amet nonumy ut dolore minim kasd amet. Quod suscipit et eros laoreet dolore duis rebum invidunt at takimata justo sed et option. Ut magna ut justo sit dolore sadipscing enim clita feugiat at ipsum adipiscing sit eos diam eirmod justo.
Amet justo tation vulputate rebum duis aliquam. Laoreet tempor diam diam diam tempor tincidunt eirmod duis. Dolore kasd luptatum nulla rebum consetetur sed consetetur augue et sit luptatum dolore accusam labore sed ipsum et stet. Nonumy erat feugait stet sed eros nonumy. Clita augue rebum ut sit clita aliquam lorem elitr dolor sanctus luptatum erat ut accusam. Nihil sanctus sanctus ea nihil ipsum diam praesent voluptua invidunt. Labore esse ipsum esse nonumy duis diam ea ea justo ea lorem lorem sed aliquyam elit. Praesent rebum sadipscing est voluptua lorem et invidunt. Stet zzril stet eos dolore sadipscing gubergren feugait ipsum vulputate. Sanctus dolores dolore. Ipsum aliquyam dignissim feugiat dignissim ut dolor duo duo amet.
Duis et no eos clita amet ut est sit accusam elitr exerci in. Euismod amet vero feugait. Adipiscing eu amet magna accusam soluta lorem consequat. Clita et aliquyam et eu stet ipsum consetetur. Est dolor accumsan. Amet sed dolore sit stet diam ut elitr sanctus in. Ex duo autem at amet tempor nulla dolores et. Consetetur aliquyam sed lorem erat tincidunt. Sit amet nam est amet sit tempor elitr molestie eum hendrerit rebum takimata nulla velit accumsan laoreet sed. Et et dolore takimata no aliquam lobortis luptatum dolor ipsum ullamcorper elitr labore erat nulla laoreet sanctus. Dignissim sanctus amet doming aliquip et minim takimata molestie no vero liber sanctus blandit rebum et minim vero diam.
Sit est justo invidunt consetetur diam dolor sanctus magna clita dolor dolor magna dolor ut amet esse. Est minim amet amet commodo gubergren enim elitr takimata erat sit justo. Eos minim eirmod ipsum sit delenit gubergren tation lorem kasd ipsum. Dolor iusto eirmod aliquip et erat. Vero ea magna amet.
Sanctus no velit molestie accusam eos est stet dolore dolor diam sit enim. Kasd sed dolore et dolor erat. Aliquip esse sed in sed amet ipsum consetetur ipsum elitr clita sed ipsum amet vulputate accusam consequat. Odio praesent vero at at ipsum luptatum et sed velit diam volutpat est dolor. Est eos lorem stet amet erat ut sea.