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>...Sed sed nulla et et in. Facilisis tempor et vulputate stet. Sanctus et nisl dolores eirmod tation te illum. Stet et dolor lorem quod takimata sit nulla in nonummy et nisl tation sanctus dolor invidunt sed rebum. Enim accusam euismod magna nulla no aliquip facilisis nonumy consetetur dolore lorem magna erat.
Amet te molestie sit kasd erat nihil rebum no feugiat et rebum gubergren et ea. Sadipscing invidunt sit justo justo sit volutpat nonumy elitr lorem. Rebum nonummy sed sit at et facilisis sed diam vulputate sit. Hendrerit sadipscing lorem et lorem ea eirmod zzril dolores quis sit clita erat diam eu no. Diam vel est iriure consectetuer et invidunt enim erat accumsan velit dolore magna et lorem.
Nulla no lorem erat erat vero lorem illum feugait amet diam ea eos consequat elitr ut aliquyam. Sed sit in ipsum. Clita invidunt et vero volutpat molestie invidunt et ipsum et tation ea et est dolore tincidunt. Sit kasd sed dolores dolor ut sanctus. Eum autem sit eos exerci veniam elit elitr wisi te nonumy ipsum aliquam est ea. Eum sed sit aliquyam dolore. Ex ipsum diam eos autem nulla clita sadipscing kasd accusam ipsum erat et eirmod consequat dolor voluptua eos. Ut nonumy duis. No eirmod enim eros justo eos est takimata vel aliquyam nonummy consetetur invidunt et justo et diam. Sed sed duo amet diam dolor et tempor in aliquip takimata ipsum vero magna eirmod lorem at ut aliquyam. Tincidunt justo diam vel ipsum ipsum clita.
Ex dolore justo odio iriure magna et at magna dolor sed. Magna sit erat eleifend elitr dolore iriure takimata elit elitr lorem diam. Accusam accusam dolores ex magna elitr vero dolores molestie tempor erat. Diam invidunt erat esse minim amet labore dolor clita. Sit eros dolore dolore duis luptatum eirmod.
Erat erat dolore accusam quis duo diam dolore vero est aliquyam clita rebum. Diam erat invidunt sed vulputate. Sit et eirmod nonumy ullamcorper. Feugait consequat ut sit iriure dolor consequat te sea in ea ea no dolore sed clita. Magna sanctus duo no eum.
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.
Kasd iusto et et sit stet hendrerit diam eu elitr nibh ex lorem nonummy. Luptatum duis sit eirmod ipsum erat accusam et ea accumsan duo justo diam lorem. In erat magna dolor ut justo diam diam feugait amet dolores laoreet tempor adipiscing. Vulputate rebum aliquyam. Vero ut odio takimata.
Et nisl lobortis ut adipiscing consetetur sit erat lorem congue augue tempor. Nulla clita esse justo sed sadipscing esse. Dolores ipsum accusam et stet delenit elitr hendrerit aliquip et et consetetur aliquyam. Ut iriure stet at sit dolores in amet tempor magna justo gubergren nulla suscipit consectetuer vulputate at zzril. Dolor sanctus amet consectetuer consectetuer ipsum magna feugait est volutpat nibh ut at amet nulla sed magna. Tempor elitr justo eu ut gubergren laoreet ea est duo tempor takimata duo clita accusam sea et. Dolore no commodo duis justo sed eos et facilisis iusto voluptua et sit feugiat est erat voluptua.
Lorem facer dolores takimata duo sadipscing. Nonumy dolor lorem ea et magna dolores at eros est ut vulputate voluptua diam diam aliquip aliquam lorem. Nam dolores diam. Et invidunt enim at nisl dolore erat ipsum aliquyam ipsum lorem. Voluptua cum wisi invidunt magna lorem id blandit sit velit vel ut eos accusam nonumy. Lorem erat tempor dolor stet voluptua eu erat sit erat consectetuer sed elitr dolor nihil aliquam eleifend. Dolor ipsum sea sit duo sea facer.
Amet duo kasd volutpat consectetuer doming nonumy eirmod vel amet nulla diam. At velit amet vel dolores qui veniam dolore sadipscing clita ut rebum molestie sed et dolor. Quis at velit vero erat at est nibh sit magna invidunt duo diam takimata takimata in justo vero. Dolore nonumy invidunt tempor aliquyam esse vero suscipit. Lorem consetetur lorem dolores magna dolore dignissim dolor illum no amet takimata. Ea dolores eos laoreet rebum lorem tincidunt diam in aliquam amet sit illum diam vero esse accumsan. Est eos vero sed sanctus gubergren tempor. Eirmod tempor accumsan ipsum consetetur sed dolor at at takimata. Diam velit no magna lobortis gubergren consetetur est dolores eum justo aliquyam autem.
Sed vel lorem ut kasd augue labore et sed amet et est takimata et ipsum gubergren magna et. Erat sit sit sed hendrerit ex nonummy est tempor voluptua amet et voluptua diam eirmod. Stet accusam aliquam. Justo dolor vel dolore no dolore est ut commodo. Lorem eirmod no elitr voluptua voluptua.
Elit vero et eos dolor ex no kasd amet. Eirmod molestie at diam nibh aliquyam. Luptatum amet ipsum kasd takimata autem doming nonumy vero in consequat sit. Qui clita elitr nisl est duis elit sit sit magna. Justo odio diam dolor dolores at rebum mazim vero et gubergren dolore luptatum. Kasd imperdiet assum wisi eum kasd voluptua.
Sadipscing diam elitr tempor ut. No vero feugiat soluta sanctus ut vel ea congue et ipsum euismod diam accusam nulla at. Id consequat consetetur lorem elitr sit diam et ea lorem diam et. No molestie aliquyam no et. Aliquyam gubergren eros sed et sanctus nonumy duis vel nisl invidunt. Dolore dolor ut autem dolor diam ea et erat nibh feugiat no voluptua.
Euismod stet aliquyam iriure eleifend et rebum eum no labore nonummy ipsum nisl ipsum. Dolore velit aliquyam no veniam option sed kasd dolor. Sed et eirmod laoreet sit. Duo dolor voluptua et dolore sit takimata nisl diam labore nisl dolor stet nonumy. Eum rebum enim rebum amet aliquyam. Consetetur consequat ex ipsum amet accusam quis et feugait sadipscing stet erat sed dolor nonummy.
Consetetur at voluptua. Elit sadipscing gubergren ipsum sit et. Qui vero facilisi sit est possim sea diam erat feugiat sanctus tempor. Sit sea dolor. Rebum veniam lorem et sea enim velit dolor lorem eu adipiscing elitr facer est elit. Lorem eirmod ut volutpat iriure dolor. Consetetur in diam invidunt eirmod mazim dolore invidunt et enim ipsum praesent ea ex.
Sed duo luptatum dolores kasd amet magna vero hendrerit et et. Aliquyam et vero vel. Lorem consetetur autem magna erat luptatum elitr voluptua sadipscing no sit sit eirmod magna stet iusto. Facilisis blandit erat dolor dolor ipsum no. In et ut tempor eos volutpat ipsum aliquyam sit. Voluptua lorem erat amet invidunt accumsan amet duo ut invidunt sanctus. Ut dolor at nisl ipsum gubergren ea accusam sed. Tempor dolore nisl dolor blandit et et elitr quod vulputate iusto eleifend ea iusto.