[Date Prev] | [Thread Prev] | [Thread Next] | [Date Next] -- [Date Index] | [Thread Index] | [List Home]
Subject: Re: [docbook-apps] xsl-stylesheets/manpages
On Mon, May 19, 2003 at 06:50:26PM +0200, Alain PORTAL wrote: > Le Lundi 19 Mai 2003 18:15, Tim Waugh a écrit : > > On Mon, May 19, 2003 at 05:43:49PM +0200, Alain PORTAL wrote: > > > <?xml version='1.0' encoding="ISO-8859-15"?> > > > <!DOCTYPE article PUBLIC "-//OASIS//DTD DocBook XML V4.1.2//EN" > > > "/usr/share/sgml/docbook/xml-dtd-4.1.2-1.0-8/docbookx.dtd"> > > > > I think you meant to use: > > > > <!DOCTYPE article PUBLIC "-//OASIS//DTD DocBook XML V4.1.2//EN" > > "http://www.oasis-open.org/docbook/xml/4.1.2/docbookx.dtd"> > > This is the directory where is the dtd from the RedHat rpm package > docbook-dtds-1.0-8.noarch.rpm > > The original (from openjade.xml) is > <?xml version='1.0'?> > <!DOCTYPE article PUBLIC "-//OASIS//DTD DocBook XML V4.1.2//EN" > "/usr/share/sgml/docbook/xml-dtd-4.1.2/docbookx.dtd"> It is better to use the http:// form. > > Your article contains no <refentry> elements. > > Yes, of course, I didn't send the whole source (30.1Kb), only the articleinfo. > Here is a bigger piece of the source : Oh, I see. Well, the placing of the AUTHORS section is hard-coded at the moment (as is its name, unfortunately). As for handling <othercredit>, please try the attached stylesheet. Use 'xmlto -x ./docbook.xsl ...'. Tim. */
<?xml version='1.0'?> <!-- vim:set sts=2 shiftwidth=2 syntax=sgml: --> <xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version='1.0'> <xsl:import href="/usr/share/sgml/docbook/xsl-stylesheets/manpages/docbook.xsl"/> <xsl:template match="articleinfo|bookinfo|refentryinfo" mode="authorsect"> <xsl:text>.SH AUTHOR</xsl:text> <xsl:if test="count(.//author)>1"> <xsl:text>S</xsl:text> </xsl:if> <xsl:text> </xsl:text> <xsl:for-each select=".//author"> <xsl:if test="position() > 1"> <xsl:text>, </xsl:text> </xsl:if> <xsl:variable name="author"> <xsl:apply-templates select="."/> </xsl:variable> <xsl:value-of select="normalize-space($author)"/> </xsl:for-each> <xsl:text>. </xsl:text> <xsl:if test=".//editor"> <xsl:text>.br Man page edited by </xsl:text> <xsl:apply-templates select=".//editor"/> <xsl:text>. </xsl:text> </xsl:if> <xsl:for-each select=".//othercredit"> <xsl:text>.br </xsl:text> <xsl:value-of select="@role"/> <xsl:text>: </xsl:text> <xsl:variable name="credit"> <xsl:apply-templates select="."/> </xsl:variable> <xsl:value-of select="normalize-space($credit)"/> <xsl:text>. </xsl:text> </xsl:for-each> </xsl:template> <xsl:template match="author|editor|othercredit"> <xsl:call-template name="person.name"/> <xsl:apply-templates select="./affiliation/address/email" /> </xsl:template> </xsl:stylesheet>
[Date Prev] | [Thread Prev] | [Thread Next] | [Date Next] -- [Date Index] | [Thread Index] | [List Home]