This is the mail archive of the
docbook@lists.oasis-open.org
mailing list for the DocBook project.
Re: Request for comments: adding a Fileoutput element (RFE613293)
- From: Bob Stayton <bobs at caldera dot com>
- To: Paul Grosso <pgrosso at arbortext dot com>, docbook at lists dot oasis-open dot org
- Date: Sun, 01 Dec 2002 20:27:46 -0800
- Subject: Re: DOCBOOK: Request for comments: adding a Fileoutput element (RFE613293)
- References: <20021128084440.GG2698@vitel.alcove-fr><20021128063517.GB1441@sideshowbarker> <20021128084440.GG2698@vitel.alcove-fr><20021129014315.C7678@caldera.com><4.3.2.7.2.20021201164929.00b47cd8@172.27.10.30>
On Sun, Dec 01, 2002 at 04:56:27PM -0600, Paul Grosso wrote:
> At 01:43 2002 11 29 -0800, Bob Stayton wrote:
> >> On Thu, Nov 28, 2002 at 03:35:20PM +0900, Michael Smith wrote:
> >> > The DocBook Technical Committee would like to ask for comments from
> >> > readers of this list about a request for an enhancement to the DocBook
> >> > DTD, RFE 613293, 'Generalize programlisting'[1], which proposes that the
> >> > DTD be enhanced in some way to provide a 'semantically-precise way to
> >> > wrap the contents of files that are not programs'.
> >
> >I support the addition of a filecontents element.
> >But I object to removing programlisting and literallayout.
>
>
> I agree with Bob's sentiment.
>
> However, I also fail to see the usefulness of a "filecontents"
> element unless it truly allows the incorporation of a file's contents.
>
> I'd like to see some element (perhaps filecontents) with an href (or
> whatever) attribute which, if assigned, means the referenced file's
> contents should be inserted in "verbatim" mode. Presumably, if this
> attribute is set, the filecontents element would be empty (or its
> contents would be ignored).
>
> This allows the incorporation of whatever is really in the referenced
> file at publication time which is a much better way of guaranteeing
> that the code you print is the code that really works.
>
> Am I missing an existing DocBook element that allows for this?
Yes, in DocBook 4.2 it got easier with either of
these combinations:
<literallayout><textobject><textdata fileref="mycode.c" /></textobject>
</literallayout>
<programlisting><textobject><textdata fileref="mycode.c" /></textobject>
</programlisting>
Using this mechanism, the wrapper element can contain
literal file text or a textobject to insert it, or a
combination.
The issues here are that not all files are programlistings,
and that literallayout is not specific enough.
--
Bob Stayton 400 Encinal Street
Publications Architect Santa Cruz, CA 95060
Technical Publications voice: (831) 427-7796
The SCO Group fax: (831) 429-1887
email: bobs@sco.com