Jonathan S. Shapiro wrote:

Dominique:

I seem to recall a note from you saying that you had built a transformer
that generated LaTeX from some form of XML input. If I am confused,
please forgive me.


You are correct (you always are :), but the peculiarity of my stuff is that the transformation language is Perl, not XSLT. So whitespace handling is a no-brainer for me.

Oh, at this point I might just as well pull a fast one on the list:

http://www.idealx.org/DocBkXML2LaTeX/

1. I know that there is some mechanism to canonicalize whitespace in
XSLT, which eliminates embedded newlines and collapses multiple spaces
into a single space. Do you know how this is done?


I don't know, but a concurrent project of mine does:

http://db2latex.sourceforge.net/

In the tarball there is a file named normalize-scape.mod.xsl, that appears to normalize space (sic). I don't know the specifics, but I threw the following test case at it,

word<footnote>

         <para>foo

bar</para>
         <para>

baz

</para>
       </footnote>

And the result is correct and good-looking, like:

word�

---
� foo bar
 baz

2. How did you emit intentional newlines when you handled paragraphs?

This too is correctly done by db2latex.sourceforge.net - a quick glance at para.mod.xsl yields

               <xsl:text>&#10;</xsl:text>

which looks very much like a literal newline to me.

3. Once the above problem is "solved", I will then need to discover how
to restore literal (raw) input processing in verbatim environments.


Again db2latex.sourceforge.net does this, and there is a file conspicuously named verbatim.mod.xsl inside the package (that I can't fathom :).

Regards,

--
<< Tout n'y est pas parfait, mais on y honore certainement les jardiniers >>

                        Dominique Quatravaux <[EMAIL PROTECTED]>


_______________________________________________ bitc-dev mailing list [email protected] http://www.coyotos.org/mailman/listinfo/bitc-dev

Reply via email to