Re: [docbook-apps] Generating title for "link" element

From
Bob Stayton <>
Date
2010-12-09T17:24:17+00:00
ID
02ae01cb97c5$e21639d0$6600a8c0@pazu
Thread
Re: [docbook-apps] Generating title for "link" element
OK, the stylesheets are set up to generate common 
attributes, but not all of them are turned on.  In the case of the title 
attribute, it can be generated by creating a template in your customization 
layer with a match on link element and mode="html.title.attribute", and the 
stylesheet will insert it on the <a> output element for 
link: 

 

<xsl:template match="link" 
mode="html.title.attribute">
  <xsl:attribute 
name="title">
    <xsl:apply-templates/>
  
</xsl:attribute>
</xsl:template>

Bob Stayton
Sagehill Enterprises


 

 

  
----- Original Message ----- 

  
From: 
  redlettucemail 

  
To:  
  

  
Sent: Thursday, December 09, 2010 1:36 
  AM

  
Subject: Re: [docbook-apps] Generating 
  title for "link" element

  

  
Bob,

  
Yes, I would like a title attribute on the <a> element. I can 
  specify a title for xlink:title, but the XML is then not valid. I can, 
  however, still transform it to XHTML, but the title does not appear within the 
  <a> element in the XHTML code. I can see that in the stylesheet 
  inline.xsl, template "simple.xlink" SHOULD generate a title, but does not. I 
  have declared xlink correctly in all my stylesheets. 

  
 

  
So because the inline stylesheet doesn't work, I'm looking for a 
  workaround that lets me generate an <a> title from the content of the 
  link element. 
 
Dave 
Gardiner