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

 


Help: OASIS Mailing Lists Help | MarkMail Help

docbook message

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


Subject: Re: [docbook] links within classsynopsis?


Stephen Langer <stephen.langer@nist.gov> writes:

> I hope this isn't a silly question, but I can't find the answer.  Is  
> it possible to put links inside a classsynopsis?  I'd like to have  
> links from the class methods to their descriptions, which appear  
> later on in the refentry, like this:
[...]

If you use DocBook NG/5, you can mark it up like this:

  <refentry xmlns="http://docbook.org/ns/docbook";>
    <refnamediv>
      <refname>foo</refname>
      <refpurpose>bar</refpurpose>
    </refnamediv>
    <refsynopsisdiv>
      <classsynopsis>
        <ooclass><classname>hoge</classname></ooclass>
        <methodsynopsis>
          <methodname><link linkend="moge_discussion">moge</link></methodname>
          <void/>
        </methodsynopsis>
      </classsynopsis>
    </refsynopsisdiv>
    <refsection xml:id="moge_discussion">
      <title>moge</title>
      <para><methodname>moge</methodname> is a function.</para>
    </refsection>
  </refentry>

To get the same behavior with DocBook 4.4, you either need to
create a DTD customization layer or add some content to the
internal DTD subset of each of your document instances, like this:

  <!DOCTYPE refentry PUBLIC "-//OASIS//DTD DocBook XML V4.4//EN"
            "http://www.oasis-open.org/docbook/xml/4.4/docbookx.dtd";
  [
  <!ENTITY % local.smallcptr.char.mix "|link">
  ]
  >
  <refentry>
    <refnamediv>
      <refname>foo</refname>
      <refpurpose>bar</refpurpose>
    </refnamediv>
    <refsynopsisdiv>
      <classsynopsis>
        <ooclass><classname>hoge</classname></ooclass>
        <methodsynopsis>
          <methodname><link linkend="moge_discussion">moge</link></methodname>
          <void/>
        </methodsynopsis>
      </classsynopsis>
    </refsynopsisdiv>
    <refsection id="moge_discussion">
      <title>moge</title>
      <para><methodname>moge</methodname> is a function.</para>
    </refsection>
  </refentry>

The current CVS version of the DocBook XSL stylesheets will
correctly process both the DocBook NG/5 and DocBook 4.4 versions
above. You can try with the latest snapshot:

  http://docbook.sourceforge.net/snapshots/

The current official/released version (DocBook XSL 1.69.1) will
not (I just checked in the fix today).

  --Mike

-- 
Michael Smith
http://sideshowbarker.net/

smime.p7s



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