This is the mail archive of the docbook-apps@lists.oasis-open.org mailing list .


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

Re: Attribute `id' in <mediaobject>


/ Jean-Baptiste Quenot <jb.quenot@smartcanal.com> was heard to say:
| > This is a real problem. Anchors require  an <a> element, but you can't
| > have both an <a name="..."> and a <div id="...">.
| 
| I don't  understand what you  mean with anchors and  divs, but I  made a
| change to  your stylesheets  so that the  mediaobject's id  attribute is
| written to  HTML output, and it  works as expected.

It works as you expect in CSS, but if you made a link in your source:

  <link linkend="mediaobjectid">the image</link>

the resulting HTML documents wouldn't behave correctly when you clicked
on "the image". (Because there'd be no <a name="mediaobjectid"> tag in
the HTML.)

And unfortunately, this:

  <div id="mediaobjectid">
    <a name="mediaobjectid"></a>
    ...
  </div>

is not legal because both A NAME and DIV ID are of type "ID".

| > Do  you  really  want  to   have  different  CSS  selectors  for  each
| > mediaobject?  Isn't <div class="mediaobject"> sufficient?
| 
| No, it's not sufficient.  For my  last example, I must set the following
| style:
| 
| #man {
| »·······float: right;
| »·······margin: 20px;
| }

Can you tell us a little more about your markup and your formatting
requirements? I'm curious to know why you need precise control over
objects that are distinguished only by their ID.

| BTW couldn't the  mediaobject's 'float' attribute make  the images float
| as documented?  Or maybe my definition of floating is wrong?

Uh, what float attribute on mediaobject?

                                        Be seeing you,
                                          norm

-- 
Norman Walsh <ndw@nwalsh.com>      | One must look for one thing only,
http://www.oasis-open.org/docbook/ | to find many.--Cesare Pavese
Chair, DocBook Technical Committee |

------------------------------------------------------------------
To unsubscribe from this elist send a message with the single word
"unsubscribe" in the body to: docbook-apps-request@lists.oasis-open.org


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]