Adam DiCarlo <[EMAIL PROTECTED]> �crivait : � Osamu Aoki <[EMAIL PROTECTED]> writes: � � > I was also checking Debiandoc2docbookxml and it seems to convert: � > Concersion result of font used in : SGML tag used in � > debiandoc Debiandoc2docbookxml : debiandoc : Junichi's document � > � > package -> application : TT : productname � � I don't like either alternative here. IMHO the right thing � <systemitem role="package">. � � > file -> application : TT : filename � Cleaerly should be filename. Perhaps if it has a trailing slash, � should be <filename class="directory"> ? � � > prgn -> application : TT : command � � <command> is the right thing here. � � > tt -> application : TT : type � � Both are wrong, IMHO; use <token> or <literal>. � � > var -> application : italics : parameter � � <replacable> is the right tag. � � > example -> literallayout : TT : screen � � Hmm. Good one. I'd have to play with it. Both might be right for � some situations. � � > strong -> emphasis � > em -> emphasis : -- : emphasis � � I think <emphasis> is right for both. � � > heading -> (larger) : title � � Doesn't this get moved in Debiandoc2docbookxml to sectional titles? � � Philippe, can you make this so? Or do you have objections to how I � laid it out? Done. Here is the new book.xml for testing. I have just tried with policy.sgml and nsgmls said : SGML validation finished at Tue Dec 10 09:40:52.
(But, sorry, not at home until Wednesday 12) -- Philippe Batailler in girum imus nocte et consumimur igni
<!-- This file is part of Debiandoc2docbookxml book.xml --> <xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform"> <xsl:output version="1.0" method="xml" indent="yes" encoding="iso-8859-1" omit-xml-declaration="yes"/> <xsl:template match="debiandoc"> <xsl:apply-templates/> </xsl:template> <xsl:template match="book"> <book> <xsl:if test="@id!=''"> <xsl:attribute name="id"> <xsl:value-of select="@id"/> </xsl:attribute> </xsl:if> <xsl:apply-templates/></book> </xsl:template> <xsl:template match="titlepag"> <xsl:apply-templates select="title"/> </xsl:template> <xsl:template match="title"> <title><xsl:apply-templates/></title> <bookinfo> <xsl:apply-templates select="following-sibling::*" mode="info"/> </bookinfo> </xsl:template> <xsl:template match="author" mode="info"> <author><xsl:apply-templates mode="info"/></author> </xsl:template> <xsl:template match="name" mode="info"> <firstname> <xsl:value-of select="substring-before(.,' ')"/> </firstname> <surname> <xsl:value-of select="substring-after(.,' ')"/> </surname> </xsl:template> <xsl:template match="author/email" mode="info"> <affiliation><address><email> <xsl:apply-templates mode="info"/> </email></address></affiliation> </xsl:template> <xsl:template match="email" mode="info"> <address><email><xsl:apply-templates mode="info"/></email></address> </xsl:template> <xsl:template match="version" mode="info"> <releaseinfo> <xsl:comment> mettre la version </xsl:comment> </releaseinfo> <pubdate> <xsl:comment> mettre la date </xsl:comment> </pubdate> </xsl:template> <xsl:template match="abstract" mode="info"> <abstract> <para> <xsl:apply-templates/> </para></abstract> </xsl:template> <xsl:template match="copyright" mode="info"> <copyright> <year> <xsl:comment> mettre ici la date </xsl:comment> </year> <holder> <xsl:comment> mettre ici les noms </xsl:comment> </holder> </copyright> <legalnotice><xsl:apply-templates/></legalnotice> </xsl:template> <xsl:template match="copyrightsummary"/> <!-- les listes --> <xsl:template match="enumlist"> <orderedlist><xsl:apply-templates/></orderedlist> </xsl:template> <xsl:template match="item"> <listitem><xsl:apply-templates/></listitem> </xsl:template> <xsl:template match="list"> <itemizedlist><xsl:apply-templates/></itemizedlist> </xsl:template> <xsl:template match="taglist"> <variablelist> <xsl:apply-templates select="tag[not(preceding-sibling::*[1]/self::tag)]" mode="entree"/> </variablelist> </xsl:template> <xsl:template match="tag" mode="entree"> <varlistentry> <term><xsl:apply-templates/></term> <xsl:apply-templates select="following-sibling::*[1]" mode="liste"/> </varlistentry> </xsl:template> <xsl:template match="tag" mode="liste"> <term><xsl:apply-templates/></term> <xsl:apply-templates select="following-sibling::*[1]" mode="liste"/> </xsl:template> <xsl:template match="item" mode="liste"> <listitem><xsl:apply-templates/></listitem> </xsl:template> <xsl:template match="p"> <para><xsl:apply-templates/></para> </xsl:template> <!-- chapitre et sections --> <xsl:template match="chapt"> <chapter> <xsl:if test="@id!=''"> <xsl:attribute name="id"> <xsl:value-of select="@id"/> </xsl:attribute> </xsl:if> <xsl:apply-templates/> </chapter> </xsl:template> <xsl:template match="appendix"> <appendix> <xsl:if test="@id!=''"> <xsl:attribute name="id"> <xsl:value-of select="@id"/> </xsl:attribute> </xsl:if> <xsl:apply-templates/> </appendix> </xsl:template> <xsl:template match="sect"> <sect1> <xsl:if test="@id!=''"> <xsl:attribute name="id"> <xsl:value-of select="@id"/> </xsl:attribute> </xsl:if> <xsl:apply-templates/> </sect1> </xsl:template> <xsl:template match="sect1"> <sect2> <xsl:if test="@id!=''"> <xsl:attribute name="id"> <xsl:value-of select="@id"/> </xsl:attribute> </xsl:if> <xsl:apply-templates/> </sect2> </xsl:template> <xsl:template match="sect2"> <sect3> <xsl:if test="@id!=''"> <xsl:attribute name="id"> <xsl:value-of select="@id"/> </xsl:attribute> </xsl:if> <xsl:apply-templates/> </sect3> </xsl:template> <xsl:template match="sect3"> <sect4> <xsl:if test="@id!=''"> <xsl:attribute name="id"> <xsl:value-of select="@id"/> </xsl:attribute> </xsl:if> <xsl:apply-templates/> </sect4> </xsl:template> <xsl:template match="sect4"> <sect5> <xsl:if test="@id!=''"> <xsl:attribute name="id"> <xsl:value-of select="@id"/> </xsl:attribute> </xsl:if> <xsl:apply-templates/> </sect5> </xsl:template> <xsl:template match="heading"> <title><xsl:apply-templates/></title> </xsl:template> <xsl:template match="ref"> <xref> <xsl:attribute name="linkend"> <xsl:value-of select="@id"/> </xsl:attribute> <xsl:apply-templates/> </xref> </xsl:template> <xsl:template match="qref"> <link> <xsl:attribute name="linkend"> <xsl:value-of select="@id"/> </xsl:attribute> <xsl:apply-templates/> </link> </xsl:template> <xsl:template match="url"> <ulink> <xsl:attribute name="url"> <xsl:value-of select="@id"/> </xsl:attribute> <xsl:if test="@name=''"> <xsl:value-of select="@id"/> </xsl:if> <xsl:value-of select="@name "/> </ulink> </xsl:template> <!-- les sur la ligne --> <xsl:template match="strong|em"> <emphasis><xsl:apply-templates/></emphasis> </xsl:template> <xsl:template match="tt"> <literal><xsl:apply-templates/></literal> </xsl:template> <xsl:template match="var"> <replaceable><xsl:apply-templates/></replaceable> </xsl:template> <xsl:template match="example"> <literallayout><xsl:apply-templates/></literallayout> </xsl:template> <xsl:template match="comment"> <remark><xsl:apply-templates/></remark> </xsl:template> <xsl:template match="comment/p"> <phrase><xsl:apply-templates/></phrase> </xsl:template> <xsl:template match="file"> <filename><xsl:apply-templates/></filename> </xsl:template> <xsl:template match="package"> <systemitem> <xsl:attribute name="role">package</xsl:attribute> <xsl:apply-templates/></systemitem> </xsl:template> <xsl:template match="prgn"> <command><xsl:apply-templates/></command> </xsl:template> <!-- les renvois --> <xsl:template match="ftpsite|httpsite"> <emphasis><xsl:apply-templates/></emphasis> </xsl:template> <xsl:template match="ftppath|httppath"> <filename><xsl:apply-templates/></filename> </xsl:template> <xsl:template match="manref"> <citerefentry> <refentrytitle> <xsl:value-of select="@name"/> </refentrytitle> <manvolnum> <xsl:value-of select="@section"/> </manvolnum> </citerefentry> </xsl:template> <xsl:template match="comment()"> <xsl:comment> <xsl:value-of select="."/> </xsl:comment> </xsl:template> <xsl:template match="date"> <xsl:comment> Mettre la date dans la version </xsl:comment> </xsl:template> <xsl:template match="toc"/> <xsl:template match="@*|node()"> <xsl:copy><xsl:apply-templates match="@*|node()"/></xsl:copy> </xsl:template> </xsl:stylesheet>

