This is the mail archive of the
docbook@lists.oasis-open.org
mailing list for the DocBook project.
Proposal: extend textobject to point to external files
- To: docbook at lists dot oasis-open dot org
- Subject: DOCBOOK: Proposal: extend textobject to point to external files
- From: Norman Walsh <ndw at nwalsh dot com>
- Date: Fri, 18 May 2001 12:45:26 -0400
The following trick is a common way to insert external sources
directly into a DocBook document:
<inlinemediaobject>
<imageobject>
<imagedata format="linespecific" fileref="filename"/>
</imageobject>
</inlinemediaobject>
Several people have suggested that it would make more sense to
allow a <textobject> to do this:
<inlinemediaobject>
<textobject>
<textdata fileref="filename"/>
</textobject>
</inlinemediaobject>
Until this morning, I had thought that the proper way to deal with
this would be to use XInclude[1]. But I just realized that there are
two significant disadvantages to XInclude:
1. It will require namespace support in DocBook. This is a minor
inconvenience, but could potentially be troubling for SGMLers.
2. It will not allow the equivalent of entityref, which is possibly a
requirement for some authors.
I'm now leaning towards the following proposal.
1. Change the content model of textobject to:
<!ELEMENT textobject (objectinfo?, (phrase|textdata|(%textobject.mix;)+))>
2. Add a textdata element:
<!ELEMENT textdata EMPTY>
<!ATTLIST textdata
%common.attrib;
%objectdata.attrib;
%local.textdata.attrib;
%textdata.role.attrib;
>
Where objectdata.attrib contains (fileref, entityref, format, etc.)
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...
Be seeing you,
norm
[1] http://www.w3.org/TR/xinclude
--
Norman Walsh <ndw@nwalsh.com> | To create a little flower is the
http://www.oasis-open.org/docbook/ | labour of ages.--Blake
Chair, DocBook Technical Committee |
------------------------------------------------------------------
To unsubscribe from this elist send a message with the single word
"unsubscribe" in the body to: docbook-request@lists.oasis-open.org