OASIS Mailing List ArchivesView the OASIS mailing list archive below
or browse/search using MarkMail.


Help: OASIS Mailing Lists Help | MarkMail Help

docbook message

[Date Prev] | [Thread Prev] | [Thread Next] | [Date Next] -- [Date Index] | [Thread Index] | [Elist Home]

Subject: DOCBOOK: RFE #480954: Extend textobject to insert external files

Here is a revised proposal for this RFE.

Proposal: extend textobject to allow references to external text files

The following trick is a common way to insert external sources
directly into a DocBook document:

<imagedata format="linespecific" fileref="filename"/>

Several people have suggested that it would make more sense to
allow a <textobject> to do this:

<textdata fileref="filename"/>

This proposal is superior to relying on XInclude for this
functionality for three reasons.

1. It's the logical extension of existing DocBook features and
replaces a hack with proper semantic markup.

2. It will allow entityref, which is possibly a requirement for some
authors (and is not provided by XInclude).

3. XInclude will require namespace support in DocBook. This is
probably a minor inconvenience for XML, but could potentially be
troubling for SGMLers.

I propose:

1. Change the content model of textobject to:

<!ELEMENT textobject (objectinfo?, (phrase|textdata|(%textobject.mix;)+))>

2. Add a textdata element:

<!ENTITY % local.textdata.attrib "">
<!ENTITY % textdata.attrib
	entityref	ENTITY		#IMPLIED
	fileref 	CDATA		#IMPLIED

<!ELEMENT textdata EMPTY>
<!ATTLIST textdata
		encoding	CDATA	#IMPLIED

The encoding attribute indicates the encoding of the file to be
included. If not present, the system is expected to determine it by
whatever means it can.

The textdata element does not have format or srccredit attributes.

3. Allow textobject as the only child of {inline}mediaobject. (Currently
the media objects require at least one image, audio, or video.

That's the minimum required, I think. It would also be possible to
allow <textobject> or <textdata> in more content models (to avoid the
somewhat odd <inlinemediaobject> wrapper inside, for example,
<programlisting>. Perhaps textobject should be allowed anywhere
inlinemediaobject is allowed...but that would be a separate proposal :-)

                                        Be seeing you,

Norman Walsh <ndw@nwalsh.com>      | We have fewer friends than we
http://www.oasis-open.org/docbook/ | imagine, but more than we
Chair, DocBook Technical Committee | know.--Hugo Von Hofmannsthal

[Date Prev] | [Thread Prev] | [Thread Next] | [Date Next] -- [Date Index] | [Thread Index] | [Elist Home]

Powered by eList eXpress LLC