Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtp (Exim 4.80) (envelope-from ) id 1ZtLWH-0000KP-FH for pgsql-docs@arkaria.postgresql.org; Mon, 02 Nov 2015 20:15:57 +0000 Received: from localhost ([127.0.0.1] helo=postgresql.org) by malur.postgresql.org with smtp (Exim 4.84) (envelope-from ) id 1ZtLWG-0003t7-PD for pgsql-docs@arkaria.postgresql.org; Mon, 02 Nov 2015 20:15:56 +0000 Received: from magus.postgresql.org ([2a02:c0:301:0:ffff::29]) by malur.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA384:256) (Exim 4.84) (envelope-from ) id 1ZtLWF-0003sc-Tt for pgsql-docs@postgresql.org; Mon, 02 Nov 2015 20:15:55 +0000 Received: from cronos.madness.at ([2a02:16a8:dc41::10]) by magus.postgresql.org with esmtps (TLS1.2:DHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.84) (envelope-from ) id 1ZtLWD-0004bR-6k for pgsql-docs@postgresql.org; Mon, 02 Nov 2015 20:15:55 +0000 Received: from mastermind.kaltenbrunner.cc ([2001:470:7a2d::22]) by cronos.madness.at with esmtpsa (TLS1.2:DHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.80) (envelope-from ) id 1ZtLW8-00050o-Hs; Mon, 02 Nov 2015 21:15:50 +0100 Subject: Re: Moving documentation to XML To: Alexander Lakhin References: <56337365.2080104@postgrespro.ru> Cc: "pgsql-docs@postgresql.org" From: Stefan Kaltenbrunner Message-ID: <5637C472.6070800@kaltenbrunner.cc> Date: Mon, 2 Nov 2015 21:15:46 +0100 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:38.0) Gecko/20100101 Thunderbird/38.3.0 MIME-Version: 1.0 In-Reply-To: <56337365.2080104@postgrespro.ru> Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-Pg-Spam-Score: -1.9 (-) List-Archive: List-Help: List-ID: List-Owner: List-Post: List-Subscribe: List-Unsubscribe: X-Mailing-List: pgsql-docs Precedence: bulk Sender: pgsql-docs-owner@postgresql.org On 10/30/2015 02:40 PM, Alexander Lakhin wrote: > Hello, Guillaume. > > We have plans to use this for russian translation, too. We translate the > docs by converting (with xml2po) the single xml to postgres-ru.po and > after translating it we convert it back to xml (we get postres-ru.xml > here). (Until now we had to perform one more conversion > (postgres-ru.xml -> set of sgml's).) > So now we can get russian html/* with: > python xml2po.py -l ru -k -p postgres-ru.po postgres.xml >postgres-ru.xml > xsltproc --stringparam pg.version '9.4.1' stylesheet.xsl postgres-ru.xml > > But I had some doubts about DSSSL and XSL differences. As I noted > previously there was at least one visible difference. So I decided to > customize XSL templates to make sure that html's are generated without a > loss or corruption. > I thought that comparing two HTML sources will not work, as they are too > different, but maybe we can compare text generated from html by lynx, > for example. > So I use the following procedure to look for differences: > 0. Get dsssl-generated html's > make html > 1. Extract text content from html's: > for f in html/*.html; do fn=`basename $f`; echo $fn; cat $f | perl -0pi > -pe 's/Note:\s*<\/B\s*>/\

Note<\/h3>/g' | perl -0pi -pe > 's/>
/tmp/$fn; lynx /tmp/$fn --dump >>html-text/$fn; > * Some differences are not significant so it's not reasonable to modify > XSL templates to eliminate them. Difference in "Note" placement and > spelling is one of them, so I just filter it out. > 2. Rename html to html-o and html-text to html-o-text. > 3. Generate html's with XSL (use modified templates): > rm -r html; xsltproc --stringparam pg.version '9.4.1' stylesheet.xsl > postgres.xml > 4. Extract text content from html's as above. > 5. Make sure that two text html's are identical: > diff -s -u -b -I '^\s*_\+\s*$' html-o-text/xtypes.html > html-text/xtypes.html > * Differences in whitespaces and length of "____" lines are not > significant, too. > > For now, I've managed to get the same xtypes.html (I tested my XSL > customizations with it), but I think, we can eliminate other most > outstanding (or maybe all) differences likewise. > I can describe XSL customizations in more details, if needed. > > Best regards, > Alexander > > P.S. I couldn't post the message as a reply due to error on the > postgresql.org side. > (: host makus.postgresql.org[174.143.35.229] > said: > 550 Message headers fail syntax check (in reply to end of DATA > command)) Sorry for not replying earlier but most of the sysadmin team is not tracking pgsql-docs that closely for issues - afaiks there was a typo in your mail - the "To" in your mail looked like this: To: pgsql-docs@postgresql org References: <1428009501118.85114@postgrespro.ru> <5522E656.4060201@gmx.net> <562E061B.1090809@postgrespro.ru> notice that there is a space after "pgsql-docs@postgresql" instead of what I suspect should be a "." causing the header syntax check in exim to barf on the mail. Stefan -- Sent via pgsql-docs mailing list (pgsql-docs@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-docs