[Date Prev] | [Thread Prev] | [Thread Next] | [Date Next] -- [Date Index] | [Thread Index] | [Elist Home]
Subject: Re: DOCBOOK-APPS: Need help including c source
> From: Daniel Veillard <veillard@redhat.com> > > On Thu, Oct 18, 2001 at 10:42:53AM -0700, Bob Stayton wrote: > > > From: Yann Dirson <ydirson@alcove.fr> > > > > > > On Thu, Oct 18, 2001 at 09:12:49AM -0700, Eric Richardson wrote: > > > > I'm trying to include C source into docbook but I'm having problems with > > > > the #include <stdio.h>. I really would like to have the source compile > > > > as is and include as is into the document. > > > > > > Instead of using an entity, you can use: > > > > > > <imagedata fileref="foo.c" format="linespecific"> > > > > > > That roughly means, consider foo.c as an image encoded in the > > > "linespecific" format - not a common way of looking at things, but > > > semantically correct I think. > > > > > > docbook-dsssl 1.73 should work out-of-the box with this construct, I > > > don't know for sure about docbook-xsl, which I don't use. > > > > Docbook-xsl should handle it if you are using Saxon or > > Xalan processors, but not libxslt yet. It requires > > setting the params 'use.extensions' and > > 'textinsert.extension' to 1 so the text > > insertion extensions in Saxon or Xalan will be utilized. > > Embedding source examples is really important. > Is there a description of those extension ? A pointer > would be welcome. I assume foo.c is an URI-Reference. You would have to ask Norm about descriptions of the extensions. The Saxon extension is called from the graphics.xsl stylesheet file as follows: <xsl:when test="contains($vendor, 'SAXON')"> <stext:insertfile href="{$filename}"/> </xsl:when> using this namespace: xmlns:stext="http://nwalsh.com/xslt/ext/com.nwalsh.saxon.TextFactory" and the source code located in the XSL distribution in: extensions/saxon643/com/nwalsh/saxon/TextFactory.java Don't ask me for an explanation, though. 8^) bobs Bob Stayton 400 Encinal Street Publications Architect Santa Cruz, CA 95060 Technical Publications voice: (831) 427-7796 Caldera International, Inc. fax: (831) 429-1887 email: bobs@caldera.com
[Date Prev] | [Thread Prev] | [Thread Next] | [Date Next] -- [Date Index] | [Thread Index] | [Elist Home]
Powered by eList eXpress LLC