Re: XDocs document-v20: how to prevent duplication of values of alt + title attributes of img elements?

David Crossley <[email protected]>
Newsgroups gmane.text.xml.forrest.devel
Message-ID <[email protected]>
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
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.