Hi Kathleen,
I think the basic problem with using link here is that it is not a valid child 
of funcdef according to the DTD.  So there is no stylesheet template for link 
in the mode used for any of the four styles of synopsis.  You could get it to 
work by adding a template of your own to your customization layer (here using 
the default style mode):

<xsl:template match="link" mode="kr-tabular">
  <xsl:apply-templates select="."/>
</xsl:template>

At the risk of sounding pedantic, I'll point out that you seem to be mixing 
your DocBook 4 and 5 syntaxes in your link element.  The Docbook MathML DTD 
that your DOCTYPE references is based on DocBook 4, in which the link element 
uses @linkend.  The @xlink:href attribute was introduced in DocBook 5.  The 
DocBook stylesheets are designed to process both DocBook 4 and 5, so it will 
work.


Bob Stayton
Sagehill Enterprises
[email protected]


  ----- Original Message ----- 
  From: Kathleen Mattson 
  To: [email protected] 
  Sent: Saturday, September 05, 2009 11:31 AM
  Subject: [docbook-apps] Adding a link insided <funcprototype>


  Hi all.

  We're transforming XML in to HTML. We're trying to write a C function 
prototype with the proper tagging to generate an anchor tag for certain parts. 
For example, in the text 

  returnType functionName (paramType  *paramName); 

  we would want <a...> anchor tags with an external URL target to be generated 
for returnType and paramType. We tried using <link> as shown in the following 
XML, but the N. Walsh DocBook stylesheets ignore the <link> and no anchor tags 
gets generated: 

  <?xml version="1.0" encoding="UTF-8"?> 

  <!DOCTYPE book PUBLIC "-//OASIS//DTD DocBook MathML Module V1.1b1//EN" 
               
"http://www.oasis-open.org/docbook/xml/mathml/1.1CR1/dbmathml.dtd";> 

  <refentry> 
     <refsynopsisdiv xmlns:xlink="http://www.w3.org/1999/xlink";> 
         <funcsynopsis> 
             <funcprototype> 
                 <funcdef><link xlink:href="url.html#one">returnType</link> 
                     <function>functionName</function> 
                 </funcdef> 
                 <paramdef><link xlink:href="url.html#two">paramType</link> 
                     <parameter>*paramName</parameter> 
                 </paramdef> 
             </funcprototype> 
         </funcsynopsis> 
    </refsynopsisdiv> 
  </refentry> 

  Here is our minimal test stylesheet: 

  <?xml version='1.0'?> 
  <xsl:stylesheet 
    xmlns:xsl="http://www.w3.org/1999/XSL/Transform"; version="1.0"> 
   <xsl:import 
href="http://docbook.sourceforge.net/release/xsl/current/xhtml/docbook.xsl"/> 
  </xsl:stylesheet> 

  What are we missing? Any ideas will be most appreciated. 
-- 
Kathleen Mattson
www.millermattson.com
[email protected]
Beaverton, Oregon USA
503-690-4351

Reply via email to