Hi Bob! Thanks for the advice, after removing the xreflabels from the XML files, it worked like a charm! Then I decided to leave the tooltip text as it is, I don't want to modify the XSl files if it is not a must.
Zoltan Janosi University of Pannonia 2014-12-03 19:18 GMT+01:00 Bob Stayton <[email protected]>: > > Hi, > The xreflabel attribute is an override to the text that is otherwise > generated by the stylesheet for that element. See: > > http://www.sagehill.net/docbookxsl/CrossRefs.html#Xreflabel > > If you remove the xreflabel from the figure, and set the stylesheet param > named 'xref.with.number.and.title' to zero, then you will get "Figure 2.3" > as your link text. > > The tooltip text comes from the generated @title attribute of HTML <a> > element, and that is generated in the XSL by processing the figure in > mode="html.title.attribute". The default template for that is in > html/html.xsl. You can copy and customize that template in your > customization layer. If you set the match="figure" in your customization, > then it will only affect figures. Let me know if you need more help. > > Bob Stayton > Sagehill Enterprises > [email protected] > > On 12/3/2014 1:50 AM, Jánosi Zoltán János wrote: > >> Hi all! >> >> I'd like like to ask for some help from those who really understand the >> working of XSL. >> I am using Saxon to transform my DocBook 4.4 XML files to HTML and I'd >> like >> to change the way the links to images are generated. >> >> *Here is the XML code of a figure:* >> >> *<figure id="Bufferfly_abra" xreflabel="Bufferfly ábra">* >> * <title>Bufferfly ábra</title>* >> * <mediaobject>* >> * <imageobject>* >> * <imagedata .../>* >> * </imageobject>* >> * </mediaobject>* >> *</figure>* >> >> *Here is an XML reference to a figure:* >> >> *<xref linkend="Bufferfly_abra"/>* >> >> *After the XML->HTML conversion the code of image looks like this: (I >> stripped the unnecessary parts)* >> >> >> *<a name="Bufferfly_abra"></a>* >> *...* >> *<img src="..." alt="Bufferfly ábra">* >> >> *And the link to the image:* >> >> *<a class="xref" href="#Bufferfly_abra" title="6.22. ábra - Bufferfly >> ábra">Bufferfly ábra</a>* >> >> The point is that the text in link contains the full title of the image. >> Sometimes it can be very long. >> The other thing that the tooltip contains the full title of image plus it >> has a numbering. >> >> *I'd like to get this:* >> The text in link should contain only the numbering (eg. Figure 2.3) >> instead >> of the image title. >> Optional: The tooltip should contain only the title of image. (it is not >> so >> important :-) ) >> >> My question is: >> *Which XSL file (and which rule) should I modify and how**?** (in order to >> do this)* >> >> Any help appreciated. >> Thanx in advance! >> >> *Zoltan Janosi* >> >>
