Mailing List Archive

XDocs document-v20: how to prevent duplication of values of alt + title attributes of img elements?
When I want the value of both the alt and title attributes of an img
element in an XDocs document-v20 document to be equal, how can I prevent
duplicating the value by copying and pasting it? Can I declare the
value of one attribute to use the value of another attribute?

--
A: Yes.
> Q: Are you sure?
>> A: Because it reverses the logical flow of conversation.
>>> Q: Why is top posting annoying?
Re: XDocs document-v20: how to prevent duplication of values of alt + title attributes of img elements? [ In reply to ]
Brolin Empey wrote:
>
> When I want the value of both the alt and title attributes of an img
> element in an XDocs document-v20 document to be equal, how can I prevent
> duplicating the value by copying and pasting it? Can I declare the
> value of one attribute to use the value of another attribute?

Sorry, i have no idea what you mean.

-David
Re: XDocs document-v20: how to prevent duplication of values of alt + title attributes of img elements? [ In reply to ]
David Crossley wrote:
> Brolin Empey wrote:
>>
>> When I want the value of both the alt and title attributes of an img
>> element in an XDocs document-v20 document to be equal, how can I prevent
>> duplicating the value by copying and pasting it? Can I declare the
>> value of one attribute to use the value of another attribute?
>
> Sorry, i have no idea what you mean.

Let me provide an example:

<img src="foo.png" alt="foo" title="foo"/>

How can I avoid duplicating “foo” in the value of the alt and title
attributes of the img element?

Can I declare the value of the title attribute to equal the value of the
alt attribute?
Re: XDocs document-v20: how to prevent duplication of values of alt + title attributes of img elements? [ In reply to ]
Brolin Empey wrote:
> David Crossley wrote:
> >Brolin Empey wrote:
> >>
> >>When I want the value of both the alt and title attributes of an img
> >>element in an XDocs document-v20 document to be equal, how can I prevent
> >>duplicating the value by copying and pasting it? Can I declare the
> >>value of one attribute to use the value of another attribute?
> >
> >Sorry, i have no idea what you mean.
>
> Let me provide an example:
>
> <img src="foo.png" alt="foo" title="foo"/>
>
> How can I avoid duplicating “foo” in the value of the alt and title
> attributes of the img element?
>
> Can I declare the value of the title attribute to equal the value of the
> alt attribute?

You would need to tweak the stylesheets.

Assuming that you use the "pelt" skin:

]$ cd $FORREST_HOME/main/webapp/skins
]$ find common pelt -name "*.xsl" | xargs grep -w img
...
...
]$ find common pelt -name "*.xsl" | xargs grep -l -w img
common/xslt/html/document-to-html.xsl
common/xslt/html/renderlogo.xsl
common/xslt/html/site-to-xhtml.xsl
common/xslt/html/tab-to-menu.xsl
pelt/xslt/html/document-to-html.xsl
pelt/xslt/html/site-to-xhtml.xsl

Somewhere in there will handle the img element.

-David