[Date Prev] | [Thread Prev] | [Thread Next] | [Date Next] -- [Date Index] | [Thread Index] | [List Home]
Subject: Re: [docbook] Marking up generated content
> 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
[Date Prev] | [Thread Prev] | [Thread Next] | [Date Next] -- [Date Index] | [Thread Index] | [List Home]