This might be an interesting question to ask Norm Walsh. There was an early
design decision in DocBook development that allowed block elements inside
para. Currently para can contain many block elements, including tables,
admonitions, lists, etc. (but not para). I'm sure there were good
arguments at the time for such a design, but I have never liked it. The
simpara element (simple para) was created for those who don't want such a
structure. The simpara element does not allow other block elements, only
inline elements.
But because para allows block elements, it does not provide sufficient
context to distinguish between a nested block graphic and an inline graphic,
hence the need for both mediaobject and inlinemediaboject. Removing the
inline* elements would mean changing the structure of the para element,
which would not be backwards compatible with existing DocBook documents.
Not that this is an argument for such design, but I find it interesting that
the p element in DITA also allows nested block elements.
Bob Stayton
Sagehill Enterprises
[EMAIL PROTECTED]
----- Original Message -----
From: <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>; <[email protected]>
Sent: Saturday, April 26, 2008 9:48 AM
Subject: RE: [docbook-apps] Re: DocBook 5.x - the difference between
mediaobject and inlinemediaobject
The difference between them might be clearer to you if you try it with a
20x20 pixel PNG file instead. When inlined, the PNG file will sit in
the same line of text, just as this X is in this line of text. With the
other tag, it gets broken out into its own "paragraph", as you'd use for
a separate illustration.
<
I have just recently been grappling with this myself. My opinion is that the
DocBook markup should not be determining whether a graphic is displayed as a
block or inline, any more than it should be determining if something comes
out bold or italic. Both are presentational decisions that can be determined
at the time the output is generated.
The fact that you can put both inside a paragraph merely underscores this
point. We're currently using DocBook 4.0 and the <graphic> element, but it
seeems to behave the same way. Both of these are valid:
<para><inlinegraphic fileref="myfile.png" /></para>
<para><graphic fileref="myfile.png" /></para>
As far as I'm concerned, whenever a graphic appears inside a paragraph, it
is necessarily inline, and these bits of markup should generate exactly the
same output. But when transforming the 2nd one to HTML (using some
admittedly older stylesheets), we get nested paragraphs, which is not even
valid HMTL:
<p><p><img src="myfile.png " /></p></p>
I would think we could get rid of the <inline...> tags and just have the
transforms determine the flow from the context.
Rob Cavicchio
Principal Technical Writer
EMC Captiva
EMC Corporation
10145 Pacific Heights Boulevard, 6th Floor
San Diego, CA 92121-4234
P: (858) 320-1208
F: (858) 320-1010
E: [EMAIL PROTECTED]
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]