[erlang-questions] xslt question: building the Erlang FAQ

Matthias Lang matthias@REDACTED
Wed May 8 10:59:31 CEST 2013


Hi,

Something, I suspect xsltproc, is eating the non-ASCII characters in
the Erlang FAQ. I'm hoping someone here can give me a clue what it is.

The Erlang FAQ is generated using the same tools as the rest of the
Erlang documentation. But the transformation on erlang.org drops
letters, whereas the same transformation on my PC works fine:

           Source:  <em>Erlang Programmation</em> (Mickaël Rémond)
    On erlang.org:  <strong>Erlang Programmation</strong> (Mickal Rmond)
  Output on my PC:  <strong>Erlang Programmation</strong> (Mickaël Rémond)

Can someone give me a clue as to what's going on?
Can anyone reproduce the bad version? I can't.
I have a workaround, but I'd prefer to know why it's going wrong.


More information
----------------

The Erlang FAQ source is on github:

   https://github.com/matthiasl/Erlang-FAQ

just type 'make' to build it on *nix machines, assuming you have
xsltproc installed. Here's what it looks like on my machine:

   Erlang-FAQ >make
   erl_docgen_privdir=`escript erl_docgen_privdir.escript`; \
           date=`date +"%B %e %Y"`; \
           xsltproc --stringparam outdir obj --stringparam gendate "$date" --stringparam topdocdir . --xinclude -path $erl_docgen_privdir/docbuilder_dtd -path $erl_docgen_privdir/dtd_html_entities faq_html.xsl faq.xml
   ...
   Erlang-FAQ >grep Mick *.xml obj/*
   obtaining.xml:  French: <em>Erlang Programmation</em> (Mickaël Rémond)
   obj/obtaining.html:     French: <strong>Erlang Programmation</strong> (Mickaël Rémond)
   Erlang-FAQ >wget -q -O - http://www.erlang.org/faq/obtaining.html | grep Mick
        French: <strong>Erlang Programmation</strong> (Mickal Rmond)

The version information I have for the 'erlang.org' machine which is
generating the input I don't want:

   $ xsltproc --version
   Using libxml 20623, libxslt 10115 and libexslt 812
   xsltproc was compiled against libxml 20623, libxslt 10115 and libexslt 812
   libxslt 10115 was compiled against libxml 20623
   libexslt 812 was compiled against libxml 20623

   $ escript erl_docgen_privdir.escript
    /usr/local/otp/releases/sles10_64_R16A/lib/erl_docgen-0.3.4/priv

I've built exactly the same version of xlstproc, with exactly the same
libraries on my PC, but I don't get the dropped letters in the output.
Raimo is fairly sure that it's not the webserver's fault. So maybe
xsltproc is behaving differently on that machine for some reason. But
why?

One workaround i have is to write é instead of é. That
solves the problem, but it's ugly. Might be a clue, though. I haven't
tried seeing what happens if I just type öäå etc. in the XML source;
I'd prefer to keep the FAQ source plain ASCII.

A brutal workaround would be just to rename people. Mickael Remond,
Clas Wikstrom and Bjorn. ;-)

Matt



More information about the erlang-questions mailing list