public inbox for [email protected]  
help / color / mirror / Atom feed
From: Jürgen Purtz <[email protected]>
To: Peter Eisentraut <[email protected]>
Cc: [email protected]
Cc: Alexander Law <[email protected]>
Subject: Re: Docbook 5.x
Date: Fri, 15 Sep 2017 23:54:57 +0500
Message-ID: <[email protected]> (raw)
In-Reply-To: <[email protected]>
References: <[email protected]>
	<[email protected]>
	<CAF4Au4zUVOuWjWc+B72yvvpVo=TJad6=x9chig7Ls9DNa7Kgrg@mail.gmail.com>
	<[email protected]>
	<[email protected]>
	<[email protected]>
	<[email protected]>
	<[email protected]>
	<[email protected]>
	<[email protected]>
	<[email protected]>
	<[email protected]>
	<[email protected]>
	<[email protected]>
	<[email protected]>
	<[email protected]>
	<[email protected]>
	<[email protected]>
	<[email protected]>
	<[email protected]>
List-Unsubscribe: <mailto:[email protected]?body=unsub%20pgsql-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.




-- 
Sent via pgsql-docs mailing list ([email protected])
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-docs


Attachments:

  [application/xslt+xml] collectAll.xsl (3.0K, 3-collectAll.xsl)
  download

view thread (86+ messages)  latest in thread

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients using the --to and --cc options:
  reply via email

  To: [email protected]
  Cc: [email protected], [email protected], [email protected]
  Subject: Re: Docbook 5.x
  In-Reply-To: <[email protected]>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by agora; see mirroring instructions
for how to clone and mirror all data and code used for this inbox