This site has been retired. For up to date information, see handbook.gnome.org or gitlab.gnome.org.


[Home] [TitleIndex] [WordIndex

Yelp » Features »

Conditional Processing

Yelp supports conditional processing in both Mallard and DocBook. The Yelp viewer automatically determines information about the environment and sets test tokens or profiling values at run time. This allows a single document to be packaged for multiple systems and displayed correctly based on the reader's environment.

Mallard

The Yelp viewer automatically sets the following platform tokens:

Yelp also sets target tokens, feature tokens, and action tokens as appropriate, in both the viewer and in build utilities like yelp-build. The Yelp viewer converts to XHTML internally, so the tokens target:html and target:xhtml will be set. For all HTML conversions, the token target:mobile can be used to provide different content when viewed on mobile devices. This is currently implemented with conditionally-shown content toggled by the screen size of the browser window.

DocBook

The Yelp viewer automatically sets the following profiling values to match against with the os attribute:

Yelp does not perform a pre-processing filter for conditional processing in DocBook. Rather, the profiling is done by the XSLT templates at transformation time. Consequently, Yelp only supports conditional processing on a subset of DocBook elements. Generally, conditional processing works on all block-level and inline elements.


2024-10-23 10:58