This is the mail archive of the
docbook@lists.oasis-open.org
mailing list for the DocBook project.
Re: [docbook] Marking up generated content
- From: "Rowan Rodrik van der Molen" <bigsmoke at home dot nl>
- To: "DocBook Mailing List" <docbook at lists dot oasis-open dot org>
- Cc: "Christian Roth" <roth at infinity-loop dot de>
- Date: Thu, 27 Nov 2003 00:52:40 +0100 (CET)
- Subject: Re: [docbook] Marking up generated content
- References: <20031125222136.105@post.strato.de>
> Hi,
>
> I'm looking for a good way to markup generated content, i.e. sections
> that get updated resp. replaced just before publication by an additional
> processing step. Things likely to get automatically replaced are the
> current date, a processor identification or the geographical location of
> the publishing machine.
>
> In some pseudo XML, this would look like:
>
> <para>
> Signed <gentext type="Location.City">Munich</gentext>,
> <gentext type="Date.Long">November 25, 2003</gentext>: Christian
> </para>
> <para>
> (Processed by <gentext type="Processor.Name">XalanJ 2.5.2</gentext>
> at <gentext type="Time.Short">23:10</gentext>)
> </para>
>
> In lieu of the <gentext> elements in the above, should I simply use
> <phrase> with a custom role attribute? <replaceable> seems to have
> different semantics and therefore seems not to be a good choice here.
>
> I'm also looking at making it obvious to the author of the "template"
> DocBook document that manual changes to the contents of the <gentext>
> elements will be discarded at publishing time, so he better not wasted
> any time on doing it.
>
> Are there any general rules or best practices for accomplishing this?
Personally, I tend to use custom XML processing instructions for this,
since these are clearly targetted at ... a processor.
For your example I'd use something like the following mark-up:
<para>
Signed <?gentext Location.City ?>,
<?gentext Date.Long ?>: Christian
</para>
<para>
(Processed by <?gentext Processor.Name ?>
at <?gentext Time.Short ?>)
</para>
Of course you could use pseudo-attributes, like in
"<?gentext type='Location.City' default='Munich' ?>"
But these are just my own preferences. Others might do things differently.
Sincerely,
- Rowan
To unsubscribe from this list, send a post to docbook-unsubscribe@lists.oasis-open.org, or visit http://www.oasis-open.org/mlmanage/.