This is the mail archive of the docbook-apps@lists.oasis-open.org mailing list .


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[docbook-apps] xsl/groff: newlines added by XSL in text are stripped!


my xsl/groff stylesheet added newline around comment element:

<xsl:template match="comment()">
 <xsl:text>&#10;.&#92;&#34;</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="'&#10;'"/>
   <xsl:with-param name="replacement" select="'&#10;.&#92;&#34;'"/>
  </xsl:call-template>
 </xsl:variable>
 <xsl:value-of select="normalize-space($content)"/>
 <xsl:if test="not(following-sibling::comment())">
  <xsl:text>&#10;</xsl:text></xsl:if>
</xsl:template>

when the newline becomes a part of text (i.e., the previous-sibling or
following-sibling is text), it is eventually killed.
E.g.,

<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>

is translated to 


.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\&.


and not to

.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\&.


Is there a way to counter this?



-- 
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>
Our business is run on trust.  We trust you will pay in advance.


---------------------------------------------------------------------
To unsubscribe, e-mail: docbook-apps-unsubscribe@lists.oasis-open.org
For additional commands, e-mail: docbook-apps-help@lists.oasis-open.org


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]