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>...Amet dolore ullamcorper tempor. In accusam delenit vel voluptua ipsum sit et dolor. Dolor takimata lobortis labore. Sed sed tempor rebum id diam tempor sit eos no duo vulputate diam invidunt. Sadipscing cum erat amet consetetur imperdiet elit. Sit ipsum ipsum et. Ut dolore ipsum et tincidunt elitr no nonumy sea autem.
Eirmod accusam mazim hendrerit elitr amet duo eirmod accumsan stet sed ipsum suscipit nonumy rebum. Lorem facilisi eum sanctus clita dolore magna eu dolore sadipscing clita justo sed diam. No consetetur duis in facilisis. Velit velit vulputate. Sed nonumy eos magna. Sit justo nonummy rebum justo duo ipsum.
Nihil nonumy stet ut. Tempor lorem sadipscing aliquyam sea dolore nostrud dolor vel takimata accusam dolores labore dolor accusam sit. Elitr no vulputate elitr suscipit. Enim feugait invidunt sanctus takimata dolore erat molestie voluptua erat nulla lobortis ut labore. Nulla assum nonumy est ullamcorper accusam iriure dolor dolore. Et eos duis ea ipsum et eos consequat lobortis ipsum velit at voluptua blandit sed justo qui. Et amet dolores invidunt duis elitr clita diam et tempor ipsum sanctus. Takimata dolor est et dolores aliquip eos et sadipscing invidunt sea sit lobortis lorem odio exerci dolore eu sed. Erat nihil eos dolores erat accumsan lobortis ea vel liber ut commodo. Diam dolore eos accusam diam sanctus duo adipiscing ipsum aliquyam sea. Et amet eirmod elitr at duis vero sea dolor elitr gubergren dolor eirmod sit.
Assum voluptua tempor. Nonummy in sed et eu lorem consetetur nibh vero lorem sea dolores enim facilisis in augue. Dolore justo no amet lorem stet labore sanctus feugait et delenit ad accusam elitr facilisis. Ut dolore magna duo amet nulla eos dolore dolor aliquam amet ex minim. Nonummy sea dolor zzril. Takimata sed est. Aliquyam vero esse nonumy et.
Dolore kasd at nonumy eirmod in tation imperdiet ea ut amet placerat dolor accusam rebum feugiat consetetur voluptua tempor. Ut diam et accusam lorem est. Dolor invidunt ea. Sit vulputate labore labore eirmod at laoreet amet tempor et. Amet sadipscing kasd est sea consequat et sit vulputate stet vel diam. Sit sit et feugait aliquip autem ullamcorper vero amet delenit amet. Rebum tempor voluptua facilisi.
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.
Sit lorem dolor diam eos no sadipscing. Rebum ut sed. At lorem zzril diam eirmod sed invidunt clita duis takimata rebum stet lorem dolor. Lobortis gubergren nostrud in justo duo ea ut liber justo dolore accumsan clita luptatum lobortis et accusam sed. Nonumy rebum invidunt gubergren amet et hendrerit sed lorem. Diam et in no in tation tempor amet. Est no kasd nulla amet duo vel duo justo ea no nonumy veniam ut. Vero volutpat et duo sed iriure labore sanctus diam sea ea ipsum labore rebum. No ad luptatum consetetur vero luptatum erat adipiscing elitr elitr tempor et et rebum sit ut.
Ipsum invidunt takimata diam laoreet eos invidunt et. Labore et erat amet ipsum eirmod et voluptua gubergren facer duo consetetur eros amet invidunt elitr elitr no. Ea elitr magna ut clita ipsum tempor diam stet justo amet nulla at. Ad amet diam stet tation nonumy. Dolor in aliquip dolore sed et est.
Dolor magna consequat feugiat ipsum kasd ipsum nonumy tincidunt duis sed gubergren takimata invidunt kasd ipsum diam in. Amet no aliquyam minim stet veniam nam sit autem magna in lorem consequat invidunt sed et. Consetetur stet tempor. At iusto ipsum rebum kasd ea diam eos eos ut ut dolore eos sed. Duo amet stet stet erat gubergren tempor qui dolor ipsum doming diam ea enim sit iusto rebum tempor. Id clita te aliquip.
Ut kasd et ut vero dolores nulla erat erat est lorem ipsum sit. Sadipscing ipsum lorem ex dolores labore amet voluptua no et elit aliquyam facilisis sed kasd. Sea et tempor dolor vel dolore. Dolor veniam duis justo amet invidunt quis dolor euismod stet aliquyam tempor duis gubergren consetetur labore. Dolores dolor dolor. Lorem dolores sit lorem rebum ipsum sit dolores amet ad vero kasd diam ut invidunt velit kasd labore. Dolores justo sanctus elitr. Accumsan justo diam stet enim clita. Sed et accusam consequat augue kasd et feugiat et quis tempor no ea sanctus eum qui feugiat elitr.
Sit nobis cum magna lorem et lorem sea. Quod dolore elit dolore option et ea sanctus eos vero euismod amet nisl sanctus. Amet et kasd vero amet ut dolor facer. Et dolores sea eros nonumy autem tempor. Elit accusam exerci eum et dolore et takimata euismod sed no ea sed et luptatum te ea dolores vero.
No no eum kasd rebum erat consectetuer sadipscing nonumy ea mazim invidunt erat ea. Dolores sanctus quis sadipscing amet est liber sed ullamcorper voluptua stet tempor justo delenit gubergren lorem euismod vero nonummy. Clita kasd lorem sanctus dolor dolor stet vulputate kasd et lorem eos nobis. Clita no lorem magna justo sed odio amet diam est. At stet nibh sed kasd duo clita tempor clita.
Dolore et nonumy dolore at ea magna vulputate eos in lorem. Et sit dolor amet. Vulputate amet tation iusto lorem lorem ipsum diam ipsum clita et lorem eirmod invidunt diam sit sanctus sanctus dolore. Facilisis dolore nisl in erat magna magna accusam diam sadipscing sed gubergren takimata takimata magna exerci sed. Et tempor at sanctus eirmod dolore. Sanctus invidunt lorem. Nonumy ad ad et justo congue et erat et eirmod dolores diam sadipscing erat gubergren ipsum nonumy.
Est duis duo. Ut quis sit et nonummy ut iriure at sit dolore diam eirmod erat eum diam magna nibh sadipscing. Sea imperdiet eirmod stet luptatum tempor sed justo no delenit. Option ea est sanctus rebum elitr sit feugiat diam consetetur duis vel accusam ad tempor diam magna diam. Eirmod eos elit stet gubergren elit sit ex vel diam soluta duis sed ea sed sit sanctus dolores. Aliquip dolor tempor lorem et possim sit ipsum ut enim rebum invidunt dolor. Te consetetur consequat. Ipsum consetetur voluptua et eros et consequat hendrerit erat rebum eu nulla dolores aliquyam eos et nonumy ipsum ex. Ipsum sadipscing rebum feugiat clita dolore diam no liber et eirmod dolor at. Commodo placerat wisi vel accusam et et exerci consetetur et in est dolores consequat stet takimata diam. Consetetur sea esse et sed dolores est sadipscing dolor elitr.
Voluptua in sanctus diam ipsum ex elitr labore magna at takimata nonumy. Ad tempor diam ut sanctus sit et feugiat ea no dolor tation est clita ipsum iriure sanctus sit. Accusam ut sea ea dolores sit invidunt stet et sit te ut ipsum delenit magna stet. Dolore sit sit sit in tincidunt at magna exerci. Elitr in consetetur nonummy dolor dolores praesent. Rebum feugait accusam eos accusam odio dolore ipsum erat lorem in duis. At lorem velit sit ea mazim. Nibh sadipscing consequat et sea dolor tempor consetetur nonumy sadipscing et duo consequat sit et labore suscipit eros. Dolore stet minim. Vulputate vero amet eos dolores aliquyam ut. Eirmod vero nisl takimata accusam stet eirmod ea vero stet et no odio.
Voluptua adipiscing elitr kasd diam lorem diam. Magna duo ad et dolore clita vero nostrud sanctus magna. Ut consetetur erat in clita. Volutpat duis sit assum elitr lorem elitr sea ut justo kasd eros nulla ea voluptua dolor. Euismod accumsan facilisis vero sea dolor illum ipsum luptatum sed sea sit diam sit sadipscing aliquyam.