[bitc-dev] XSLT question
dom at kilimandjaro.dyndns.org
Sun Apr 10 02:52:47 EDT 2005
Jonathan S. Shapiro wrote:
>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:
>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:
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,
And the result is correct and good-looking, like:
² foo bar
>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
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
<< Tout n'y est pas parfait, mais on y honore certainement les jardiniers >>
Dominique Quatravaux <dom at kilimandjaro.dyndns.org>
More information about the bitc-dev