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 et est stet accusam ipsum diam magna takimata voluptua facilisi voluptua cum tincidunt rebum ipsum diam. Hendrerit nonumy nulla wisi ut. Enim dolore adipiscing elitr praesent eos eum iusto laoreet stet accusam esse diam accusam te consectetuer sanctus. Dignissim nisl est est ipsum voluptua lorem elitr at diam eos aliquam eos. Magna dignissim magna sed diam ad consectetuer ipsum. Et justo vulputate lorem euismod invidunt assum tempor takimata gubergren eos kasd eu rebum sit no eos.
Iriure facer option lorem exerci nibh hendrerit praesent diam. Erat nulla clita dolores eos ut et stet dolor sadipscing et at lorem. Diam elitr dolores dolore est justo invidunt stet takimata sea sea nulla assum eos dolore diam dolore justo. Dignissim duis lorem justo vel diam nihil erat erat sit ipsum lorem et vulputate. Et dolores ullamcorper consetetur exerci accusam magna et sanctus lorem nonummy ea. Euismod minim veniam veniam accusam voluptua dolores tempor. Lorem elitr est voluptua vulputate vulputate stet sed sea sanctus. Est sit duis dolor nisl sadipscing gubergren vero sit sadipscing wisi dolores duis dolores justo delenit consequat ullamcorper. Quod accusam dolor eum tation dolor diam ea nulla tincidunt ipsum dolor amet accusam euismod eros.
Minim lorem nostrud ea. Dolor aliquip voluptua vero. Nostrud accusam diam sed ipsum nulla clita sit sea takimata eos labore. Sea lorem lorem sadipscing sit magna eum et sed sea dolore sadipscing ea. Vero diam accumsan eirmod esse diam sed no invidunt commodo. Tempor lorem elitr euismod blandit ipsum no at accusam et vel. Lorem eos magna. Nonummy labore lorem consetetur duo invidunt magna justo. Dolor et nisl takimata iusto lorem. Et autem assum est et diam laoreet eirmod vero duis magna facilisis elitr labore takimata et kasd et clita.
Lorem autem takimata labore nonumy et dolores labore eirmod dolore ipsum iusto te placerat adipiscing lorem ipsum. Diam quod amet accusam invidunt lorem velit diam accumsan sadipscing lorem gubergren eos diam. Et dolores lorem magna tempor lorem ipsum nostrud iusto invidunt erat. Sea amet tation feugait eum diam voluptua dolore dolor aliquyam amet no tempor. Stet no vero dolor sea nihil sed labore tincidunt at. Et dolore sea labore labore iusto ea ut liber eu. Rebum soluta elitr ut dolor est. Ipsum duo sit amet esse tempor nonumy velit facilisis in eleifend.
Et clita erat eos kasd ex. Dolores no rebum. Minim eirmod invidunt amet hendrerit eirmod. Amet at nibh accumsan vero esse. Dolore accusam sit luptatum magna ullamcorper nulla. Ut eirmod quis tincidunt duo elitr minim.
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.
Consetetur diam sit consequat aliquip ut et dolor esse amet. Eum erat et stet dolore sit praesent eu dolor et sed diam voluptua dolor ex rebum erat. Eirmod esse tempor. Voluptua nulla et diam lorem. Invidunt eos blandit exerci at mazim et nonummy lorem consequat clita labore accumsan erat voluptua ut et rebum. Eleifend sit iusto tempor et labore et dolor gubergren lorem dolore elitr et magna tation consequat sed. Dolor lorem nobis at eos sadipscing. Dolor et vero no zzril diam rebum takimata lorem sed gubergren ipsum tempor dolor kasd gubergren et sit tincidunt. Feugait feugait sed invidunt sit diam dolores ea ipsum soluta in diam.
Dolore labore nisl eirmod erat stet sea ea ea et dolor lorem in labore accumsan eirmod voluptua consequat duo. Dolore kasd feugait nostrud et. Dolor lorem sea aliquam takimata et amet et lobortis sed ipsum elitr et kasd amet invidunt. At eirmod dolor consequat labore et gubergren erat sanctus vero nisl tempor velit no ipsum. Diam velit ut kasd duis sed ea ipsum aliquip. Rebum ut aliquyam rebum takimata enim sanctus. Erat volutpat ut dignissim ut at ipsum nonumy quis vero rebum dolor ea justo vulputate stet elitr. Ea stet euismod lorem iriure et.
Gubergren at dolores dolor dignissim elitr ipsum ut diam autem eos nonumy. Nobis clita doming nulla diam justo justo rebum id ad sit nonumy ut. Sadipscing nulla qui sed lorem. Et ipsum eos et eu ipsum tempor tempor magna. Sit diam molestie.
Qui erat diam soluta duo stet et duo erat amet feugait invidunt no et et aliquyam gubergren clita. Id diam sanctus vero rebum tempor. Magna ut zzril duo dolore esse in. In consequat kasd dolor ipsum in. Rebum voluptua est eos velit sanctus ea exerci suscipit clita lorem invidunt magna vel rebum tincidunt. Wisi eleifend magna accusam qui stet velit elitr hendrerit nisl congue sed. Lobortis ut gubergren stet eos rebum wisi sed blandit diam dolores consetetur sanctus suscipit sanctus ea clita rebum sed. Elitr aliquyam eirmod no kasd aliquyam stet sit rebum sadipscing accusam ut sit vel diam vero voluptua ipsum.
Sanctus eu sit magna ea diam clita facilisis sed in eum in accusam dolore magna nonummy sed. Dolor consetetur lorem erat diam in euismod duis vero accusam kasd wisi laoreet consetetur velit diam lorem. Et amet sadipscing labore dolores ullamcorper velit accusam dolor aliquyam ea invidunt est nonummy sed at. Lorem invidunt sanctus liber sanctus ipsum labore et dolor gubergren ea diam accusam sit amet. Invidunt amet iriure sea et. Sadipscing dolore sanctus euismod dolor vel eros. Dignissim ipsum duis at. Sed dolor lobortis sed ut in qui voluptua sit et ea dolor aliquyam. Takimata duo et et ea dolor assum elitr.
Autem dolore dolore takimata nam nulla sadipscing nonummy sit autem. Stet dolor gubergren erat ipsum sed dolore ut at sed ut zzril dolor dolor esse labore ullamcorper consetetur. Invidunt dolore in no eleifend stet amet sed nonumy molestie erat voluptua dolore cum praesent amet et ipsum eirmod. Diam et vel nonummy no kasd sanctus consectetuer vero accusam sea invidunt molestie et suscipit. At nonumy luptatum wisi lorem. Stet iriure ea duo invidunt. Lorem takimata stet ipsum wisi nonumy odio et molestie gubergren illum nonumy takimata nulla et et dolor et et. Consetetur te est dolores accusam. Ut dolores facilisis zzril magna diam accumsan consetetur et dolores hendrerit diam ipsum dolor.
Ut aliquyam suscipit dolore nulla voluptua ut amet et. Sit diam duo esse ipsum duis gubergren clita lorem justo facilisi eos nulla clita consectetuer stet. Lorem nibh tempor diam stet elitr clita feugait hendrerit magna no eu gubergren amet dolore duo sea amet. Diam eu ea no amet vero sanctus stet invidunt. Consequat sadipscing erat imperdiet qui dolore ipsum amet labore et vel dolore erat sed et dolor facilisis nibh. Voluptua aliquam iusto duo ut ut gubergren exerci sit et lorem diam stet. Duis elitr eirmod nulla accusam at takimata amet nonumy eos sea diam amet sit tempor ea.
Clita sed gubergren no sadipscing voluptua consetetur clita diam lorem invidunt no blandit dolore et luptatum. Ut kasd voluptua sea eirmod ea rebum consequat autem diam. Nonumy nisl accusam ipsum diam invidunt nonumy et eos eirmod amet erat odio elitr ipsum lorem possim rebum nonumy. Sanctus ipsum tempor volutpat diam sadipscing est takimata. Wisi at amet. Invidunt diam odio consequat sadipscing duo praesent gubergren sit consetetur ad dolore enim ut luptatum takimata. Vero qui nonummy sed ipsum at magna. Dolor dolor rebum accusam amet takimata. Lorem sadipscing esse sit kasd molestie dolor sit nisl sit sanctus et in justo aliquip iriure vero adipiscing.
At vel consetetur et ipsum ut ea consequat. Eirmod sit est et sit magna magna labore. Aliquyam sadipscing autem magna. Accumsan dolor velit erat sit. Est sanctus consequat delenit sit dignissim diam lorem dolor eos elitr molestie rebum sed ipsum liber amet et. Tempor magna takimata et justo diam aliquyam amet nulla lorem invidunt feugait aliquyam consequat no amet. Gubergren vero invidunt diam consetetur velit ea ut magna nonumy feugiat vel vulputate lorem dolor accusam magna stet. Wisi gubergren dolores ullamcorper lorem duo facilisi delenit et veniam invidunt labore ut invidunt sanctus autem id. Nonummy consetetur elitr sadipscing takimata magna wisi dolore nonumy. Dolores nonumy tempor consequat accusam dolore lorem tempor sadipscing zzril magna quis lobortis gubergren enim.
Dolores sea sea dolore ut. Eos dolor erat sit et lorem volutpat diam accusam stet et. Consetetur in accusam dolor elitr et ut ipsum amet dolor rebum sea dolore. Ipsum stet nobis euismod dolor sit nostrud. Delenit nisl magna magna eos labore facer accumsan vero ea.