Re: [DOCS] Docbook 5.x

Поиск
Список
Период
Сортировка
От Alexander Lakhin
Тема Re: [DOCS] Docbook 5.x
Дата
Msg-id 11c0be48-6125-bbe1-1d02-6d61e889bd5e@gmail.com
обсуждение исходный текст
Ответ на Re: [DOCS] Docbook 5.x  (Jürgen Purtz <juergen@purtz.de>)
Ответы Re: [DOCS] Docbook 5.x  (Peter Eisentraut <peter.eisentraut@2ndquadrant.com>)
Список pgsql-docs
Hello,
15.09.2017 21:54, Jürgen Purtz wrote:
On 15.09.2017 19:32, Peter Eisentraut wrote:
On 9/8/17 08:30, Alexander Lakhin wrote:
I have started working through these patches now. I have committed the 
escaping of < and & and will work through the rest slowly, to minimize 
disruptions to other development.
Great!

I have rebased all the remaining patches and updated scripts for the 
current master (see attachment).
So, I've been looking at this profiling stuff, to replace the marked
sections in the installation instructions.  I found the overhead of that
a bit too much for building the full documentation, so I have come up
with the attached alternative solution.  What do you think?
Peter, can you show what performance drop you see with the profiling (e.g. for HTML)?
I get the following numbers:
1. make html with profiling (import profile-chunk.xsl in stylesheet.xsl):
85.98user 0.76system 1:29.85elapsed

2. make html without profiling (import chunk.xsl in stylesheet.xsl):
77.36user 0.62system 1:21.28elapsed

3. Separate profiling (performed before making epub, as dbtoepub doesn't support profiling)
8.52user 0.22system 0:10.31elapsed

So I get ~10% performance drop when making html. Are you concerned about the same overhead?
I would choose some standard way to have separate content in the same file, but if the overhead is not acceptable, and we're not going to extend the profiling usage, then we need to invent something that will complicate XML-related processing (I think about translation but the other issues are possible too).

I'm not happy with the 'particular conversions'-part of 'standalone-profile.xsl'. It applies subsequent modifications, which are in not very intuitive to a reader, eg:

<xsl:template match="phrase[@id='install-ldap-links']">
  <xsl:text>the documentation about client authentication and libpq</xsl:text>
</xsl:template>

This approach spreads the intended text over two very different files (in this example: 'installation.xml' and 'standalone-profile.xsl').

My suggestion is to keep the source code in one file in the same manner as with the SGML standalone-include/standalone-ignore mechanism. A generic xsl file shall create the extended output similar to 'standalone-profile.xsl'.

Jürgen, this approach implemented by applying profiling.xsl in Makefile (for make postgres.epub). (See Makefile in https://www.postgresql.org/message-id/attachment/54854/pg-doc.check.tar.bz2)

Best regards,
Alexander

В списке pgsql-docs по дате отправления:

Предыдущее
От: Peter Eisentraut
Дата:
Сообщение: Re: [DOCS] Docbook 5.x
Следующее
От: jonny.battiato@gmail.com
Дата:
Сообщение: [DOCS] max_replication_slots in subscriber for subscription?