This is the mail archive of the
docbook@lists.oasis-open.org
mailing list for the DocBook project.
Re: xref into another document?
On Friday 27 December 2002 23:26, Jirka Kosek wrote:
> Michael Schuerig wrote:
> > I'm using docbook-website to build my site and I'd like to create
> > xrefs among pages. There's nothing special about website, so it
> > comes down to creating xrefs into other documents.
>
> Website stylesheets can deal with olinks:
>
> You must at first declare external binary entity in internal subset:
>
> <!ENTITY software SYSTEM "software.xml" NDATA XML>
>
> and then reference it in olink:
>
> <olink targetdocent="software" localinfo="emacs">Install
> Emacs</olink>
Yes, I know, but that's not what I want to do. I would like to write
something like
<xref targetdocent="software" linkend="emacs"/>
and have the stylesheet generate the link text as appropriate.
The docbook stylesheets already contain a general mechanism for doing
this within a single document. I've customized them with the addition
of tags for bookreview. For the purpose of cross-referencing between
reviews I'm using xref and my customization hooks into the link text
generation with this template
<xsl:template match="bookreview" mode="xref-to">
<em><xsl:value-of select="title"/></em>
</xsl:template>
(The complete stylesheets are linked from
http://www.schuerig.de/michael/about.html)
Michael
--
Michael Schuerig If at first you don't succeed...
mailto:schuerig@acm.org try, try again.
http://www.schuerig.de/michael/ --Jerome Morrow, "Gattaca"