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] Re: xml/groff: comments in text=>whitespace stripped?!


> * In message <20030608175020.GE30636@redhat.com>
> * On the subject of "Re: Re: xml/groff: comments in text=>whitespace stripped?!"
> * Sent on Sun, 8 Jun 2003 18:50:20 +0100
> * Honorable Tim Waugh <twaugh@redhat.com> writes:
>
> On Sun, Jun 08, 2003 at 12:47:34PM -0400, Sam Steingold wrote:
> 
> > this would work just fine.
> > 
> > 1. apply templates
> > 2. replace newlines with a special non-white character, e.g. NULL
> > 3. normalize-space
> > 4. replace [space NULL] with newline and then [NULL] with newline.
> > 
> > Tim, could you please consider this?
> > 
> > note that the current XSL/groff style sheets are broken here...
> 
> Step 4 looks like it could end up being very slow.
> 
> Do you have a suggestion for a reasonable implementation?

why would 4 be slower than 2?

what's wrong with:

  <xsl:call-template name="string.subst">
   <xsl:with-param name="string"><xsl:value-of select="."/></xsl:with-param>
   <xsl:with-param name="target" select="'&#32;&#0;'"/>
   <xsl:with-param name="replacement" select="'&#10;'"/>
  </xsl:call-template>

  <xsl:call-template name="string.subst">
   <xsl:with-param name="string"><xsl:value-of select="."/></xsl:with-param>
   <xsl:with-param name="target" select="'&#0;'"/>
   <xsl:with-param name="replacement" select="'&#10;'"/>
  </xsl:call-template>


PS. note that currently <itemizedlist> nested in a <para> is converted
into straight text with embedded ".TP o " strings:

<varlistentry id="completion"><term>Tab key</term>
 <listitem><para>Context sensitive:
   <itemizedlist><listitem><simpara>If you are in the "function
      position" (in the first symbol after an opening paren or in the
      first symbol after a <command>#'</command>), the completion is
      limited to the symbols that name functions.</simpara></listitem>
    <listitem><simpara>If you are in the "filename position" (inside a
      string after <command>#P</command>), the completion is done
      across file names, <ulink url="http://www.gnu.org/software/bash/";>bash</ulink>-style.</simpara></listitem>
    <listitem><simpara>If you have not typed anything yet, you will get
      a help message, as if by the
      <ulink url="impnotes.html#debugger-main-deb-step"><command>Help</command></ulink>
      command.</simpara></listitem>
    <listitem><simpara>If you have not started typing the next symbol
      (i.e., you are at a whitespace), the current function or macro is
      &describe;d.</simpara></listitem>
    <listitem><simpara>Otherwise, the symbol you are currently typing is
      completed.</simpara></listitem></itemizedlist>
</para></listitem></varlistentry>

.TP
Tab key
Context sensitive: .TP 3 \(bu If you are in the "function position" (in the first symbol after an opening paren or in the first symbol after a \fB#'\fR), the completion is limited to the symbols that name functions\&. .TP \(bu If you are in the "filename position" (inside a string after \fB#P\fR), the completion is done across file names, bash\-style\&. .TP \(bu If you have not typed anything yet, you will get a help message, as if by the \fBHelp\fR command\&. .TP \(bu If you have not started typing the next symbol (i\&.e\&., you are at a whitespace), the current function or macro is \fBDESCRIBE\fRd\&. .TP \(bu Otherwise, the symbol you are currently typing is completed\&. .LP


is I move the <itemizedlist> outside of <para> (directly inside
<listitem>), I get a running text - no itemization - but without the
".TP" garbage.  hardly any better.



-- 
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>
Trespassers will be shot.  Survivors will be SHOT AGAIN!


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