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

 


Help: OASIS Mailing Lists Help | MarkMail Help

docbook-apps message

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


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


"Michael(tm) Smith" <smith@sideshowbarker.net>, 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/


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