Re: [DOCS] Docbook 5.x - Mailing list pgsql-docs

From Jürgen Purtz
Subject Re: [DOCS] Docbook 5.x
Date
Msg-id ac8351bf-a97a-5ff7-1df5-747a3962efb8@purtz.de
Whole thread Raw
In response to Re: [DOCS] Docbook 5.x  (Peter Eisentraut <peter.eisentraut@2ndquadrant.com>)
Responses Re: [DOCS] Docbook 5.x  (Peter Eisentraut <peter.eisentraut@2ndquadrant.com>)
Re: [DOCS] Docbook 5.x  (Alexander Lakhin <exclusion@gmail.com>)
List pgsql-docs
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?


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'.


installation.xml:
support for authentication and connection parameter lookup (see
<phrase condition="standalone">the documentation about client authentication and libpq</phrase>
<phrase condition="default"><xref linkend="libpq-ldap"/> and <xref linkend="auth-ldap"/></phrase>
for more information). On Unix,

...


collectAll.xsl (similar to standalone-profile.xsl):  <!-- parameters and variables -->
  <xsl:param name="pg.Standalone" select="'default'"/>
  <!-- <xsl:param name="pg.Standalone" select="'standalone'"/>  -->

  <!-- Process all nodes  -->
  <xsl:template match="*|@*|text()|processing-instruction()|comment()">
    <xsl:choose>
      <xsl:when test="(not (@condition) or @condition=$pg.Standalone )">
        <!-- copy nodes without a 'condition' attribute and such nodes, where 'condition' meets  the given criteria  -->
        <xsl:copy>
          <xsl:apply-templates select="*|@*|text()|processing-instruction()|comment()"/>
        </xsl:copy>
      </xsl:when>
    </xsl:choose>
  </xsl:template>

I'm sorry that I actually cannot deliver a patch because I'm abroad and have limited resources (but many challenges). But I hope that the idea gets clear. The attached collectAll.xsl file contains a more complex solution for the case that we have to deal with more than one include/ignore type, eg: index-generating.


Attachment

pgsql-docs by date:

Previous
From: Peter Eisentraut
Date:
Subject: Re: [DOCS] Docbook 5.x
Next
From: zszmigiero@gmail.com
Date:
Subject: [DOCS] CREATE GROUP: REPLICATION, NOREPLICATION, BYPASSRLS, NOBYPASSRLS,CONNECTION LIMIT connlimit