OASIS Mailing List ArchivesView the OASIS mailing list archive below
or browse/search using MarkMail.


Help: OASIS Mailing Lists Help | MarkMail Help

docbook-apps message

[Date Prev] | [Thread Prev] | [Thread Next] | [Date Next] -- [Date Index] | [Thread Index] | [List Home]

Subject: Re: [docbook-apps] Adding a link insided <funcprototype>

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="."/>
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
----- Original Message -----
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"

   <refsynopsisdiv xmlns:xlink=
               <funcdef><link xlink:href="url.html#one">returnType</link>
               <paramdef><link xlink:href="url.html#two">paramType</link>

Here is our minimal test stylesheet:

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

What are we missing? Any ideas will be most appreciated.
Kathleen Mattson
Beaverton, Oregon USA

[Date Prev] | [Thread Prev] | [Thread Next] | [Date Next] -- [Date Index] | [Thread Index] | [List Home]