← Prev in month ← Prev in thread
Next in thread → Next in month →

Generating HTML @title output for any inline element [was: SpecifyXHTML "<a title=..." in "<ulink ..."?]

From
Michael(tm) Smith <>
Date
2008-10-08T02:19:20+00:00
ID
20081008021910.GB13577@sideshowbarker
Thread
Generating HTML @title output for any inline element [was: SpecifyXHTML "<a title=..." in "<ulink ..."?]
"Michael(tm) Smith" <>, 2008-10-07 16:21 +0900:

>   - an <alt> child on any element -- e.g.,
>     <ulink...><alt>foo</alt></ulink> (see the simple.xlink
>     template in html/inline.xsl file)
> 
> you can't use xlink:href or xlink:title, but you can use
> <ulink...><alt>foo</alt></ulink>. That's not valid in DocBook 4,
> but that doesn't need to prevent you from using it. The
> stylesheets themselves are agnostic about validity.

It was pointed out to me off-list that alt as a child of ulink
doesn't actually work. Looking back at the code, I can see why
now. Anyway, it will work as a child of most inline elements,
including the phrase element -- which doesn't have any particular
semantics and can be used for cases like this where you just want
to hang an attribute on something.

So the following markup will work with the stock stylesheets:

  <ulink...><span><alt>title content</alt>text of link</span></ulink>

And <phrase>/<alt> will work with any case (not just for links)
where you want to mark up inline content and have a title
attribute generated for it. So you don't strictly need to do any
stylesheet customization to get the effect.

  --Mike

-- 
Michael(tm) Smith
http://people.w3.org/mike/
← Prev in month ← Prev in thread
Next in thread → Next in month →