This is the mail archive of the
docbook-apps@lists.oasis-open.org
mailing list .
[docbook-apps] xml/groff: comments in text=>whitespace stripped?!
- From: Sam Steingold <sds at gnu dot org>
- To: docbook-apps at lists dot oasis-open dot org
- Date: 05 Jun 2003 19:22:50 -0400
- Subject: [docbook-apps] xml/groff: comments in text=>whitespace stripped?!
- Organization: disorganization
- Reply-to: sds at gnu dot org
I asked this question several times, and the silence is deafening.
please help!
xsl/groff stylesheet adds newline around comment element:
<xsl:template match="comment()">
<xsl:text> .\"</xsl:text> <!-- #\Newline . \ " -->
<xsl:variable name="content">
<xsl:call-template name="string.subst">
<xsl:with-param name="string"><xsl:value-of select="."/></xsl:with-param>
<xsl:with-param name="target" select="' '"/>
<xsl:with-param name="replacement" select="' .\"'"/>
</xsl:call-template>
</xsl:variable>
<xsl:value-of select="normalize-space($content)"/>
<xsl:if test="not(following-sibling::comment())">
<xsl:text> </xsl:text></xsl:if>
</xsl:template>
this works fine when the comment is surrounded by tags.
when the comment is inside text, like here:
<varlistentry id="opt-libdir"><term><option>-B</option>
<replaceable>lisp-lib-dir</replaceable></term>
<listitem><simpara>Specifies the installation directory.
This is the directory containing the linking sets and other data files.
<!-- #ifdef UNIX -->
This option is normally not necessary, because the installation directory
is already built-in in the <command>clisp</command> executable.
<!-- #endif -->
Directory <replaceable>lisp-lib-dir</replaceable> can be changed
dynamically using the symbol-macro <varname>*lib-directory*</varname>.
</simpara></listitem></varlistentry>
the above stylesheet does not work:
it produces
.TP
\fB\-B\fR \fIlisp\-lib\-dir\fR
Specifies the installation directory\&. This is the directory containing the linking sets and other data files\&. .\"#ifdef UNIX This option is normally not necessary, because the installation directory is already built\-in in the \fBclisp\fR executable\&. .\"#endif Directory \fIlisp\-lib\-dir\fR can be changed dynamically using the symbol\-macro \fI*lib\-directory*\fR\&.
instead of
.TP
\fB\-B\fR \fIlisp\-lib\-dir\fR
Specifies the installation directory\&. This is the directory containing the linking sets and other data files\&.
.\"#ifdef UNIX
This option is normally not necessary, because the installation directory is already built\-in in the \fBclisp\fR executable\&.
.\"#endif
Directory \fIlisp\-lib\-dir\fR can be changed dynamically using the symbol\-macro \fI*lib\-directory*\fR\&.
I use the latest xsl stylesheets (1.61.2)
--
Sam Steingold (http://www.podval.org/~sds) running RedHat9 GNU/Linux
<http://www.camera.org> <http://www.iris.org.il> <http://www.memri.org/>
<http://www.mideasttruth.com/> <http://www.palestine-central.com/links.html>
"Complete Idiots Guide to Running LINUX Unleashed in a Nutshell for Dummies"
---------------------------------------------------------------------
To unsubscribe, e-mail: docbook-apps-unsubscribe@lists.oasis-open.org
For additional commands, e-mail: docbook-apps-help@lists.oasis-open.org