pg.ddx.io  pgsql-docs@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Jürgen Purtz <juergen@purtz.de>
To: pgsql-docs@lists.postgresql.org
Subject: Re: initdb - creating clusters
Date: Mon, 31 Aug 2020 12:09:57 +0200
Message-ID: <fa23a037-4211-9d1a-6271-bdcb9236e9fa@purtz.de> (raw)
In-Reply-To: <3793995.1598800896@sss.pgh.pa.us>
References: <159430831443.16535.11360317280100947016@wrigleys.postgresql.org>
	<20200721002503.GA4065@momjian.us>
	<508F1D03-F896-4436-92B0-B9EA633BD1AE@yesql.se>
	<20200722163437.GA14522@momjian.us>
	<FB84D258-CED8-46BB-B30E-2006953F61AA@yesql.se>
	<CA+hUKGLjvXWn_O1PxAKXFEneGHrOos-QOe3try+ZbqPWrNiNrg@mail.gmail.com>
	<3793995.1598800896@sss.pgh.pa.us>

On 30.08.20 17:21, Tom Lane wrote:
> Do you have a feeling one way or the other about whether to repeat
> some of this text in each of the relevant sub-sections?  I initially
> didn't want to do that, but thinking about how people consume the
> HTML docs, I'm afraid that anything not appearing on the same page
> won't get seen.

If we do so but avoid redundant text parts, we can use the entity 
mechanism or the more modern XInclude mechanism. The attached patch uses 
both techniques in an example file: brin.sgml includes lorem.sgml two times.

(In both cases we should avoid files with multiple root elements, eg. 
multiple <para> or <sect1> without a parent element, because this would 
violate the well-formed-ness of the included XML document.)

--

J. Purtz

Attachments:

0001-lorem.patch (text/x-patch, 2.9K) download diff --git a/doc/src/sgml/Makefile b/doc/src/sgml/Makefile index 0401a515df..562f607190 100644 --- a/doc/src/sgml/Makefile +++ b/doc/src/sgml/Makefile @@ -132,8 +132,8 @@ endif html: html-stamp html-stamp: stylesheet.xsl postgres.sgml $(ALLSGML) $(ALL_IMAGES) - $(XMLLINT) $(XMLINCLUDE) --noout --valid $(word 2,$^) - $(XSLTPROC) $(XMLINCLUDE) $(XSLTPROCFLAGS) $(XSLTPROC_HTML_FLAGS) $(wordlist 1,2,$^) + $(XMLLINT) $(XMLINCLUDE) --noout --xinclude --postvalid --noent $(word 2,$^) + $(XSLTPROC) $(XMLINCLUDE) $(XSLTPROCFLAGS) --xinclude $(XSLTPROC_HTML_FLAGS) $(wordlist 1,2,$^) cp $(ALL_IMAGES) html/ cp $(srcdir)/stylesheet.css html/ touch $@ @@ -167,12 +167,12 @@ postgres.pdf: XSLTPROC_FO_FLAGS += --stringparam img.src.path '$(srcdir)/' %-A4.fo: stylesheet-fo.xsl %.sgml $(ALLSGML) - $(XMLLINT) $(XMLINCLUDE) --noout --valid $(word 2,$^) - $(XSLTPROC) $(XMLINCLUDE) $(XSLTPROCFLAGS) $(XSLTPROC_FO_FLAGS) --stringparam paper.type A4 -o $@ $(wordlist 1,2,$^) + $(XMLLINT) $(XMLINCLUDE) --noout --xinclude --postvalid --noent $(word 2,$^) + $(XSLTPROC) $(XMLINCLUDE) $(XSLTPROCFLAGS) --xinclude $(XSLTPROC_FO_FLAGS) --stringparam paper.type A4 -o $@ $(wordlist 1,2,$^) %-US.fo: stylesheet-fo.xsl %.sgml $(ALLSGML) - $(XMLLINT) $(XMLINCLUDE) --noout --valid $(word 2,$^) - $(XSLTPROC) $(XMLINCLUDE) $(XSLTPROCFLAGS) $(XSLTPROC_FO_FLAGS) --stringparam paper.type USletter -o $@ $(wordlist 1,2,$^) + $(XMLLINT) $(XMLINCLUDE) --noout --xinclude --postvalid --noent $(word 2,$^) + $(XSLTPROC) $(XMLINCLUDE) $(XSLTPROCFLAGS) --xinclude $(XSLTPROC_FO_FLAGS) --stringparam paper.type USletter -o $@ $(wordlist 1,2,$^) %.pdf: %.fo $(ALL_IMAGES) $(FOP) -fo $< -pdf $@ diff --git a/doc/src/sgml/brin.sgml b/doc/src/sgml/brin.sgml index 4420794e5b..ac5ef96173 100644 --- a/doc/src/sgml/brin.sgml +++ b/doc/src/sgml/brin.sgml @@ -11,6 +11,13 @@ <sect1 id="brin-intro"> <title>Introduction</title> + <!-- entity mechanism --> + <para>via entity mechanism:</para> + &lorem; + <!-- xinclude mechanism --> + <para>via xinclude mechanism:</para> + <xi:include xmlns:xi="http://www.w3.org/2001/XInclude" href="lorem.sgml" /> + <para> <acronym>BRIN</acronym> stands for Block Range Index. <acronym>BRIN</acronym> is designed for handling very large tables diff --git a/doc/src/sgml/filelist.sgml b/doc/src/sgml/filelist.sgml index 64b5da0070..2e42197844 100644 --- a/doc/src/sgml/filelist.sgml +++ b/doc/src/sgml/filelist.sgml @@ -182,3 +182,5 @@ <!-- back matter --> <!ENTITY biblio SYSTEM "biblio.sgml"> + +<!ENTITY lorem SYSTEM "lorem.sgml"> diff --git a/doc/src/sgml/lorem.sgml b/doc/src/sgml/lorem.sgml new file mode 100644 index 0000000000..ffb557bf22 --- /dev/null +++ b/doc/src/sgml/lorem.sgml @@ -0,0 +1,5 @@ + <para> + Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed + do eiusmod tempor incididunt ut labore et dolore magna aliqua. + An arbitrary xref-link: <xref linkend="app-pgbasebackup"/> + </para>

view thread (8+ messages)  latest in thread

Message-ID: <fa23a037-4211-9d1a-6271-bdcb9236e9fa@purtz.de>
Permalink:  ../fa23a037-4211-9d1a-6271-bdcb9236e9fa@purtz.de/
Also on:    postgresql.org/message-id/fa23a037-4211-9d1a-6271-bdcb9236e9fa@purtz.de

 ·  · 

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: pgsql-docs@postgresql.org
  Cc: juergen@purtz.de, pgsql-docs@lists.postgresql.org
  Subject: Re: initdb - creating clusters
  In-Reply-To: <fa23a037-4211-9d1a-6271-bdcb9236e9fa@purtz.de>

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

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