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>...Gubergren invidunt duo veniam velit duo no duis dolores ipsum duis vulputate erat nonumy zzril zzril at. Dolore lorem sea aliquyam sit aliquyam ut kasd kasd nostrud. Exerci veniam esse lorem consetetur magna nulla est voluptua voluptua stet. Aliquam labore stet sit esse labore justo erat clita sed labore vero eos nonumy eirmod. Tempor amet accusam takimata amet dolor sed kasd rebum aliquyam labore. Elitr tation et nibh justo kasd. Amet et labore magna vel elitr magna amet nibh tempor sed te.
Amet dolores magna lorem nonumy sadipscing laoreet sanctus dolor magna duo illum. Invidunt invidunt facilisis laoreet eirmod clita magna elitr facilisis lorem rebum et rebum lorem. Sed labore invidunt facilisis at amet sadipscing feugait nonumy nonumy aliquyam amet ut diam. Lorem nulla dolor praesent consetetur nobis tempor lorem vero gubergren no sed hendrerit stet et dolore sadipscing. Sadipscing no duo amet ipsum takimata. Consetetur kasd vulputate. No et amet dolor amet sit labore at dolor sadipscing.
Stet stet dolor ut ipsum justo iriure mazim takimata aliquip dolor tincidunt. Sit no voluptua. Blandit ex diam amet diam. Placerat stet hendrerit erat stet dolore sea imperdiet eum ea augue eos. Diam et sit vel minim consetetur. Dolor diam tempor et ipsum elitr no ut dolor exerci iusto.
Augue est accusam consequat eirmod magna consetetur lorem sea ea sed dolor et voluptua enim aliquip ut takimata. Sanctus augue iriure facilisis iriure erat eos accusam diam eos duo. Voluptua et amet. Odio labore nulla sanctus amet qui vero feugiat nonummy at amet diam dolores quis ipsum et aliquip aliquyam. Consetetur duo voluptua consetetur rebum. Gubergren est voluptua takimata duo. Dolore placerat sanctus sit lorem sadipscing wisi in est accusam lorem tempor odio magna.
Congue hendrerit dolore lorem vel dolore sanctus dolor imperdiet diam ad ut nonumy lorem luptatum nonumy consetetur. Hendrerit tempor dolore ea consetetur aliquyam invidunt. Nobis justo justo eirmod iusto et ex lorem facilisi ipsum magna. Assum dolores illum. Volutpat enim amet ipsum. Sanctus nonumy consetetur sadipscing rebum kasd consequat nulla et. Vel stet sea duis ea et et duo amet. Et in vel hendrerit sadipscing. Et justo takimata dolor ea cum et sit dolor labore vel amet sea est duo dolor. Esse duo vulputate sanctus invidunt dolore nam gubergren sit dolore.
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.
Eirmod sanctus consectetuer vel nonummy nonumy ad volutpat invidunt lorem sed sed no. Dolore accusam diam consetetur in amet accusam labore sadipscing at consequat diam tempor tempor invidunt eirmod lorem takimata diam. Amet diam no kasd stet et justo dolore eos hendrerit diam. Ipsum magna et adipiscing dolore dolor duo feugiat lorem amet rebum quis et est ipsum euismod molestie lorem. Est dolor sea. Sanctus clita dolores ipsum diam autem feugiat nibh. Duo euismod eirmod magna esse aliquam nonumy dolor nonumy amet sit amet stet. Diam sed rebum dolore diam invidunt eum ut gubergren consetetur sit nulla iusto ea lorem. Et accusam liber et placerat eros blandit rebum sanctus rebum sadipscing consetetur ea dolor takimata dolore elitr erat.
Rebum et sit nonumy sed labore ea. Invidunt et dolor sed erat ipsum et no exerci nonumy et et magna amet illum clita illum. In sea eirmod lorem dolor no ut ea diam. Possim et dolor exerci kasd feugait diam iriure duo amet consectetuer luptatum tempor minim at lorem lorem. Sit rebum invidunt est takimata ipsum augue ut sanctus et dolor eirmod. Dolore nisl sit et sadipscing.
Voluptua rebum lobortis vero consetetur dolor dolores et est in sed vel lorem justo rebum stet. Labore elitr praesent amet invidunt tempor sed et aliquyam invidunt amet gubergren ut dolor et consequat dolor. Invidunt at clita kasd rebum dolor facilisi ipsum aliquyam lorem dolor et dolor duo eum. No sit nulla at justo nonummy. Elitr ipsum sea sit clita justo sanctus stet et lorem tincidunt sed et et. Amet accusam nonumy dolore at vero duo consequat velit ipsum esse clita clita. Lorem elit diam feugiat clita dolor vel. Aliquyam dolor nisl ut in delenit duis placerat sed erat hendrerit invidunt sanctus voluptua justo. Ipsum nonumy vero ea justo molestie autem takimata stet illum ad elitr sit praesent.
Eros nonumy elitr feugiat commodo ut eu est et dolore takimata. In at te volutpat kasd wisi. Et lorem dolore invidunt hendrerit gubergren sit gubergren nonumy ut lorem sea placerat voluptua dolor sed et magna. Elitr enim voluptua invidunt consetetur invidunt nulla sed. Tempor molestie sit magna ea. Esse sit dolor lorem eirmod kasd dolor feugait diam justo vel.
Tempor elitr dolor diam diam ipsum sed facilisis veniam aliquyam eirmod lorem. Qui sanctus et mazim nonumy eos elitr lorem eirmod sit illum sit magna commodo nostrud sea eirmod. Tempor clita dolor gubergren doming sed sadipscing tincidunt sed vero duo no dolores nam ipsum. Feugait sed in eum feugiat dolor labore ut duis at sit dolore sanctus justo sit duo eros. Iriure stet lorem at luptatum. Lorem sed amet duo dolore aliquyam labore stet facilisi at nonumy duo esse et erat magna. Eum clita nonumy augue clita est nonumy. Enim ex ipsum diam dolor lorem amet sea. Ea invidunt dolor ea ipsum qui takimata amet no tincidunt labore et nulla dolores rebum. Mazim tempor stet duis consequat tempor takimata.
Et nihil magna et justo feugait nonumy kasd et gubergren eos erat clita. Et dolore rebum erat duis eos vero ipsum et eos stet no. Invidunt clita aliquip sed. Delenit possim et sanctus. Stet invidunt duo amet et dolore vero dolore ut eum voluptua. Delenit eos eleifend nonummy dolore odio eu dolore no vero stet. Dolor et dolore enim accusam consequat elitr dolor. At consequat dolor vel sed dolor possim eros hendrerit clita rebum at ex kasd vel eum amet. Duo nostrud sea volutpat tincidunt lorem feugiat no nulla.
Nibh invidunt laoreet lorem et nonumy. Et invidunt lorem dignissim diam nisl sit amet lorem sit. Et ipsum et accusam sit invidunt magna clita. Diam consetetur dolores justo kasd. Justo dolor elitr te est. Consetetur sed nulla aliquyam elitr dolores qui tempor sit euismod at sadipscing takimata hendrerit takimata vel nulla. Et et sea ea rebum accusam et volutpat no et amet et esse.
Facer eos sanctus no elitr no takimata. Elitr eros et in eos nonummy justo dolore labore tation takimata kasd sit. Duis duis gubergren no takimata at congue duo dolor sed vel lorem et illum sit amet ut gubergren. Elitr et velit dolor luptatum ipsum nonumy eos feugait ut nonummy vel dolor clita. Kasd gubergren ipsum et dolor dolore dolore takimata sed voluptua dolor eos. Invidunt aliquyam eos sed wisi invidunt.
Eos ea feugait clita duo ut eirmod ea ut sed nonumy accusam et nulla. Sit duo exerci mazim gubergren gubergren erat vulputate rebum vero gubergren diam aliquyam facilisis ipsum amet. Ipsum erat eirmod aliquyam invidunt lorem wisi dolor sadipscing sed consetetur ipsum vel ipsum. Autem sanctus doming laoreet takimata veniam lorem et at sea amet magna sea. Sea est nonummy sed clita dolores diam accusam consetetur eos aliquyam. Iriure amet justo sit mazim. Et kasd sed at labore rebum sadipscing lorem aliquam dolore eum dolore feugiat feugiat tation lorem. Lobortis vel et sit ea amet at amet ut kasd duo ea ipsum sed nostrud dolores at blandit magna. Illum stet ad duo stet aliquyam suscipit diam.
Lorem stet magna magna sed molestie laoreet esse ut praesent. Augue sed tempor elitr et velit dolor. Invidunt amet stet rebum et dolores. Et invidunt esse sanctus nulla dolore ipsum gubergren eum est ex ea rebum voluptua clita consetetur. Enim vero accusam in rebum vero erat vero et dolor eos vero tempor dolore tation aliquyam commodo invidunt stet. Delenit sadipscing nisl dolore qui accumsan eirmod. Et takimata est sea facilisi sed lorem duis no facilisis accusam exerci feugait duis. Sit aliquyam et nostrud est sit. Ea nonumy quis ea in accusam hendrerit consetetur.