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: Re: [docbook-apps] long alt text

One could consider this to be a bug in the stylesheet.  At the point where
the phrase is processed into an alt attribute value, I think the
normalize-space() function should be applied to it.  I can't see any reason
to keep extra white space in an attribute value such as alt.

If you want to fix this yourself, copy the template named
'process.image.attributes' from html/graphics.xsl to your customization
layer and change this:

      <xsl:value-of select="$alt"/>

to this:

      <xsl:value-of select="normalize-space($alt)"/>

If no one objects, I'll make that change in the source.

Bob Stayton
Sagehill Enterprises
DocBook Consulting

----- Original Message ----- 
From: "Chris Chiasson" <chris.chiasson@gmail.com>
To: <docbook-apps@lists.oasis-open.org>
Sent: Wednesday, February 22, 2006 10:29 PM
Subject: [docbook-apps] long alt text

Hello docbook-apps,

Markup like the following

            <imagedata fileref="pr1/pr1_screenshot_2.png" />

            <phrase>This diagram is a code flow chart for the Project 1
            routine for finding a bounded minimum.</phrase>

is producing

<div class="screenshot"><div class="mediaobject"><img
src="pr1/pr1_screenshot_2.png" alt="This diagram is a code flow chart
for the Project 1&#10;            routine for finding a bounded

In longer alt texts, the "&#10;            " is appearing multiple
times. This appears to be related to the line wrapping that XXE
automatically applies to the source xml. So, uh, does anyone know a
way around this alt text problem?

from my Makefile:
XMLLINTOPTS=--xinclude --postvalid --noent --nonet

Thank you for your time,

To unsubscribe, e-mail: docbook-apps-unsubscribe@lists.oasis-open.org
For additional commands, e-mail: docbook-apps-help@lists.oasis-open.org

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