Conditional Processing

Phil Bull <philbull at gmail.com>
Sun Apr 4 17:19:21 EDT 2010

Hi Shaun,

On Fri, 2010-04-02 at 12:56 -0500, Shaun McCance wrote:
> Key values are expected to be provided by the processing tool.
> In the case of installing Mallard documents for Yelp to view,
> that means Yelp has to understand them. As for how Yelp gets
> that information, that depends on the keys. We can get some
> stuff automatically from uname. For keys like distro, though,
> Yelp will probably have to be built with compile-time options.

In the case of Yelp, it would be trivial to read keys out of gconf.
Distros can set default values with those schema thingies, can't they?

I have mixed feelings on the whole conditional processing feature now.
On the one hand, we could rig up some really cool context-sensitive
stuff with this - the processing tool could detect which web browser is
the default, whether accessibility tools are running, what time of day
it is, whether a given feature is enabled or disabled etc. and we can
display content based on what it finds. That could be awesome. I hate
writing "Open your web browser".

On the other hand, I worry that people could go a bit crazy and we'll
end up with people rigging-up their own crazy quasi-dynamic help systems
with it. This would lead to absolutely illegible Mallard files with lots
of scope for introducing bugs. I know people can write illegible Mallard
files anyway if they try hard enough, but this feature is very powerful
and it could be too tempting to do ridiculous things with it.

> My guess is they don't, because Yelp doesn't support it for
> DocBook. Unless they have a DocBook->DocBook tool that strips
> content based on profiling attributes. Which is doable, but I
> don't think they're doing it. (I seem to recall somebody at
> WritersUA talking about doing this with DITA.)

No, we don't. The most "conditional processing" that we do is
branching/patching through bzr.

> The largest performance problem in Yelp is that it scans your
> file system to locate all installed help (including man and
> info) before it will show you a single document. Yelp 3 does
> not do this. Yelp 3 is seriously fast.

Woop!

Thanks,

Phil

-- 
Phil Bull
https://launchpad.net/~philbull