Recent Changes
Recent Changes · Search:

TipOfTheWeek.00036 History

Hide minor edits - Show changes to output

12 June 2008 at 09:43 AM by John Rankin - Wikibook XML
Changed lines 5-6 from:
:Status:Logged
to:
:Status:Published
Changed lines 11-12 from:
One of the reasons for using PmWiki with Wikipublisher is that it is ''markup agnostic'', meaning an administrator can instruct the wiki engine how to interpret any particular markup sequence. In the normal course of events, the wiki converts input markup into `HTML and embeds this in a specified [[PmWiki/skin(s)]]. The Cookbook:PublishPDF plug-in teaches PmWiki to:
to:
One of the reasons Wikipublisher uses PmWiki is that it is ''markup agnostic'', meaning an administrator can instruct the wiki engine how to interpret any particular markup sequence. In the normal course of events, the wiki converts input markup into `HTML and embeds this in the specified site [[PmWiki/skin(s)]]. The Cookbook:PublishPDF plug-in teaches PmWiki to:
Changed lines 21-22 from:
* in a few places `HTML tags are hard-wired into the source code; these are pruned from the Wikibook output
to:
* in a few places `HTML tags are hard-wired into the source code; these are trimmed from the Wikibook output
Changed lines 27-31 from:
The last item is especially painful, since it means page lists do not work correctly unless an administrator [[Wikipublisher.UpgradingToPmWiki22 |patches the PmWiki source]]. Third party recipes have to be treated on a case-by-case basis. Many recipe writers assume `HTML output and hard-wire `HTML tags in their code. These only work correctly with Wikipublisher if the recipe author provides a Wikibook `XML version of the markup rule.

Why use a different output markup? Why not transform `HTML into Latex
? It can be done -- the first version of Wikipublisher did exactly that. Using Wikibook `XML gives vastly better results. The reason is that `HTML is designed to represent Web pages, not print pages, whereas Wikibook `XML is designed from the ground up to represent print pages.

Wikipublisher includes an option to generate Wikibook `XML output only, via the ''View `XML'' button
. This can be saved and opened in any `XML-aware editor. For example, somebody requiring a unique print layout can use a tool such as [[Adobe InDesign -> http://www.adobe.com/products/indesign/]] to read the `XML and apply tag-specific presentation styles.
to:
The last item is especially painful, since it means page lists do not work correctly unless an administrator [[Wikipublisher.UpgradingToPmWiki22 |patches the PmWiki source]].

Third party recipes have to be tested on a case-by-case basis. Many recipe writers assume `HTML output and hard-wire `HTML tags in their code. These only work correctly with Wikipublisher if the recipe author or site administrator provides a Wikibook `XML version of the markup rule. The [[Cookbook]] includes several examples.

Why use a different output markup
? Why not transform `HTML into Latex? It can be done -- the first version of Wikipublisher did exactly that. Using Wikibook `XML gives much better results. This because `HTML's purpose is to represent Web pages, not print pages, whereas Wikibook `XML is designed from the ground up to represent print. Form ever follows function.[^[[(http://)en.wikipedia.org/wiki/Form_follows_function]]^]

Wikipublisher includes an option to generate Wikibook `XML output only, via the ''View `XML'' button. This can be saved and opened in any `XML-aware editor. For example, someone requiring a unique print layout can use a tool such as [[Adobe InDesign -> http://www
.adobe.com/products/indesign/]] to read the `XML and apply tag-specific presentation styles.

[^#^]
11 June 2008 at 04:44 PM by John Rankin - Wikibook XML
Added lines 11-31:
One of the reasons for using PmWiki with Wikipublisher is that it is ''markup agnostic'', meaning an administrator can instruct the wiki engine how to interpret any particular markup sequence. In the normal course of events, the wiki converts input markup into `HTML and embeds this in a specified [[PmWiki/skin(s)]]. The Cookbook:PublishPDF plug-in teaches PmWiki to:

# use a skin appropriate to a particular print [[!document type]]

# convert wiki markup into Wikibook `XML -- a print-oriented {`DTD|document type definition}

# detect and remove any residual `HTML tags in the output

When the reader selects `PDF output, Wikipublisher ''completely replaces'' the markup rule set. In practice, PmWiki is nearly, but not quite, markup agnostic. Experience has shown that it is a little bit pregnant with `HTML `DNA:

* in a few places `HTML tags are hard-wired into the source code; these are pruned from the Wikibook output

* sometimes `HTML is embedded in the input markup, such as attribute names and values; these cases are generally ignored

* PmWiki's markup processing occasionally conflicts with Wikipublisher; specifically, Keep(`MarkupToHTML( ... )) results in text bereft of markup

The last item is especially painful, since it means page lists do not work correctly unless an administrator [[Wikipublisher.UpgradingToPmWiki22 |patches the PmWiki source]]. Third party recipes have to be treated on a case-by-case basis. Many recipe writers assume `HTML output and hard-wire `HTML tags in their code. These only work correctly with Wikipublisher if the recipe author provides a Wikibook `XML version of the markup rule.

Why use a different output markup? Why not transform `HTML into Latex? It can be done -- the first version of Wikipublisher did exactly that. Using Wikibook `XML gives vastly better results. The reason is that `HTML is designed to represent Web pages, not print pages, whereas Wikibook `XML is designed from the ground up to represent print pages.

Wikipublisher includes an option to generate Wikibook `XML output only, via the ''View `XML'' button. This can be saved and opened in any `XML-aware editor. For example, somebody requiring a unique print layout can use a tool such as [[Adobe InDesign -> http://www.adobe.com/products/indesign/]] to read the `XML and apply tag-specific presentation styles.
05 June 2008 at 01:27 PM by John Rankin - Wikibook XML
Added lines 1-16:
:Subject:Wikibook XML

:Summary:How to produce Wikibook XML

:Status:Logged

:Need:How does Wikipublisher teach PmWiki to generate output in Wikibook `XML instead of `HTML?

:Solution:In [[Tip(OfTheWeek.) 00035]], we saw how [[Wikipublisher]] turns Web pages into `PDF suitable for printing. This tip describes the process of generating Wikibook `XML from a Web site, so that a Wikibook server has something it can compose.


:Picture:Attach:ornament-lyre-and-vine.jpg

:Caption:A printer's ornament in the form of a lyre and vine

:Category:[[!system]]
Page last modified on 12 June 2008 at 09:43 AM