public inbox for [email protected]
help / color / mirror / Atom feedDocbook 5.x
86+ messages / 10 participants
[nested] [flat]
* Docbook 5.x
@ 2016-04-20 14:30 Jürgen Purtz <[email protected]>
2016-04-20 15:59 ` Re: Docbook 5.x Alexander Law <[email protected]>
2016-04-20 18:41 ` Re: Docbook 5.x Simon Riggs <[email protected]>
2016-05-03 19:34 ` Re: Docbook 5.x Alvaro Herrera <[email protected]>
0 siblings, 3 replies; 86+ messages in thread
From: Jürgen Purtz @ 2016-04-20 14:30 UTC (permalink / raw)
To: pgsql-docs
Hi,
actually we use DocBook V4.2 for the PostgreSQL manuals. I suggest an
upgrade to DocBook 5.x. This sounds simple, but it will be a long
process with many sub-tasks.
Rationale:
* Sooner or later we MUST migrate as the 4.x series is outdated: V4.2
dates back to 2002. The 4.x series is no longer actively developed
since 2006. See: http://www.docbook.org/tdg5/en/html/ch01.html "In
October 2006, the DocBook Technical Committee released DocBook V4.5,
the last release planned in the 4.x series."
* V5.0 is available since 2009. See:
http://www.docbook.org/tdg5/en/html/ch01.html: "DocBook V5.0 became
an official Committee Specification in June 2009 and became an
official OASIS Standard in October 2009."
* Actually the technical committee has the third Candidate Release for
V5.1.
PROs:
* The formal part of the migration is supported by existing tools:
http://docbook.org/docs/howto/#convert4to5 (nevertheless some
scripts written by ourself will be necessary).
* The normative schema for Docbook 5.x is written in RELAX NG.
Additionally the technical committee converts this normative schema
to a XSD schema and to DTD, which are not normative but very near to
RELAX NG and will fit for most applications. Hence, we have the
choice between three schema syntaxes and everybody can use his
favourite one.
* Our source file format will switch from SGML to XML. This implies
that we have access to all XML features like XLink, XPath, XSLT,
XSL-FO, SVG, MathML, namespaces, ... .
CONs:
* The migration from 4.x to 5.x implies major changes at 3 different
levels.
o DocBook structure: Previously it was defined in SGML syntax
(DTD). Now it is defined in RELAX NG schema language plus
Schematron rules.
o DocBook files: Previously we used SGML syntax for our files. We
must convert them to a valid XML syntax, eg: tag omission.
o Tools and style sheets: All tools which operate at the native
SGML-level (editors, conversions, ...) must be replaced by XML
conforming tools. As valid XML implicitly conforms to a valid
SGML syntax this step may be accomplished by reconfiguring some
of the tools, eg.: .emacs.
What I have done so far is:
* Conversion of sgml files to valid xml syntax with a perl skript. I
failed to use 'osx' or 'spam'.
* Conversion of these xml files to Docbook5.x format using xsltproc
and Docbooks xslt-migration skripts.
* Creation of html files using xsltproc and Docbooks xslt skripts.
* Creation of fo files using xsltproc and Docbooks xslt skripts.
* Creation of pdf files using fop.
* The conversions needs less than 10 minutes on a Intel i5 processor.
This is a very first raw round-trip with one output file per sgml file
and output type. Not supported: entities (__gt__ as a surrogate),
<[CDATA and similar SGML constructs, PostgreSQL specific style sheets,
Makefile, additional errors occur, .... . I append one file of every
new format for the chapter "Advanced Features": xml (the new source),
html, fo, pdf.
Any ideas or suggestions? Shall we go further on this way? Has anybody
more experiences in SGML-->XML conversions or Docbook 4.x --> 5.x
conversions?
Kind regards
Jürgen Purtz
--
Sent via pgsql-docs mailing list ([email protected])
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-docs
Attachments:
[text/xml] advanced.xml (25.6K, 3-advanced.xml)
download | inline:
<!-- Converted by db4-upgrade version 1.1 -->
<chapter xmlns="http://docbook.org/ns/docbook" version="5.0" xml:id="tutorial-advanced">
<title>Advanced Features</title>
<section xml:id="tutorial-advanced-intro">
<title>Introduction</title>
<para>
In the previous chapter we have covered the basics of using
<acronym>SQL</acronym> to store and access your data in
<productname>PostgreSQL</productname>. We will now discuss some
more advanced features of <acronym>SQL</acronym> that simplify
management and prevent loss or corruption of your data. Finally,
we will look at some <productname>PostgreSQL</productname>
extensions.
</para>
<para>
This chapter will on occasion refer to examples found in <xref linkend="tutorial-sql"/> to change or improve them, so it will be
useful to have read that chapter. Some examples from
this chapter can also be found in
<filename>advanced.sql</filename> in the tutorial directory. This
file also contains some sample data to load, which is not
repeated here. (Refer to <xref linkend="tutorial-sql-intro"/> for
how to use the file.)
</para>
</section>
<section xml:id="tutorial-views">
<title>Views</title>
<indexterm zone="tutorial-views">
<primary>view</primary>
</indexterm>
<para>
Refer back to the queries in <xref linkend="tutorial-join"/>.
Suppose the combined listing of weather records and city location
is of particular interest to your application, but you do not want
to type the query each time you need it. You can create a
<firstterm>view</firstterm> over the query, which gives a name to
the query that you can refer to like an ordinary table:
<programlisting>
CREATE VIEW myview AS
SELECT city, temp_lo, temp_hi, prcp, date, location
FROM weather, cities
WHERE city = name;
SELECT * FROM myview;
</programlisting>
</para>
<para>
Making liberal use of views is a key aspect of good SQL database
design. Views allow you to encapsulate the details of the
structure of your tables, which might change as your application
evolves, behind consistent interfaces.
</para>
<para>
Views can be used in almost any place a real table can be used.
Building views upon other views is not uncommon.
</para>
</section>
<section xml:id="tutorial-fk">
<title>Foreign Keys</title>
<indexterm zone="tutorial-fk">
<primary>foreign key</primary>
</indexterm>
<indexterm zone="tutorial-fk">
<primary>referential integrity</primary>
</indexterm>
<para>
Recall the <classname>weather</classname> and
<classname>cities</classname> tables from <xref linkend="tutorial-sql"/>. Consider the following problem: You
want to make sure that no one can insert rows in the
<classname>weather</classname> table that do not have a matching
entry in the <classname>cities</classname> table. This is called
maintaining the <firstterm>referential integrity</firstterm> of
your data. In simplistic database systems this would be
implemented (if at all) by first looking at the
<classname>cities</classname> table to check if a matching record
exists, and then inserting or rejecting the new
<classname>weather</classname> records. This approach has a
number of problems and is very inconvenient, so
<productname>PostgreSQL</productname> can do this for you.
</para>
<para>
The new declaration of the tables would look like this:
<programlisting>
CREATE TABLE cities (
city varchar(80) primary key,
location point
);
CREATE TABLE weather (
city varchar(80) references cities(city),
temp_lo int,
temp_hi int,
prcp real,
date date
);
</programlisting>
Now try inserting an invalid record:
<programlisting>
INSERT INTO weather VALUES ('Berkeley', 45, 53, 0.0, '1994-11-28');
</programlisting>
<screen>
ERROR: insert or update on table "weather" violates foreign key constraint "weather_city_fkey"
DETAIL: Key (city)=(Berkeley) is not present in table "cities".
</screen>
</para>
<para>
The behavior of foreign keys can be finely tuned to your
application. We will not go beyond this simple example in this
tutorial, but just refer you to <xref linkend="ddl"/>
for more information. Making correct use of
foreign keys will definitely improve the quality of your database
applications, so you are strongly encouraged to learn about them.
</para>
</section>
<section xml:id="tutorial-transactions">
<title>Transactions</title>
<indexterm zone="tutorial-transactions">
<primary>transaction</primary>
</indexterm>
<para>
<firstterm>Transactions</firstterm> are a fundamental concept of all database
systems. The essential point of a transaction is that it bundles
multiple steps into a single, all-or-nothing operation. The intermediate
states between the steps are not visible to other concurrent transactions,
and if some failure occurs that prevents the transaction from completing,
then none of the steps affect the database at all.
</para>
<para>
For example, consider a bank database that contains balances for various
customer accounts, as well as total deposit balances for branches.
Suppose that we want to record a payment of $100.00 from Alice's account
to Bob's account. Simplifying outrageously, the SQL commands for this
might look like:
<programlisting>
UPDATE accounts SET balance = balance - 100.00
WHERE name = 'Alice';
UPDATE branches SET balance = balance - 100.00
WHERE name = (SELECT branch_name FROM accounts WHERE name = 'Alice');
UPDATE accounts SET balance = balance + 100.00
WHERE name = 'Bob';
UPDATE branches SET balance = balance + 100.00
WHERE name = (SELECT branch_name FROM accounts WHERE name = 'Bob');
</programlisting>
</para>
<para>
The details of these commands are not important here; the important
point is that there are several separate updates involved to accomplish
this rather simple operation. Our bank's officers will want to be
assured that either all these updates happen, or none of them happen.
It would certainly not do for a system failure to result in Bob
receiving $100.00 that was not debited from Alice. Nor would Alice long
remain a happy customer if she was debited without Bob being credited.
We need a guarantee that if something goes wrong partway through the
operation, none of the steps executed so far will take effect. Grouping
the updates into a <firstterm>transaction</firstterm> gives us this guarantee.
A transaction is said to be <firstterm>atomic</firstterm>: from the point of
view of other transactions, it either happens completely or not at all.
</para>
<para>
We also want a
guarantee that once a transaction is completed and acknowledged by
the database system, it has indeed been permanently recorded
and won't be lost even if a crash ensues shortly thereafter.
For example, if we are recording a cash withdrawal by Bob,
we do not want any chance that the debit to his account will
disappear in a crash just after he walks out the bank door.
A transactional database guarantees that all the updates made by
a transaction are logged in permanent storage (i.e., on disk) before
the transaction is reported complete.
</para>
<para>
Another important property of transactional databases is closely
related to the notion of atomic updates: when multiple transactions
are running concurrently, each one should not be able to see the
incomplete changes made by others. For example, if one transaction
is busy totalling all the branch balances, it would not do for it
to include the debit from Alice's branch but not the credit to
Bob's branch, nor vice versa. So transactions must be all-or-nothing
not only in terms of their permanent effect on the database, but
also in terms of their visibility as they happen. The updates made
so far by an open transaction are invisible to other transactions
until the transaction completes, whereupon all the updates become
visible simultaneously.
</para>
<para>
In <productname>PostgreSQL</productname>, a transaction is set up by surrounding
the SQL commands of the transaction with
<command>BEGIN</command> and <command>COMMIT</command> commands. So our banking
transaction would actually look like:
<programlisting>
BEGIN;
UPDATE accounts SET balance = balance - 100.00
WHERE name = 'Alice';
-- etc etc
COMMIT;
</programlisting>
</para>
<para>
If, partway through the transaction, we decide we do not want to
commit (perhaps we just noticed that Alice's balance went negative),
we can issue the command <command>ROLLBACK</command> instead of
<command>COMMIT</command>, and all our updates so far will be canceled.
</para>
<para>
<productname>PostgreSQL</productname> actually treats every SQL statement as being
executed within a transaction. If you do not issue a <command>BEGIN</command>
command,
then each individual statement has an implicit <command>BEGIN</command> and
(if successful) <command>COMMIT</command> wrapped around it. A group of
statements surrounded by <command>BEGIN</command> and <command>COMMIT</command>
is sometimes called a <firstterm>transaction block</firstterm>.
</para>
<note>
<para>
Some client libraries issue <command>BEGIN</command> and <command>COMMIT</command>
commands automatically, so that you might get the effect of transaction
blocks without asking. Check the documentation for the interface
you are using.
</para>
</note>
<para>
It's possible to control the statements in a transaction in a more
granular fashion through the use of <firstterm>savepoints</firstterm>. Savepoints
allow you to selectively discard parts of the transaction, while
committing the rest. After defining a savepoint with
<command>SAVEPOINT</command>, you can if needed roll back to the savepoint
with <command>ROLLBACK TO</command>. All the transaction's database changes
between defining the savepoint and rolling back to it are discarded, but
changes earlier than the savepoint are kept.
</para>
<para>
After rolling back to a savepoint, it continues to be defined, so you can
roll back to it several times. Conversely, if you are sure you won't need
to roll back to a particular savepoint again, it can be released, so the
system can free some resources. Keep in mind that either releasing or
rolling back to a savepoint
will automatically release all savepoints that were defined after it.
</para>
<para>
All this is happening within the transaction block, so none of it
is visible to other database sessions. When and if you commit the
transaction block, the committed actions become visible as a unit
to other sessions, while the rolled-back actions never become visible
at all.
</para>
<para>
Remembering the bank database, suppose we debit $100.00 from Alice's
account, and credit Bob's account, only to find later that we should
have credited Wally's account. We could do it using savepoints like
this:
<programlisting>
BEGIN;
UPDATE accounts SET balance = balance - 100.00
WHERE name = 'Alice';
SAVEPOINT my_savepoint;
UPDATE accounts SET balance = balance + 100.00
WHERE name = 'Bob';
-- oops ... forget that and use Wally's account
ROLLBACK TO my_savepoint;
UPDATE accounts SET balance = balance + 100.00
WHERE name = 'Wally';
COMMIT;
</programlisting>
</para>
<para>
This example is, of course, oversimplified, but there's a lot of control
possible in a transaction block through the use of savepoints.
Moreover, <command>ROLLBACK TO</command> is the only way to regain control of a
transaction block that was put in aborted state by the
system due to an error, short of rolling it back completely and starting
again.
</para>
</section>
<section xml:id="tutorial-window">
<title>Window Functions</title>
<indexterm zone="tutorial-window">
<primary>window function</primary>
</indexterm>
<para>
A <firstterm>window function</firstterm> performs a calculation across a set of
table rows that are somehow related to the current row. This is comparable
to the type of calculation that can be done with an aggregate function.
But unlike regular aggregate functions, use of a window function does not
cause rows to become grouped into a single output row __mdash__ the
rows retain their separate identities. Behind the scenes, the window
function is able to access more than just the current row of the query
result.
</para>
<para>
Here is an example that shows how to compare each employee's salary
with the average salary in his or her department:
<programlisting>
SELECT depname, empno, salary, avg(salary) OVER (PARTITION BY depname) FROM empsalary;
</programlisting>
<screen>
depname | empno | salary | avg
-----------+-------+--------+-----------------------
develop | 11 | 5200 | 5020.0000000000000000
develop | 7 | 4200 | 5020.0000000000000000
develop | 9 | 4500 | 5020.0000000000000000
develop | 8 | 6000 | 5020.0000000000000000
develop | 10 | 5200 | 5020.0000000000000000
personnel | 5 | 3500 | 3700.0000000000000000
personnel | 2 | 3900 | 3700.0000000000000000
sales | 3 | 4800 | 4866.6666666666666667
sales | 1 | 5000 | 4866.6666666666666667
sales | 4 | 4800 | 4866.6666666666666667
(10 rows)
</screen>
The first three output columns come directly from the table
<varname remap="structname">empsalary</varname>, and there is one output row for each row in the
table. The fourth column represents an average taken across all the table
rows that have the same <varname remap="structfield">depname</varname> value as the current row.
(This actually is the same function as the regular <function>avg</function>
aggregate function, but the <literal>OVER</literal> clause causes it to be
treated as a window function and computed across an appropriate set of
rows.)
</para>
<para>
A window function call always contains an <literal>OVER</literal> clause
directly following the window function's name and argument(s). This is what
syntactically distinguishes it from a regular function or aggregate
function. The <literal>OVER</literal> clause determines exactly how the
rows of the query are split up for processing by the window function.
The <literal>PARTITION BY</literal> list within <literal>OVER</literal> specifies
dividing the rows into groups, or partitions, that share the same
values of the <literal>PARTITION BY</literal> expression(s). For each row,
the window function is computed across the rows that fall into the
same partition as the current row.
</para>
<para>
You can also control the order in which rows are processed by
window functions using <literal>ORDER BY</literal> within <literal>OVER</literal>.
(The window <literal>ORDER BY</literal> does not even have to match the
order in which the rows are output.) Here is an example:
<programlisting>
SELECT depname, empno, salary,
rank() OVER (PARTITION BY depname ORDER BY salary DESC)
FROM empsalary;
</programlisting>
<screen>
depname | empno | salary | rank
-----------+-------+--------+------
develop | 8 | 6000 | 1
develop | 10 | 5200 | 2
develop | 11 | 5200 | 2
develop | 9 | 4500 | 4
develop | 7 | 4200 | 5
personnel | 2 | 3900 | 1
personnel | 5 | 3500 | 2
sales | 1 | 5000 | 1
sales | 4 | 4800 | 2
sales | 3 | 4800 | 2
(10 rows)
</screen>
As shown here, the <function>rank</function> function produces a numerical rank
within the current row's partition for each distinct <literal>ORDER BY</literal>
value, in the order defined by the <literal>ORDER BY</literal> clause.
<function>rank</function> needs no explicit parameter, because its behavior
is entirely determined by the <literal>OVER</literal> clause.
</para>
<para>
The rows considered by a window function are those of the <quote>virtual
table</quote> produced by the query's <literal>FROM</literal> clause as filtered by its
<literal>WHERE</literal>, <literal>GROUP BY</literal>, and <literal>HAVING</literal> clauses
if any. For example, a row removed because it does not meet the
<literal>WHERE</literal> condition is not seen by any window function.
A query can contain multiple window functions that slice up the data
in different ways by means of different <literal>OVER</literal> clauses, but
they all act on the same collection of rows defined by this virtual table.
</para>
<para>
We already saw that <literal>ORDER BY</literal> can be omitted if the ordering
of rows is not important. It is also possible to omit <literal>PARTITION
BY</literal>, in which case there is just one partition containing all the rows.
</para>
<para>
There is another important concept associated with window functions:
for each row, there is a set of rows within its partition called its
<firstterm>window frame</firstterm>. Many (but not all) window functions act only
on the rows of the window frame, rather than of the whole partition.
By default, if <literal>ORDER BY</literal> is supplied then the frame consists of
all rows from the start of the partition up through the current row, plus
any following rows that are equal to the current row according to the
<literal>ORDER BY</literal> clause. When <literal>ORDER BY</literal> is omitted the
default frame consists of all rows in the partition.
<footnote>
<para>
There are options to define the window frame in other ways, but
this tutorial does not cover them. See
<xref linkend="syntax-window-functions"/> for details.
</para>
</footnote>
Here is an example using <function>sum</function>:
</para>
<programlisting>
SELECT salary, sum(salary) OVER () FROM empsalary;
</programlisting>
<screen>
salary | sum
--------+-------
5200 | 47100
5000 | 47100
3500 | 47100
4800 | 47100
3900 | 47100
4200 | 47100
4500 | 47100
4800 | 47100
6000 | 47100
5200 | 47100
(10 rows)
</screen>
<para>
Above, since there is no <literal>ORDER BY</literal> in the <literal>OVER</literal>
clause, the window frame is the same as the partition, which for lack of
<literal>PARTITION BY</literal> is the whole table; in other words each sum is
taken over the whole table and so we get the same result for each output
row. But if we add an <literal>ORDER BY</literal> clause, we get very different
results:
</para>
<programlisting>
SELECT salary, sum(salary) OVER (ORDER BY salary) FROM empsalary;
</programlisting>
<screen>
salary | sum
--------+-------
3500 | 3500
3900 | 7400
4200 | 11600
4500 | 16100
4800 | 25700
4800 | 25700
5000 | 30700
5200 | 41100
5200 | 41100
6000 | 47100
(10 rows)
</screen>
<para>
Here the sum is taken from the first (lowest) salary up through the
current one, including any duplicates of the current one (notice the
results for the duplicated salaries).
</para>
<para>
Window functions are permitted only in the <literal>SELECT</literal> list
and the <literal>ORDER BY</literal> clause of the query. They are forbidden
elsewhere, such as in <literal>GROUP BY</literal>, <literal>HAVING</literal>
and <literal>WHERE</literal> clauses. This is because they logically
execute after the processing of those clauses. Also, window functions
execute after regular aggregate functions. This means it is valid to
include an aggregate function call in the arguments of a window function,
but not vice versa.
</para>
<para>
If there is a need to filter or group rows after the window calculations
are performed, you can use a sub-select. For example:
<programlisting>
SELECT depname, empno, salary, enroll_date
FROM
(SELECT depname, empno, salary, enroll_date,
rank() OVER (PARTITION BY depname ORDER BY salary DESC, empno) AS pos
FROM empsalary
) AS ss
WHERE pos __lt__ 3;
</programlisting>
The above query only shows the rows from the inner query having
<literal>rank</literal> less than 3.
</para>
<para>
When a query involves multiple window functions, it is possible to write
out each one with a separate <literal>OVER</literal> clause, but this is
duplicative and error-prone if the same windowing behavior is wanted
for several functions. Instead, each windowing behavior can be named
in a <literal>WINDOW</literal> clause and then referenced in <literal>OVER</literal>.
For example:
<programlisting>
SELECT sum(salary) OVER w, avg(salary) OVER w
FROM empsalary
WINDOW w AS (PARTITION BY depname ORDER BY salary DESC);
</programlisting>
</para>
<para>
More details about window functions can be found in
<xref linkend="syntax-window-functions"/>,
<xref linkend="functions-window"/>,
<xref linkend="queries-window"/>, and the
<xref linkend="sql-select"/> reference page.
</para>
</section>
<section xml:id="tutorial-inheritance">
<title>Inheritance</title>
<indexterm zone="tutorial-inheritance">
<primary>inheritance</primary>
</indexterm>
<para>
Inheritance is a concept from object-oriented databases. It opens
up interesting new possibilities of database design.
</para>
<para>
Let's create two tables: A table <classname>cities</classname>
and a table <classname>capitals</classname>. Naturally, capitals
are also cities, so you want some way to show the capitals
implicitly when you list all cities. If you're really clever you
might invent some scheme like this:
<programlisting>
CREATE TABLE capitals (
name text,
population real,
altitude int, -- (in ft)
state char(2)
);
CREATE TABLE non_capitals (
name text,
population real,
altitude int -- (in ft)
);
CREATE VIEW cities AS
SELECT name, population, altitude FROM capitals
UNION
SELECT name, population, altitude FROM non_capitals;
</programlisting>
This works OK as far as querying goes, but it gets ugly when you
need to update several rows, for one thing.
</para>
<para>
A better solution is this:
<programlisting>
CREATE TABLE cities (
name text,
population real,
altitude int -- (in ft)
);
CREATE TABLE capitals (
state char(2)
) INHERITS (cities);
</programlisting>
</para>
<para>
In this case, a row of <classname>capitals</classname>
<firstterm>inherits</firstterm> all columns (<varname remap="structfield">name</varname>,
<varname remap="structfield">population</varname>, and <varname remap="structfield">altitude</varname>) from its
<firstterm>parent</firstterm>, <classname>cities</classname>. The
type of the column <varname remap="structfield">name</varname> is
<type>text</type>, a native <productname>PostgreSQL</productname>
type for variable length character strings. State capitals have
an extra column, <varname remap="structfield">state</varname>, that shows their state. In
<productname>PostgreSQL</productname>, a table can inherit from
zero or more other tables.
</para>
<para>
For example, the following query finds the names of all cities,
including state capitals, that are located at an altitude
over 500 feet:
<programlisting>
SELECT name, altitude
FROM cities
WHERE altitude __gt__ 500;
</programlisting>
which returns:
<screen>
name | altitude
-----------+----------
Las Vegas | 2174
Mariposa | 1953
Madison | 845
(3 rows)
</screen>
</para>
<para>
On the other hand, the following query finds
all the cities that are not state capitals and
are situated at an altitude over 500 feet:
<programlisting>
SELECT name, altitude
FROM ONLY cities
WHERE altitude __gt__ 500;
</programlisting>
<screen>
name | altitude
-----------+----------
Las Vegas | 2174
Mariposa | 1953
(2 rows)
</screen>
</para>
<para>
Here the <literal>ONLY</literal> before <literal>cities</literal>
indicates that the query should be run over only the
<classname>cities</classname> table, and not tables below
<classname>cities</classname> in the inheritance hierarchy. Many
of the commands that we have already discussed __mdash__
<command>SELECT</command>, <command>UPDATE</command>, and
<command>DELETE</command> __mdash__ support this <literal>ONLY</literal>
notation.
</para>
<note>
<para>
Although inheritance is frequently useful, it has not been integrated
with unique constraints or foreign keys, which limits its usefulness.
See <xref linkend="ddl-inherit"/> for more detail.
</para>
</note>
</section>
<section xml:id="tutorial-conclusion">
<title>Conclusion</title>
<para>
<productname>PostgreSQL</productname> has many features not
touched upon in this tutorial introduction, which has been
oriented toward newer users of <acronym>SQL</acronym>. These
features are discussed in more detail in the remainder of this
book.
</para>
<para>
If you feel you need more introductory material, please visit the PostgreSQL
<link xmlns:xlink="http://www.w3.org/1999/xlink" xlink:href="http://www.postgresql.org">web site</link>
for links to more resources.
</para>
</section>
</chapter>
[text/html] advanced.html (28.0K, 4-advanced.html)
download | inline:
<html><head><meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1"><title>Chapter�1.�Advanced Features</title><meta name="generator" content="DocBook XSL Stylesheets V1.79.1"></head><body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF"><div class="chapter"><div class="titlepage"><div><div><h2 class="title"><a name="tutorial-advanced"></a>Chapter�1.�Advanced Features</h2></div></div></div><div class="toc"><p><b>Table of Contents</b></p><dl class="toc"><dt><span class="section"><a href="#tutorial-advanced-intro">Introduction</a></span></dt><dt><span class="section"><a href="#tutorial-views">Views</a></span></dt><dt><span class="section"><a href="#tutorial-fk">Foreign Keys</a></span></dt><dt><span class="section"><a href="#tutorial-transactions">Transactions</a></span></dt><dt><span class="section"><a href="#tutorial-window">Window Functions</a></span></dt><dt><span class="section"><a href="#tutorial-inheritance">Inheritance</a></span></dt><dt><span class="section"><a href="#tutorial-conclusion">Conclusion</a></span></dt></dl></div><div class="section"><div class="titlepage"><div><div><h2 class="title" style="clear: both"><a name="tutorial-advanced-intro"></a>Introduction</h2></div></div></div><p>
In the previous chapter we have covered the basics of using
<acronym class="acronym">SQL</acronym> to store and access your data in
<span class="productname">PostgreSQL</span>. We will now discuss some
more advanced features of <acronym class="acronym">SQL</acronym> that simplify
management and prevent loss or corruption of your data. Finally,
we will look at some <span class="productname">PostgreSQL</span>
extensions.
</p><p>
This chapter will on occasion refer to examples found in <a class="xref" href="#">???</a> to change or improve them, so it will be
useful to have read that chapter. Some examples from
this chapter can also be found in
<code class="filename">advanced.sql</code> in the tutorial directory. This
file also contains some sample data to load, which is not
repeated here. (Refer to <a class="xref" href="#">???</a> for
how to use the file.)
</p></div><div class="section"><div class="titlepage"><div><div><h2 class="title" style="clear: both"><a name="tutorial-views"></a>Views</h2></div></div></div><a class="indexterm" name="idm46045144379056"></a><p>
Refer back to the queries in <a class="xref" href="#">???</a>.
Suppose the combined listing of weather records and city location
is of particular interest to your application, but you do not want
to type the query each time you need it. You can create a
<em class="firstterm">view</em> over the query, which gives a name to
the query that you can refer to like an ordinary table:
</p><pre class="programlisting">
CREATE VIEW myview AS
SELECT city, temp_lo, temp_hi, prcp, date, location
FROM weather, cities
WHERE city = name;
SELECT * FROM myview;
</pre><p>
</p><p>
Making liberal use of views is a key aspect of good SQL database
design. Views allow you to encapsulate the details of the
structure of your tables, which might change as your application
evolves, behind consistent interfaces.
</p><p>
Views can be used in almost any place a real table can be used.
Building views upon other views is not uncommon.
</p></div><div class="section"><div class="titlepage"><div><div><h2 class="title" style="clear: both"><a name="tutorial-fk"></a>Foreign Keys</h2></div></div></div><a class="indexterm" name="idm46045144012112"></a><a class="indexterm" name="idm46045144010800"></a><p>
Recall the <code class="classname">weather</code> and
<code class="classname">cities</code> tables from <a class="xref" href="#">???</a>. Consider the following problem: You
want to make sure that no one can insert rows in the
<code class="classname">weather</code> table that do not have a matching
entry in the <code class="classname">cities</code> table. This is called
maintaining the <em class="firstterm">referential integrity</em> of
your data. In simplistic database systems this would be
implemented (if at all) by first looking at the
<code class="classname">cities</code> table to check if a matching record
exists, and then inserting or rejecting the new
<code class="classname">weather</code> records. This approach has a
number of problems and is very inconvenient, so
<span class="productname">PostgreSQL</span> can do this for you.
</p><p>
The new declaration of the tables would look like this:
</p><pre class="programlisting">
CREATE TABLE cities (
city varchar(80) primary key,
location point
);
CREATE TABLE weather (
city varchar(80) references cities(city),
temp_lo int,
temp_hi int,
prcp real,
date date
);
</pre><p>
Now try inserting an invalid record:
</p><pre class="programlisting">
INSERT INTO weather VALUES ('Berkeley', 45, 53, 0.0, '1994-11-28');
</pre><p>
</p><pre class="screen">
ERROR: insert or update on table "weather" violates foreign key constraint "weather_city_fkey"
DETAIL: Key (city)=(Berkeley) is not present in table "cities".
</pre><p>
</p><p>
The behavior of foreign keys can be finely tuned to your
application. We will not go beyond this simple example in this
tutorial, but just refer you to <a class="xref" href="#">???</a>
for more information. Making correct use of
foreign keys will definitely improve the quality of your database
applications, so you are strongly encouraged to learn about them.
</p></div><div class="section"><div class="titlepage"><div><div><h2 class="title" style="clear: both"><a name="tutorial-transactions"></a>Transactions</h2></div></div></div><a class="indexterm" name="idm46045143999200"></a><p>
<em class="firstterm">Transactions</em> are a fundamental concept of all database
systems. The essential point of a transaction is that it bundles
multiple steps into a single, all-or-nothing operation. The intermediate
states between the steps are not visible to other concurrent transactions,
and if some failure occurs that prevents the transaction from completing,
then none of the steps affect the database at all.
</p><p>
For example, consider a bank database that contains balances for various
customer accounts, as well as total deposit balances for branches.
Suppose that we want to record a payment of $100.00 from Alice's account
to Bob's account. Simplifying outrageously, the SQL commands for this
might look like:
</p><pre class="programlisting">
UPDATE accounts SET balance = balance - 100.00
WHERE name = 'Alice';
UPDATE branches SET balance = balance - 100.00
WHERE name = (SELECT branch_name FROM accounts WHERE name = 'Alice');
UPDATE accounts SET balance = balance + 100.00
WHERE name = 'Bob';
UPDATE branches SET balance = balance + 100.00
WHERE name = (SELECT branch_name FROM accounts WHERE name = 'Bob');
</pre><p>
</p><p>
The details of these commands are not important here; the important
point is that there are several separate updates involved to accomplish
this rather simple operation. Our bank's officers will want to be
assured that either all these updates happen, or none of them happen.
It would certainly not do for a system failure to result in Bob
receiving $100.00 that was not debited from Alice. Nor would Alice long
remain a happy customer if she was debited without Bob being credited.
We need a guarantee that if something goes wrong partway through the
operation, none of the steps executed so far will take effect. Grouping
the updates into a <em class="firstterm">transaction</em> gives us this guarantee.
A transaction is said to be <em class="firstterm">atomic</em>: from the point of
view of other transactions, it either happens completely or not at all.
</p><p>
We also want a
guarantee that once a transaction is completed and acknowledged by
the database system, it has indeed been permanently recorded
and won't be lost even if a crash ensues shortly thereafter.
For example, if we are recording a cash withdrawal by Bob,
we do not want any chance that the debit to his account will
disappear in a crash just after he walks out the bank door.
A transactional database guarantees that all the updates made by
a transaction are logged in permanent storage (i.e., on disk) before
the transaction is reported complete.
</p><p>
Another important property of transactional databases is closely
related to the notion of atomic updates: when multiple transactions
are running concurrently, each one should not be able to see the
incomplete changes made by others. For example, if one transaction
is busy totalling all the branch balances, it would not do for it
to include the debit from Alice's branch but not the credit to
Bob's branch, nor vice versa. So transactions must be all-or-nothing
not only in terms of their permanent effect on the database, but
also in terms of their visibility as they happen. The updates made
so far by an open transaction are invisible to other transactions
until the transaction completes, whereupon all the updates become
visible simultaneously.
</p><p>
In <span class="productname">PostgreSQL</span>, a transaction is set up by surrounding
the SQL commands of the transaction with
<span class="command"><strong>BEGIN</strong></span> and <span class="command"><strong>COMMIT</strong></span> commands. So our banking
transaction would actually look like:
</p><pre class="programlisting">
BEGIN;
UPDATE accounts SET balance = balance - 100.00
WHERE name = 'Alice';
-- etc etc
COMMIT;
</pre><p>
</p><p>
If, partway through the transaction, we decide we do not want to
commit (perhaps we just noticed that Alice's balance went negative),
we can issue the command <span class="command"><strong>ROLLBACK</strong></span> instead of
<span class="command"><strong>COMMIT</strong></span>, and all our updates so far will be canceled.
</p><p>
<span class="productname">PostgreSQL</span> actually treats every SQL statement as being
executed within a transaction. If you do not issue a <span class="command"><strong>BEGIN</strong></span>
command,
then each individual statement has an implicit <span class="command"><strong>BEGIN</strong></span> and
(if successful) <span class="command"><strong>COMMIT</strong></span> wrapped around it. A group of
statements surrounded by <span class="command"><strong>BEGIN</strong></span> and <span class="command"><strong>COMMIT</strong></span>
is sometimes called a <em class="firstterm">transaction block</em>.
</p><div class="note" style="margin-left: 0.5in; margin-right: 0.5in;"><h3 class="title">Note</h3><p>
Some client libraries issue <span class="command"><strong>BEGIN</strong></span> and <span class="command"><strong>COMMIT</strong></span>
commands automatically, so that you might get the effect of transaction
blocks without asking. Check the documentation for the interface
you are using.
</p></div><p>
It's possible to control the statements in a transaction in a more
granular fashion through the use of <em class="firstterm">savepoints</em>. Savepoints
allow you to selectively discard parts of the transaction, while
committing the rest. After defining a savepoint with
<span class="command"><strong>SAVEPOINT</strong></span>, you can if needed roll back to the savepoint
with <span class="command"><strong>ROLLBACK TO</strong></span>. All the transaction's database changes
between defining the savepoint and rolling back to it are discarded, but
changes earlier than the savepoint are kept.
</p><p>
After rolling back to a savepoint, it continues to be defined, so you can
roll back to it several times. Conversely, if you are sure you won't need
to roll back to a particular savepoint again, it can be released, so the
system can free some resources. Keep in mind that either releasing or
rolling back to a savepoint
will automatically release all savepoints that were defined after it.
</p><p>
All this is happening within the transaction block, so none of it
is visible to other database sessions. When and if you commit the
transaction block, the committed actions become visible as a unit
to other sessions, while the rolled-back actions never become visible
at all.
</p><p>
Remembering the bank database, suppose we debit $100.00 from Alice's
account, and credit Bob's account, only to find later that we should
have credited Wally's account. We could do it using savepoints like
this:
</p><pre class="programlisting">
BEGIN;
UPDATE accounts SET balance = balance - 100.00
WHERE name = 'Alice';
SAVEPOINT my_savepoint;
UPDATE accounts SET balance = balance + 100.00
WHERE name = 'Bob';
-- oops ... forget that and use Wally's account
ROLLBACK TO my_savepoint;
UPDATE accounts SET balance = balance + 100.00
WHERE name = 'Wally';
COMMIT;
</pre><p>
</p><p>
This example is, of course, oversimplified, but there's a lot of control
possible in a transaction block through the use of savepoints.
Moreover, <span class="command"><strong>ROLLBACK TO</strong></span> is the only way to regain control of a
transaction block that was put in aborted state by the
system due to an error, short of rolling it back completely and starting
again.
</p></div><div class="section"><div class="titlepage"><div><div><h2 class="title" style="clear: both"><a name="tutorial-window"></a>Window Functions</h2></div></div></div><a class="indexterm" name="idm46045143941808"></a><p>
A <em class="firstterm">window function</em> performs a calculation across a set of
table rows that are somehow related to the current row. This is comparable
to the type of calculation that can be done with an aggregate function.
But unlike regular aggregate functions, use of a window function does not
cause rows to become grouped into a single output row __mdash__ the
rows retain their separate identities. Behind the scenes, the window
function is able to access more than just the current row of the query
result.
</p><p>
Here is an example that shows how to compare each employee's salary
with the average salary in his or her department:
</p><pre class="programlisting">
SELECT depname, empno, salary, avg(salary) OVER (PARTITION BY depname) FROM empsalary;
</pre><p>
</p><pre class="screen">
depname | empno | salary | avg
-----------+-------+--------+-----------------------
develop | 11 | 5200 | 5020.0000000000000000
develop | 7 | 4200 | 5020.0000000000000000
develop | 9 | 4500 | 5020.0000000000000000
develop | 8 | 6000 | 5020.0000000000000000
develop | 10 | 5200 | 5020.0000000000000000
personnel | 5 | 3500 | 3700.0000000000000000
personnel | 2 | 3900 | 3700.0000000000000000
sales | 3 | 4800 | 4866.6666666666666667
sales | 1 | 5000 | 4866.6666666666666667
sales | 4 | 4800 | 4866.6666666666666667
(10 rows)
</pre><p>
The first three output columns come directly from the table
<code class="varname">empsalary</code>, and there is one output row for each row in the
table. The fourth column represents an average taken across all the table
rows that have the same <code class="varname">depname</code> value as the current row.
(This actually is the same function as the regular <code class="function">avg</code>
aggregate function, but the <code class="literal">OVER</code> clause causes it to be
treated as a window function and computed across an appropriate set of
rows.)
</p><p>
A window function call always contains an <code class="literal">OVER</code> clause
directly following the window function's name and argument(s). This is what
syntactically distinguishes it from a regular function or aggregate
function. The <code class="literal">OVER</code> clause determines exactly how the
rows of the query are split up for processing by the window function.
The <code class="literal">PARTITION BY</code> list within <code class="literal">OVER</code> specifies
dividing the rows into groups, or partitions, that share the same
values of the <code class="literal">PARTITION BY</code> expression(s). For each row,
the window function is computed across the rows that fall into the
same partition as the current row.
</p><p>
You can also control the order in which rows are processed by
window functions using <code class="literal">ORDER BY</code> within <code class="literal">OVER</code>.
(The window <code class="literal">ORDER BY</code> does not even have to match the
order in which the rows are output.) Here is an example:
</p><pre class="programlisting">
SELECT depname, empno, salary,
rank() OVER (PARTITION BY depname ORDER BY salary DESC)
FROM empsalary;
</pre><p>
</p><pre class="screen">
depname | empno | salary | rank
-----------+-------+--------+------
develop | 8 | 6000 | 1
develop | 10 | 5200 | 2
develop | 11 | 5200 | 2
develop | 9 | 4500 | 4
develop | 7 | 4200 | 5
personnel | 2 | 3900 | 1
personnel | 5 | 3500 | 2
sales | 1 | 5000 | 1
sales | 4 | 4800 | 2
sales | 3 | 4800 | 2
(10 rows)
</pre><p>
As shown here, the <code class="function">rank</code> function produces a numerical rank
within the current row's partition for each distinct <code class="literal">ORDER BY</code>
value, in the order defined by the <code class="literal">ORDER BY</code> clause.
<code class="function">rank</code> needs no explicit parameter, because its behavior
is entirely determined by the <code class="literal">OVER</code> clause.
</p><p>
The rows considered by a window function are those of the <span class="quote">“<span class="quote">virtual
table</span>”</span> produced by the query's <code class="literal">FROM</code> clause as filtered by its
<code class="literal">WHERE</code>, <code class="literal">GROUP BY</code>, and <code class="literal">HAVING</code> clauses
if any. For example, a row removed because it does not meet the
<code class="literal">WHERE</code> condition is not seen by any window function.
A query can contain multiple window functions that slice up the data
in different ways by means of different <code class="literal">OVER</code> clauses, but
they all act on the same collection of rows defined by this virtual table.
</p><p>
We already saw that <code class="literal">ORDER BY</code> can be omitted if the ordering
of rows is not important. It is also possible to omit <code class="literal">PARTITION
BY</code>, in which case there is just one partition containing all the rows.
</p><p>
There is another important concept associated with window functions:
for each row, there is a set of rows within its partition called its
<em class="firstterm">window frame</em>. Many (but not all) window functions act only
on the rows of the window frame, rather than of the whole partition.
By default, if <code class="literal">ORDER BY</code> is supplied then the frame consists of
all rows from the start of the partition up through the current row, plus
any following rows that are equal to the current row according to the
<code class="literal">ORDER BY</code> clause. When <code class="literal">ORDER BY</code> is omitted the
default frame consists of all rows in the partition.
<a href="#ftn.idm46045143919456" class="footnote" name="idm46045143919456"><sup class="footnote">[1]</sup></a>
Here is an example using <code class="function">sum</code>:
</p><pre class="programlisting">
SELECT salary, sum(salary) OVER () FROM empsalary;
</pre><pre class="screen">
salary | sum
--------+-------
5200 | 47100
5000 | 47100
3500 | 47100
4800 | 47100
3900 | 47100
4200 | 47100
4500 | 47100
4800 | 47100
6000 | 47100
5200 | 47100
(10 rows)
</pre><p>
Above, since there is no <code class="literal">ORDER BY</code> in the <code class="literal">OVER</code>
clause, the window frame is the same as the partition, which for lack of
<code class="literal">PARTITION BY</code> is the whole table; in other words each sum is
taken over the whole table and so we get the same result for each output
row. But if we add an <code class="literal">ORDER BY</code> clause, we get very different
results:
</p><pre class="programlisting">
SELECT salary, sum(salary) OVER (ORDER BY salary) FROM empsalary;
</pre><pre class="screen">
salary | sum
--------+-------
3500 | 3500
3900 | 7400
4200 | 11600
4500 | 16100
4800 | 25700
4800 | 25700
5000 | 30700
5200 | 41100
5200 | 41100
6000 | 47100
(10 rows)
</pre><p>
Here the sum is taken from the first (lowest) salary up through the
current one, including any duplicates of the current one (notice the
results for the duplicated salaries).
</p><p>
Window functions are permitted only in the <code class="literal">SELECT</code> list
and the <code class="literal">ORDER BY</code> clause of the query. They are forbidden
elsewhere, such as in <code class="literal">GROUP BY</code>, <code class="literal">HAVING</code>
and <code class="literal">WHERE</code> clauses. This is because they logically
execute after the processing of those clauses. Also, window functions
execute after regular aggregate functions. This means it is valid to
include an aggregate function call in the arguments of a window function,
but not vice versa.
</p><p>
If there is a need to filter or group rows after the window calculations
are performed, you can use a sub-select. For example:
</p><pre class="programlisting">
SELECT depname, empno, salary, enroll_date
FROM
(SELECT depname, empno, salary, enroll_date,
rank() OVER (PARTITION BY depname ORDER BY salary DESC, empno) AS pos
FROM empsalary
) AS ss
WHERE pos __lt__ 3;
</pre><p>
The above query only shows the rows from the inner query having
<code class="literal">rank</code> less than 3.
</p><p>
When a query involves multiple window functions, it is possible to write
out each one with a separate <code class="literal">OVER</code> clause, but this is
duplicative and error-prone if the same windowing behavior is wanted
for several functions. Instead, each windowing behavior can be named
in a <code class="literal">WINDOW</code> clause and then referenced in <code class="literal">OVER</code>.
For example:
</p><pre class="programlisting">
SELECT sum(salary) OVER w, avg(salary) OVER w
FROM empsalary
WINDOW w AS (PARTITION BY depname ORDER BY salary DESC);
</pre><p>
</p><p>
More details about window functions can be found in
<a class="xref" href="#">???</a>,
<a class="xref" href="#">???</a>,
<a class="xref" href="#">???</a>, and the
<a class="xref" href="#">???</a> reference page.
</p></div><div class="section"><div class="titlepage"><div><div><h2 class="title" style="clear: both"><a name="tutorial-inheritance"></a>Inheritance</h2></div></div></div><a class="indexterm" name="idm46045143902640"></a><p>
Inheritance is a concept from object-oriented databases. It opens
up interesting new possibilities of database design.
</p><p>
Let's create two tables: A table <code class="classname">cities</code>
and a table <code class="classname">capitals</code>. Naturally, capitals
are also cities, so you want some way to show the capitals
implicitly when you list all cities. If you're really clever you
might invent some scheme like this:
</p><pre class="programlisting">
CREATE TABLE capitals (
name text,
population real,
altitude int, -- (in ft)
state char(2)
);
CREATE TABLE non_capitals (
name text,
population real,
altitude int -- (in ft)
);
CREATE VIEW cities AS
SELECT name, population, altitude FROM capitals
UNION
SELECT name, population, altitude FROM non_capitals;
</pre><p>
This works OK as far as querying goes, but it gets ugly when you
need to update several rows, for one thing.
</p><p>
A better solution is this:
</p><pre class="programlisting">
CREATE TABLE cities (
name text,
population real,
altitude int -- (in ft)
);
CREATE TABLE capitals (
state char(2)
) INHERITS (cities);
</pre><p>
</p><p>
In this case, a row of <code class="classname">capitals</code>
<em class="firstterm">inherits</em> all columns (<code class="varname">name</code>,
<code class="varname">population</code>, and <code class="varname">altitude</code>) from its
<em class="firstterm">parent</em>, <code class="classname">cities</code>. The
type of the column <code class="varname">name</code> is
<span class="type">text</span>, a native <span class="productname">PostgreSQL</span>
type for variable length character strings. State capitals have
an extra column, <code class="varname">state</code>, that shows their state. In
<span class="productname">PostgreSQL</span>, a table can inherit from
zero or more other tables.
</p><p>
For example, the following query finds the names of all cities,
including state capitals, that are located at an altitude
over 500 feet:
</p><pre class="programlisting">
SELECT name, altitude
FROM cities
WHERE altitude __gt__ 500;
</pre><p>
which returns:
</p><pre class="screen">
name | altitude
-----------+----------
Las Vegas | 2174
Mariposa | 1953
Madison | 845
(3 rows)
</pre><p>
</p><p>
On the other hand, the following query finds
all the cities that are not state capitals and
are situated at an altitude over 500 feet:
</p><pre class="programlisting">
SELECT name, altitude
FROM ONLY cities
WHERE altitude __gt__ 500;
</pre><p>
</p><pre class="screen">
name | altitude
-----------+----------
Las Vegas | 2174
Mariposa | 1953
(2 rows)
</pre><p>
</p><p>
Here the <code class="literal">ONLY</code> before <code class="literal">cities</code>
indicates that the query should be run over only the
<code class="classname">cities</code> table, and not tables below
<code class="classname">cities</code> in the inheritance hierarchy. Many
of the commands that we have already discussed __mdash__
<span class="command"><strong>SELECT</strong></span>, <span class="command"><strong>UPDATE</strong></span>, and
<span class="command"><strong>DELETE</strong></span> __mdash__ support this <code class="literal">ONLY</code>
notation.
</p><div class="note" style="margin-left: 0.5in; margin-right: 0.5in;"><h3 class="title">Note</h3><p>
Although inheritance is frequently useful, it has not been integrated
with unique constraints or foreign keys, which limits its usefulness.
See <a class="xref" href="#">???</a> for more detail.
</p></div></div><div class="section"><div class="titlepage"><div><div><h2 class="title" style="clear: both"><a name="tutorial-conclusion"></a>Conclusion</h2></div></div></div><p>
<span class="productname">PostgreSQL</span> has many features not
touched upon in this tutorial introduction, which has been
oriented toward newer users of <acronym class="acronym">SQL</acronym>. These
features are discussed in more detail in the remainder of this
book.
</p><p>
If you feel you need more introductory material, please visit the PostgreSQL
<a class="ulink" href="http://www.postgresql.org" target="_top">web site</a>
for links to more resources.
</p></div><div class="footnotes"><br><hr style="width:100; text-align:left;margin-left: 0"><div id="ftn.idm46045143919456" class="footnote"><p><a href="#idm46045143919456" class="para"><sup class="para">[1] </sup></a>
There are options to define the window frame in other ways, but
this tutorial does not cover them. See
<a class="xref" href="#">???</a> for details.
</p></div></div></div></body></html>
[text/x-xslfo] advanced.fo (77.0K, 5-advanced.fo)
download
[application/pdf] advanced.pdf (33.4K, 6-advanced.pdf)
download
^ permalink raw reply [nested|flat] 86+ messages in thread
* Re: Docbook 5.x
2016-04-20 14:30 Docbook 5.x Jürgen Purtz <[email protected]>
@ 2016-04-20 15:59 ` Alexander Law <[email protected]>
2 siblings, 0 replies; 86+ messages in thread
From: Alexander Law @ 2016-04-20 15:59 UTC (permalink / raw)
To: Jürgen Purtz <[email protected]>; pgsql-docs
Hello Jürgen,
Please look at the discussion that we had some time ago:
http://www.postgresql.org/message-id/[email protected]
And we (postgrespro) still have plans to migrate to XML as soon as we
get documentation translated.
We had no issues with SGML->XML conversion, "make postgres.xml" creates
XML (with entities and alike), which we use.
When you talking about "conversion of html, fo, pdf, ..." do you mean
using docs/sgml/Makefile or some other scripts?
As to conversion SGML to XML, we need to decide whether to generate a
single XML, or a set of XMLs (corresponding to current SGMLs).
In the latter case - how to include XML-fragments into the main document
(as entities or with xi:include)?
Please, can you explain what are "Docbooks xslt-migration scripts"?
Is Docbook 4.x incompatible with Docbook 5.x and we need to convert it
additionally?
Best regards,
Alexander
-----
Alexander Lakhin
Postgres Professional: http://www.postgrespro.com
The Russian Postgres Company
20.04.2016 17:30, Jürgen Purtz пишет:
> Hi,
> actually we use DocBook V4.2 for the PostgreSQL manuals. I suggest an
> upgrade to DocBook 5.x. This sounds simple, but it will be a long
> process with many sub-tasks.
>
> Rationale:
>
> * Sooner or later we MUST migrate as the 4.x series is outdated:
> V4.2 dates back to 2002. The 4.x series is no longer actively
> developed since 2006. See:
> http://www.docbook.org/tdg5/en/html/ch01.html "In October 2006,
> the DocBook Technical Committee released DocBook V4.5, the last
> release planned in the 4.x series."
> * V5.0 is available since 2009. See:
> http://www.docbook.org/tdg5/en/html/ch01.html: "DocBook V5.0
> became an official Committee Specification in June 2009 and became
> an officia7l OASIS Standard in October 2009."
> * Actually the technical committee has the third Candidate Release
> for V5.1.
>
>
> PROs:
>
> * The formal part of the migration is supported by existing tools:
> http://docbook.org/docs/howto/#convert4to5 (nevertheless some
> scripts written by ourself will be necessary).
> * The normative schema for Docbook 5.x is written in RELAX NG.
> Additionally the technical committee converts this normative
> schema to a XSD schema and to DTD, which are not normative but
> very near to RELAX NG and will fit for most applications. Hence,
> we have the choice between three schema syntaxes and everybody can
> use his favourite one.
> * Our source file format will switch from SGML to XML. This implies
> that we have access to all XML features like XLink, XPath, XSLT,
> XSL-FO, SVG, MathML, namespaces, ... .
>
> CONs:
>
> * The migration from 4.x to 5.x implies major changes at 3 different
> levels.
> o DocBook structure: Previously it was defined in SGML syntax
> (DTD). Now it is defined in RELAX NG schema language plus
> Schematron rules.
> o DocBook files: Previously we used SGML syntax for our files.
> We must convert them to a valid XML syntax, eg: tag omission.
> o Tools and style sheets: All tools which operate at the native
> SGML-level (editors, conversions, ...) must be replaced by XML
> conforming tools. As valid XML implicitly conforms to a valid
> SGML syntax this step may be accomplished by reconfiguring
> some of the tools, eg.: .emacs.
>
> What I have done so far is:
>
> * Conversion of sgml files to valid xml syntax with a perl skript. I
> failed to use 'osx' or 'spam'.
> * Conversion of these xml files to Docbook5.x format using xsltproc
> and Docbooks xslt-migration skripts.
> * Creation of html files using xsltproc and Docbooks xslt skripts.
> * Creation of fo files using xsltproc and Docbooks xslt skripts.
> * Creation of pdf files using fop.
> * The conversions needs less than 10 minutes on a Intel i5 processor.
>
> This is a very first raw round-trip with one output file per sgml file
> and output type. Not supported: entities (__gt__ as a surrogate),
> <[CDATA and similar SGML constructs, PostgreSQL specific style sheets,
> Makefile, additional errors occur, .... . I append one file of every
> new format for the chapter "Advanced Features": xml (the new source),
> html, fo, pdf.
>
> Any ideas or suggestions? Shall we go further on this way? Has anybody
> more experiences in SGML-->XML conversions or Docbook 4.x --> 5.x
> conversions?
>
> Kind regards
> Jürgen Purtz
>
>
>
^ permalink raw reply [nested|flat] 86+ messages in thread
* Re: Docbook 5.x
2016-04-20 14:30 Docbook 5.x Jürgen Purtz <[email protected]>
@ 2016-04-20 18:41 ` Simon Riggs <[email protected]>
2016-04-21 13:34 ` Re: Docbook 5.x Jürgen Purtz <[email protected]>
2016-05-03 19:19 ` Re: Docbook 5.x Jürgen Purtz <[email protected]>
2 siblings, 2 replies; 86+ messages in thread
From: Simon Riggs @ 2016-04-20 18:41 UTC (permalink / raw)
To: Jürgen Purtz <[email protected]>; +Cc: pgsql-docs
On 20 April 2016 at 15:30, Jürgen Purtz <[email protected]> wrote:
> What I have done so far is:
>
> - Conversion of sgml files to valid xml syntax with a perl skript. I
> failed to use 'osx' or 'spam'.
> - Conversion of these xml files to Docbook5.x format using xsltproc
> and Docbooks xslt-migration skripts.
> - Creation of html files using xsltproc and Docbooks xslt skripts.
> - Creation of fo files using xsltproc and Docbooks xslt skripts.
> - Creation of pdf files using fop.
> - The conversions needs less than 10 minutes on a Intel i5 processor.
>
> So you believe you have/can convert between the two formats accurately, so
we can change things in a single commit?
What verification is offered? Possible?
And that is ready to go now? Will you post your perl script, or the patch?
Other projects use the same file formats, e.g. Slony, XL etc
If an automatic migration is possible do we need to change at all?
--
Simon Riggs http://www.2ndQuadrant.com/
<http://www.2ndquadrant.com/;
PostgreSQL Development, 24x7 Support, Remote DBA, Training & Services
^ permalink raw reply [nested|flat] 86+ messages in thread
* Re: Docbook 5.x
2016-04-20 14:30 Docbook 5.x Jürgen Purtz <[email protected]>
2016-04-20 18:41 ` Re: Docbook 5.x Simon Riggs <[email protected]>
@ 2016-04-21 13:34 ` Jürgen Purtz <[email protected]>
1 sibling, 0 replies; 86+ messages in thread
From: Jürgen Purtz @ 2016-04-21 13:34 UTC (permalink / raw)
To: pgsql-docs; +Cc: Simon Riggs <[email protected]>; Alexander Law <[email protected]>
On 20.04.2016 20:41, Simon Riggs wrote:
> On 20 April 2016 at 15:30, Jürgen Purtz <[email protected]
> <mailto:[email protected]>> wrote:
>
> What I have done so far is:
>
> * Conversion of sgml files to valid xml syntax with a perl
> skript. I failed to use 'osx' or 'spam'.
> * Conversion of these xml files to Docbook5.x format using
> xsltproc and Docbooks xslt-migration skripts.
> * Creation of html files using xsltproc and Docbooks xslt skripts.
> * Creation of fo files using xsltproc and Docbooks xslt skripts.
> * Creation of pdf files using fop.
> * The conversions needs less than 10 minutes on a Intel i5
> processor.
>
> So you believe you have/can convert between the two formats
> accurately, so we can change things in a single commit?
>
> What verification is offered? Possible?
>
> And that is ready to go now? Will you post your perl script, or the
> patch? Other projects use the same file formats, e.g. Slony, XL etc
>
> If an automatic migration is possible do we need to change at all?
>
> --
> Simon Riggs http://www.2ndQuadrant.com/ <http://www.2ndquadrant.com/;
> PostgreSQL Development, 24x7 Support, Remote DBA, Training & Services
Hi,
actually I have done only a first raw round-trip to evaluate that there
is no showstopper for my plans. If we find a consensus in the community
that this work is valuable for the postgres documentation I will
continue to work on it in the near future. To answer your questions:
* "do we need to change at all?". This question has to be discussed in
the community. I tried to use the recommended tools like 'osx' and
'spam' - and failed (not at all but in details like newline
processing). This may be a my fault, or it results from the fact
that we still use sgml instead of xml. But over time this task will
get harder and harder: sgml knowledge gets lost, sgml-tools are no
longer actively developed, xml move foreward, ...
* Actually I don't see any showstopper. Therefore I believe that the
conversion from Docbook 4 to 5 is manageable. The plan is that we
will have one xml-file in db5 format per every sgml file in db4 format.
* To support the repository in a continuous way we shall do something
like 'git mv file.sgml file.xml', put the new content to 'file.xml'
and 'git commit'. Additionally the newlines must be kept during all
conversation steps.
* Maybe some very individual (manual) steps are necessary, but it
shall be possible that also this can be scripted. Therefore the
conversion shall run fast and a single commit shall work on the
complete documentation.
* There are no special "Postgres" tasks in the Perl script or at any
other places. It depends on docbook only. Therefore other projects
can use it in the same way. Of course I will publish all sources.
* Actually I try to generate well-formed xml. Validation against the
Docbook 5 schema will follow.
Alexander Law posted additional suggestions and questions:
Hello Jürgen,
Please look at the discussion that we had some time ago:
http://www.postgresql.org/message-id/[email protected]
And we (postgrespro) still have plans to migrate to XML as soon as
we get documentation translated.
We had no issues with SGML->XML conversion, "make postgres.xml"
creates XML (with entities and alike), which we use.
When you talking about "conversion of html, fo, pdf, ..." do you
mean using docs/sgml/Makefile or some other scripts?
As to conversion SGML to XML, we need to decide whether to generate
a single XML, or a set of XMLs (corresponding to current SGMLs).
In the latter case - how to include XML-fragments into the main
document (as entities or with xi:include)?
Please, can you explain what are "Docbooks xslt-migration scripts"?
Is Docbook 4.x incompatible with Docbook 5.x and we need to convert
it additionally?
Best regards,
Alexander
-----
Alexander Lakhin
Postgres Professional: http://www.postgrespro.com
The Russian Postgres Company
My answers:
* Docbook 4 and 5 are not compatible. There are new elements, others
have gone and are replaced by more generic ones. But the Docbook
project offers xslt's to convert Docbook 4 xml-files to Docbook5
xml-files.
* There are pros and cons using postgres.xml as a starting point. PRO:
well formed (and valid?) xml format. Entities keeps alive. No more
"<![CDATA[", "<![%include" and similar sgml constructs. CON: Only
one file. Ugly line break algorithm.
* Actually I don't use the existing Makefile. I start Perl, xsltproc
and fop with a different script. If I continue to work, I have to
change the Makefile.
* "how to include XML-fragments into the main document (as entities or
with xi:include) ?". As described above, I prefer one file per
existing sgml-file. But some of those sgml-files have more than one
root element. It such situations (and without further processing)
the resulting xml-files will have fragments. In general it will be
more "Docbook 5 compliant" to use xi:include instead of entities.
* "Docbooks xslt-migration scripts": see:
http://docbook.org/docs/howto/#convert4to5
Kind regards
Jürgen Purtz
^ permalink raw reply [nested|flat] 86+ messages in thread
* Re: Docbook 5.x
2016-04-20 14:30 Docbook 5.x Jürgen Purtz <[email protected]>
2016-04-20 18:41 ` Re: Docbook 5.x Simon Riggs <[email protected]>
@ 2016-05-03 19:19 ` Jürgen Purtz <[email protected]>
1 sibling, 0 replies; 86+ messages in thread
From: Jürgen Purtz @ 2016-05-03 19:19 UTC (permalink / raw)
To: Simon Riggs <[email protected]>; pgsql-docs
Hello,
the conversion of PostgreSQL documentation from Docbook 4.x to 5.x
consists of the following steps:
1. pure sgml --> xml conversion (done, Perl script)
2. 4.x markup --> 5.x markup (done, Docbook standard migration script)
3. post-processing of 5.x files (done, Perl: xi:include, entities, ...)
4. generate the complete file postgres_all.xml with xmllint (done)
5. generate online documentation (html, man, text)
6. generate print documentation (rtf, pdf)
7. adopt Makefile to the new situation
After step 3 we have well-formed xml files, most of them are valid
against Docbook 5.0 xsd. Actually the following non-valid situations occur:
* a lot of unknown xref targets, as the target exists in a different file
* 4 remaining sgml-entities: standalone-xxx and include-xxx
* some markups, which are not valid in 5.x, mostly with <synopsis> and
<function>. This must be resolved manually (5.x offers comprehensive
possibilities for very detailed markups with <funcsynopsis> and
<cmdsynopsis>)
Steps 5 and 6 implies the replacement of our dsssl script with xslt
scripts. I guess that this is much more difficult and lengthy than
everything else I have done in this project so far. Furthermore I don't
have any knowledge about dsssl. And this is the reason why I write this
mail. Is anybody out there who can support me for the dsssl --> xslt
conversion - or at least can answer questions like:
* Is our file stylesheet.dsl written from scratch - or is it derived
from any docbook 1/2/3/4.x generic stylesheet?
* Which person has developed this file?
* What is the role of the *.xsl files in the sgml-directory and how do
they collaborate with stylesheet.dsl?
Regards, Jürgen
On 20.04.2016 20:41, Simon Riggs wrote:
> On 20 April 2016 at 15:30, Jürgen Purtz <[email protected]
> <mailto:[email protected]>> wrote:
>
> What I have done so far is:
>
> * Conversion of sgml files to valid xml syntax with a perl
> skript. I failed to use 'osx' or 'spam'.
> * Conversion of these xml files to Docbook5.x format using
> xsltproc and Docbooks xslt-migration skripts.
> * Creation of html files using xsltproc and Docbooks xslt skripts.
> * Creation of fo files using xsltproc and Docbooks xslt skripts.
> * Creation of pdf files using fop.
> * The conversions needs less than 10 minutes on a Intel i5
> processor.
>
> So you believe you have/can convert between the two formats
> accurately, so we can change things in a single commit?
>
> What verification is offered? Possible?
>
> And that is ready to go now? Will you post your perl script, or the
> patch? Other projects use the same file formats, e.g. Slony, XL etc
>
> If an automatic migration is possible do we need to change at all?
>
> --
> Simon Riggs http://www.2ndQuadrant.com/ <http://www.2ndquadrant.com/;
> PostgreSQL Development, 24x7 Support, Remote DBA, Training & Services
^ permalink raw reply [nested|flat] 86+ messages in thread
* Re: Docbook 5.x
2016-04-20 14:30 Docbook 5.x Jürgen Purtz <[email protected]>
@ 2016-05-03 19:34 ` Alvaro Herrera <[email protected]>
2016-05-03 19:59 ` Re: Docbook 5.x Joshua D. Drake <[email protected]>
2016-05-03 20:13 ` Re: Docbook 5.x Oleg Bartunov <[email protected]>
2 siblings, 2 replies; 86+ messages in thread
From: Alvaro Herrera @ 2016-05-03 19:34 UTC (permalink / raw)
To: Jürgen Purtz <[email protected]>; +Cc: pgsql-docs
Jürgen Purtz wrote:
> Hi,
> actually we use DocBook V4.2 for the PostgreSQL manuals. I suggest an
> upgrade to DocBook 5.x. This sounds simple, but it will be a long process
> with many sub-tasks.
Yes, agreed. The killer objection placed last time was that it took
something like 10x longer to generate the HTML using the XML-based
toolchain than the SGML-based ones. If this is not fixed, let's forget
about this whole thing until it is. So, would you time the process
using both toolchains and report back?
--
Álvaro Herrera http://www.2ndQuadrant.com/
PostgreSQL Development, 24x7 Support, Remote DBA, Training & Services
--
Sent via pgsql-docs mailing list ([email protected])
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-docs
^ permalink raw reply [nested|flat] 86+ messages in thread
* Re: Docbook 5.x
2016-04-20 14:30 Docbook 5.x Jürgen Purtz <[email protected]>
2016-05-03 19:34 ` Re: Docbook 5.x Alvaro Herrera <[email protected]>
@ 2016-05-03 19:59 ` Joshua D. Drake <[email protected]>
2016-05-03 20:55 ` Re: Docbook 5.x Tom Lane <[email protected]>
1 sibling, 1 reply; 86+ messages in thread
From: Joshua D. Drake @ 2016-05-03 19:59 UTC (permalink / raw)
To: Alvaro Herrera <[email protected]>; Jürgen Purtz <[email protected]>; +Cc: pgsql-docs
On 05/03/2016 12:34 PM, Alvaro Herrera wrote:
> Jürgen Purtz wrote:
>> Hi,
>> actually we use DocBook V4.2 for the PostgreSQL manuals. I suggest an
>> upgrade to DocBook 5.x. This sounds simple, but it will be a long process
>> with many sub-tasks.
>
> Yes, agreed. The killer objection placed last time was that it took
> something like 10x longer to generate the HTML using the XML-based
> toolchain than the SGML-based ones. If this is not fixed, let's forget
> about this whole thing until it is. So, would you time the process
> using both toolchains and report back?
IIRC:
TGL submitted a patch for the openjade bug way back when that caused
that issue.
TGL, do you know what happened there?
Sincerely,
JD
--
Command Prompt, Inc. http://the.postgres.company/
+1-503-667-4564
PostgreSQL Centered full stack support, consulting and development.
Everyone appreciates your honesty, until you are honest with them.
--
Sent via pgsql-docs mailing list ([email protected])
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-docs
^ permalink raw reply [nested|flat] 86+ messages in thread
* Re: Docbook 5.x
2016-04-20 14:30 Docbook 5.x Jürgen Purtz <[email protected]>
2016-05-03 19:34 ` Re: Docbook 5.x Alvaro Herrera <[email protected]>
2016-05-03 19:59 ` Re: Docbook 5.x Joshua D. Drake <[email protected]>
@ 2016-05-03 20:55 ` Tom Lane <[email protected]>
2016-05-03 21:05 ` Re: Docbook 5.x Tom Lane <[email protected]>
0 siblings, 1 reply; 86+ messages in thread
From: Tom Lane @ 2016-05-03 20:55 UTC (permalink / raw)
To: Joshua D. Drake <[email protected]>; +Cc: Alvaro Herrera <[email protected]>; Jürgen Purtz <[email protected]>; pgsql-docs
"Joshua D. Drake" <[email protected]> writes:
> On 05/03/2016 12:34 PM, Alvaro Herrera wrote:
>> Yes, agreed. The killer objection placed last time was that it took
>> something like 10x longer to generate the HTML using the XML-based
>> toolchain than the SGML-based ones. If this is not fixed, let's forget
>> about this whole thing until it is. So, would you time the process
>> using both toolchains and report back?
> IIRC:
> TGL submitted a patch for the openjade bug way back when that caused
> that issue.
I think you're thinking of this:
http://www.postgresql.org/message-id/[email protected]
I do not recall just when/how that got resolved upstream, or if they
ever even responded to me. But it must have been resolved, because the
performance before that was patched was untenable even then, and would be
far more so now considering how much our docs have grown since 2006.
I have not heard anyone complaining lately that PDF output takes three
days to build.
In short, I doubt that that's relevant anymore. If it was, it would
certainly not be favorable to the XML toolchain.
BTW, the thread that that message is embedded in is pretty relevant,
because it was all about yet another lets-switch-to-XML proposal...
regards, tom lane
--
Sent via pgsql-docs mailing list ([email protected])
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-docs
^ permalink raw reply [nested|flat] 86+ messages in thread
* Re: Docbook 5.x
2016-04-20 14:30 Docbook 5.x Jürgen Purtz <[email protected]>
2016-05-03 19:34 ` Re: Docbook 5.x Alvaro Herrera <[email protected]>
2016-05-03 19:59 ` Re: Docbook 5.x Joshua D. Drake <[email protected]>
2016-05-03 20:55 ` Re: Docbook 5.x Tom Lane <[email protected]>
@ 2016-05-03 21:05 ` Tom Lane <[email protected]>
0 siblings, 0 replies; 86+ messages in thread
From: Tom Lane @ 2016-05-03 21:05 UTC (permalink / raw)
To: Joshua D. Drake <[email protected]>; +Cc: Alvaro Herrera <[email protected]>; Jürgen Purtz <[email protected]>; pgsql-docs
I wrote:
> "Joshua D. Drake" <[email protected]> writes:
>> IIRC:
>> TGL submitted a patch for the openjade bug way back when that caused
>> that issue.
> I think you're thinking of this:
> http://www.postgresql.org/message-id/[email protected]
> I do not recall just when/how that got resolved upstream, or if they
> ever even responded to me. But it must have been resolved, because the
> performance before that was patched was untenable even then, and would be
> far more so now considering how much our docs have grown since 2006.
Actually, further digging suggests that Peter found a way to hack our
stylesheets to avoid that openjade bug:
http://www.postgresql.org/message-id/[email protected]
http://git.postgresql.org/gitweb/?p=postgresql.git&a=commitdiff&h=465269b8a
So it's possible that the openjade bug is still there, but has been
defanged for our purposes. In any case, there's still little reason
to think that it would apply to a different toolchain.
regards, tom lane
--
Sent via pgsql-docs mailing list ([email protected])
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-docs
^ permalink raw reply [nested|flat] 86+ messages in thread
* Re: Docbook 5.x
2016-04-20 14:30 Docbook 5.x Jürgen Purtz <[email protected]>
2016-05-03 19:34 ` Re: Docbook 5.x Alvaro Herrera <[email protected]>
@ 2016-05-03 20:13 ` Oleg Bartunov <[email protected]>
2016-05-04 00:44 ` Re: Docbook 5.x Peter Eisentraut <[email protected]>
2016-05-04 14:44 ` Re: Docbook 5.x Jürgen Purtz <[email protected]>
1 sibling, 2 replies; 86+ messages in thread
From: Oleg Bartunov @ 2016-05-03 20:13 UTC (permalink / raw)
To: Alvaro Herrera <[email protected]>; Alexander Lakhin <[email protected]>; +Cc: Jürgen Purtz <[email protected]>; pgsql-docs
On Tue, May 3, 2016 at 10:34 PM, Alvaro Herrera <[email protected]>
wrote:
> Jürgen Purtz wrote:
> > Hi,
> > actually we use DocBook V4.2 for the PostgreSQL manuals. I suggest an
> > upgrade to DocBook 5.x. This sounds simple, but it will be a long process
> > with many sub-tasks.
>
> Yes, agreed. The killer objection placed last time was that it took
> something like 10x longer to generate the HTML using the XML-based
> toolchain than the SGML-based ones. If this is not fixed, let's forget
> about this whole thing until it is. So, would you time the process
> using both toolchains and report back?
>
As it stated in
http://www.postgresql.org/message-id/[email protected]
the xml performance may be greatly improved. Alexander, what is current
state of art of your patch ? How slow is xml in compare to sgml ?
> --
> Álvaro Herrera http://www.2ndQuadrant.com/
> PostgreSQL Development, 24x7 Support, Remote DBA, Training & Services
>
>
> --
> Sent via pgsql-docs mailing list ([email protected])
> To make changes to your subscription:
> http://www.postgresql.org/mailpref/pgsql-docs
>
^ permalink raw reply [nested|flat] 86+ messages in thread
* Re: Docbook 5.x
2016-04-20 14:30 Docbook 5.x Jürgen Purtz <[email protected]>
2016-05-03 19:34 ` Re: Docbook 5.x Alvaro Herrera <[email protected]>
2016-05-03 20:13 ` Re: Docbook 5.x Oleg Bartunov <[email protected]>
@ 2016-05-04 00:44 ` Peter Eisentraut <[email protected]>
2016-05-05 04:45 ` Re: Docbook 5.x Alexander Law <[email protected]>
1 sibling, 1 reply; 86+ messages in thread
From: Peter Eisentraut @ 2016-05-04 00:44 UTC (permalink / raw)
To: [email protected]; Alvaro Herrera <[email protected]>; Alexander Lakhin <[email protected]>; +Cc: Jürgen Purtz <[email protected]>; pgsql-docs
On 5/3/16 4:13 PM, Oleg Bartunov wrote:
> As it stated in
> http://www.postgresql.org/message-id/[email protected]
> the xml performance may be greatly improved. Alexander, what is current
> state of art of your patch ? How slow is xml in compare to sgml ?
Please make sure the patch is registered in the next commit fest.
--
Peter Eisentraut http://www.2ndQuadrant.com/
PostgreSQL Development, 24x7 Support, Remote DBA, Training & Services
--
Sent via pgsql-docs mailing list ([email protected])
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-docs
^ permalink raw reply [nested|flat] 86+ messages in thread
* Re: Docbook 5.x
2016-04-20 14:30 Docbook 5.x Jürgen Purtz <[email protected]>
2016-05-03 19:34 ` Re: Docbook 5.x Alvaro Herrera <[email protected]>
2016-05-03 20:13 ` Re: Docbook 5.x Oleg Bartunov <[email protected]>
2016-05-04 00:44 ` Re: Docbook 5.x Peter Eisentraut <[email protected]>
@ 2016-05-05 04:45 ` Alexander Law <[email protected]>
2016-06-03 19:31 ` Re: Docbook 5.x Peter Eisentraut <[email protected]>
0 siblings, 1 reply; 86+ messages in thread
From: Alexander Law @ 2016-05-05 04:45 UTC (permalink / raw)
To: Peter Eisentraut <[email protected]>; [email protected]; Alvaro Herrera <[email protected]>; Alexander Lakhin <[email protected]>; +Cc: Jürgen Purtz <[email protected]>; pgsql-docs
Done (previous patch cleaned).
This patch optimizes XSL transformations contained in docbook-xsl (1.78.1).
Tested with 9.5.2
time make html
real 1m21.989s
user 1m21.392s
sys 0m0.484s
1) time make xslthtml
(before the patch)
real 29m19.904s
user 29m18.804s
sys 0m0.888s
2) time make xslthtml
(after the patch)
real 3m8.483s
user 3m7.556s
sys 0m0.864s
To make sure that the result of the transformation is the same:
After 1):
mv html html.xslt1
After 2):
mv html html.xslt2
for f in *.xslt*/*.html; do sed -e
's/id=\"\(ftn\.\)\?id[a-z][0-9]\+\"/id=\"id\"/g' -i $f ; sed -e
's/href=\"[^#]*#\(ftn\.\)\?id[a-z][0-9]\+\"/href=\"#\"/g' -i $f; done
diff -u -r html.xslt1 html.xslt2
Best regards,
Alexander
04.05.2016 03:44, Peter Eisentraut пишет:
> On 5/3/16 4:13 PM, Oleg Bartunov wrote:
>> As it stated in
>> http://www.postgresql.org/message-id/[email protected]
>> the xml performance may be greatly improved. Alexander, what is current
>> state of art of your patch ? How slow is xml in compare to sgml ?
>
> Please make sure the patch is registered in the next commit fest.
>
--
Sent via pgsql-docs mailing list ([email protected])
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-docs
Attachments:
[text/x-patch] xslt-speedup.patch (20.6K, 2-xslt-speedup.patch)
download | inline diff:
diff --git a/doc/src/sgml/stylesheet-xhtml-speedup.xsl b/doc/src/sgml/stylesheet-xhtml-speedup.xsl
new file mode 100644
index 0000000..d52b48e
--- /dev/null
+++ b/doc/src/sgml/stylesheet-xhtml-speedup.xsl
@@ -0,0 +1,327 @@
+<?xml version="1.0" encoding="utf-8"?>
+<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
+ version="1.0"
+ xmlns="http://www.w3.org/1999/xhtml"
+ exclude-result-prefixes="#default">
+
+<!-- common/labels.xsl -->
+<xsl:template match="appendix" mode="label.markup">
+ <xsl:choose>
+ <xsl:when test="@label">
+ <xsl:value-of select="@label"/>
+ </xsl:when>
+ <xsl:when test="string($appendix.autolabel) != 0">
+ <xsl:if test="$component.label.includes.part.label != 0 and
+ ancestor::part">
+ <xsl:variable name="part.label">
+ <xsl:apply-templates select="ancestor::part"
+ mode="label.markup"/>
+ </xsl:variable>
+ <xsl:if test="$part.label != ''">
+ <xsl:value-of select="$part.label"/>
+ <xsl:apply-templates select="ancestor::part"
+ mode="intralabel.punctuation"/>
+ </xsl:if>
+ </xsl:if>
+ <xsl:variable name="format">
+ <xsl:call-template name="autolabel.format">
+ <xsl:with-param name="format" select="$appendix.autolabel"/>
+ </xsl:call-template>
+ </xsl:variable>
+ <xsl:choose>
+ <xsl:when test="$label.from.part != 0 and ancestor::part">
+ <xsl:number from="part" count="appendix" format="{$format}" level="any"/>
+ </xsl:when>
+ <xsl:otherwise>
+<!-- speed optimizations for pgsql-docs -->
+ <xsl:number value="count(../preceding-sibling::part/appendix) + count(preceding-sibling::appendix) + 1" format="{$format}" />
+<!-- <xsl:number from="book|article"
+ count="appendix" format="{$format}" level="any"/> -->
+ </xsl:otherwise>
+ </xsl:choose>
+ </xsl:when>
+ </xsl:choose>
+</xsl:template>
+
+<!-- common/labels.xsl -->
+<xsl:template match="chapter" mode="label.markup">
+ <xsl:choose>
+ <xsl:when test="@label">
+ <xsl:value-of select="@label"/>
+ </xsl:when>
+ <xsl:when test="string($chapter.autolabel) != 0">
+ <xsl:if test="$component.label.includes.part.label != 0 and
+ ancestor::part">
+ <xsl:variable name="part.label">
+ <xsl:apply-templates select="ancestor::part"
+ mode="label.markup"/>
+ </xsl:variable>
+ <xsl:if test="$part.label != ''">
+ <xsl:value-of select="$part.label"/>
+ <xsl:apply-templates select="ancestor::part"
+ mode="intralabel.punctuation"/>
+ </xsl:if>
+ </xsl:if>
+ <xsl:variable name="format">
+ <xsl:call-template name="autolabel.format">
+ <xsl:with-param name="format" select="$chapter.autolabel"/>
+ </xsl:call-template>
+ </xsl:variable>
+ <xsl:choose>
+ <xsl:when test="$label.from.part != 0 and ancestor::part">
+ <xsl:number from="part" count="chapter" format="{$format}" level="any"/>
+ </xsl:when>
+ <xsl:otherwise>
+<!-- speed optimizations for pgsql-docs -->
+ <xsl:number value="count(../preceding-sibling::part/chapter) + count(preceding-sibling::chapter) + 1" format="{$format}" />
+<!-- <xsl:number from="book" count="chapter" format="{$format}" level="any"/> -->
+ </xsl:otherwise>
+ </xsl:choose>
+ </xsl:when>
+ </xsl:choose>
+</xsl:template>
+
+<!-- xhtml/autoidx.xsl -->
+<xsl:template match="indexterm" mode="reference">
+ <xsl:param name="scope" select="."/>
+ <xsl:param name="role" select="''"/>
+ <xsl:param name="type" select="''"/>
+ <xsl:param name="position"/>
+ <xsl:param name="separator" select="''"/>
+
+ <xsl:variable name="term.separator">
+ <xsl:call-template name="index.separator">
+ <xsl:with-param name="key" select="'index.term.separator'"/>
+ </xsl:call-template>
+ </xsl:variable>
+
+ <xsl:variable name="number.separator">
+ <xsl:call-template name="index.separator">
+ <xsl:with-param name="key" select="'index.number.separator'"/>
+ </xsl:call-template>
+ </xsl:variable>
+
+ <xsl:variable name="range.separator">
+ <xsl:call-template name="index.separator">
+ <xsl:with-param name="key" select="'index.range.separator'"/>
+ </xsl:call-template>
+ </xsl:variable>
+
+ <xsl:choose>
+ <xsl:when test="$separator != ''">
+ <xsl:value-of select="$separator"/>
+ </xsl:when>
+ <xsl:when test="$position = 1">
+ <xsl:value-of select="$term.separator"/>
+ </xsl:when>
+ <xsl:otherwise>
+ <xsl:value-of select="$number.separator"/>
+ </xsl:otherwise>
+ </xsl:choose>
+
+ <xsl:choose>
+ <xsl:when test="@zone and string(@zone)">
+ <xsl:call-template name="reference">
+ <xsl:with-param name="zones" select="normalize-space(@zone)"/>
+ <xsl:with-param name="position" select="position()"/>
+ <xsl:with-param name="scope" select="$scope"/>
+ <xsl:with-param name="role" select="$role"/>
+ <xsl:with-param name="type" select="$type"/>
+ </xsl:call-template>
+ </xsl:when>
+ <xsl:otherwise>
+ <a>
+ <xsl:apply-templates select="." mode="class.attribute"/>
+ <xsl:variable name="title">
+ <xsl:choose>
+ <xsl:when test="$index.prefer.titleabbrev != 0">
+ <xsl:apply-templates select="(ancestor-or-self::set|ancestor-or-self::book|ancestor-or-self::part|ancestor-or-self::reference|ancestor-or-self::partintro|ancestor-or-self::chapter|ancestor-or-self::appendix|ancestor-or-self::preface|ancestor-or-self::article|ancestor-or-self::section|ancestor-or-self::sect1|ancestor-or-self::sect2|ancestor-or-self::sect3|ancestor-or-self::sect4|ancestor-or-self::sect5|ancestor-or-self::refentry|ancestor-or-self::refsect1|ancestor-or-self::refsect2|ancestor-or-self::refsect3|ancestor-or-self::simplesect|ancestor-or-self::bibliography|ancestor-or-self::glossary|ancestor-or-self::index|ancestor-or-self::webpage|ancestor-or-self::topic)[last()]" mode="titleabbrev.markup"/>
+ </xsl:when>
+ <xsl:otherwise>
+ <xsl:apply-templates select="(ancestor-or-self::set|ancestor-or-self::book|ancestor-or-self::part|ancestor-or-self::reference|ancestor-or-self::partintro|ancestor-or-self::chapter|ancestor-or-self::appendix|ancestor-or-self::preface|ancestor-or-self::article|ancestor-or-self::section|ancestor-or-self::sect1|ancestor-or-self::sect2|ancestor-or-self::sect3|ancestor-or-self::sect4|ancestor-or-self::sect5|ancestor-or-self::refentry|ancestor-or-self::refsect1|ancestor-or-self::refsect2|ancestor-or-self::refsect3|ancestor-or-self::simplesect|ancestor-or-self::bibliography|ancestor-or-self::glossary|ancestor-or-self::index|ancestor-or-self::webpage|ancestor-or-self::topic)[last()]" mode="title.markup"/>
+ </xsl:otherwise>
+ </xsl:choose>
+ </xsl:variable>
+
+ <xsl:attribute name="href">
+ <xsl:choose>
+ <xsl:when test="$index.links.to.section = 1">
+ <xsl:call-template name="href.target">
+ <xsl:with-param name="object" select="(ancestor-or-self::set|ancestor-or-self::book|ancestor-or-self::part|ancestor-or-self::reference|ancestor-or-self::partintro|ancestor-or-self::chapter|ancestor-or-self::appendix|ancestor-or-self::preface|ancestor-or-self::article|ancestor-or-self::section|ancestor-or-self::sect1|ancestor-or-self::sect2|ancestor-or-self::sect3|ancestor-or-self::sect4|ancestor-or-self::sect5|ancestor-or-self::refentry|ancestor-or-self::refsect1|ancestor-or-self::refsect2|ancestor-or-self::refsect3|ancestor-or-self::simplesect|ancestor-or-self::bibliography|ancestor-or-self::glossary|ancestor-or-self::index|ancestor-or-self::webpage|ancestor-or-self::topic)[last()]"/>
+<!-- speed optimizations for pgsql-docs -->
+ <xsl:with-param name="context" select="(/book/index[count(ancestor::node()|$scope) = count(ancestor::node()) and ($role = @role or $type = @type or (string-length($role) = 0 and string-length($type) = 0))])[1]"/>
+ </xsl:call-template>
+ </xsl:when>
+ <xsl:otherwise>
+ <xsl:call-template name="href.target">
+ <xsl:with-param name="object" select="."/>
+ <xsl:with-param name="context" select="(//index[count(ancestor::node()|$scope) = count(ancestor::node()) and ($role = @role or $type = @type or (string-length($role) = 0 and string-length($type) = 0))] | //setindex[count(ancestor::node()|$scope) = count(ancestor::node()) and ($role = @role or $type = @type or (string-length($role) = 0 and string-length($type) = 0))])[1]"/>
+ </xsl:call-template>
+ </xsl:otherwise>
+ </xsl:choose>
+
+ </xsl:attribute>
+
+ <xsl:value-of select="$title"/> <!-- text only -->
+ </a>
+
+ <xsl:variable name="id" select="(@id|@xml:id)[1]"/>
+ <xsl:if test="key('endofrange', $id)[count(ancestor::node()|$scope) = count(ancestor::node()) and ($role = @role or $type = @type or (string-length($role) = 0 and string-length($type) = 0))]">
+ <xsl:apply-templates select="key('endofrange', $id)[count(ancestor::node()|$scope) = count(ancestor::node()) and ($role = @role or $type = @type or (string-length($role) = 0 and string-length($type) = 0))][last()]" mode="reference">
+ <xsl:with-param name="position" select="position()"/>
+ <xsl:with-param name="scope" select="$scope"/>
+ <xsl:with-param name="role" select="$role"/>
+ <xsl:with-param name="type" select="$type"/>
+ <xsl:with-param name="separator" select="$range.separator"/>
+ </xsl:apply-templates>
+ </xsl:if>
+ </xsl:otherwise>
+ </xsl:choose>
+</xsl:template>
+
+<!-- xhtml/chunk-common.xsl -->
+<xsl:template name="chunk-all-sections">
+ <xsl:param name="content">
+ <xsl:apply-imports/>
+ </xsl:param>
+
+<!-- speed optimizations for pgsql-docs -->
+ <xsl:variable name="prev-v1" select="preceding::*[(self::sect1 and $chunk.section.depth > 0) or (self::sect2 and $chunk.section.depth > 1) or (self::sect3 and $chunk.section.depth > 2) or (self::sect4 and $chunk.section.depth > 3) or (self::sect5 and $chunk.section.depth > 4)][1]"/>
+
+ <xsl:variable name="prev-v2" select="(ancestor::sect1[$chunk.section.depth > 0 and not(ancestor::*/processing-instruction('dbhtml')[normalize-space(.) ='stop-chunking'])][1] |ancestor::sect2[$chunk.section.depth > 1 and not(ancestor::*/processing-instruction('dbhtml')[normalize-space(.) ='stop-chunking'])][1] |ancestor::sect3[$chunk.section.depth > 2 and not(ancestor::*/processing-instruction('dbhtml')[normalize-space(.) ='stop-chunking'])][1] |ancestor::sect4[$chunk.section.depth > 3 and not(ancestor::*/processing-instruction('dbhtml')[normalize-space(.) ='stop-chunking'])][1] |ancestor::sect5[$chunk.section.depth > 4 and not(ancestor::*/processing-instruction('dbhtml')[normalize-space(.) ='stop-chunking'])][1] |ancestor::section[$chunk.section.depth > count(ancestor::section) and not(ancestor::*/processing-instruction('dbhtml')[normalize-space(.) ='stop-chunking'])][1])[last()]"/>
+
+ <xsl:variable name="prev" select="(preceding::book[1] |preceding::preface[1] |preceding::chapter[1] |preceding::appendix[1] |preceding::part[1] |preceding::reference[1] |preceding::refentry[1] |preceding::colophon[1] |preceding::article[1] |preceding::topic[1] |preceding::bibliography[parent::article or parent::book or parent::part][1] |preceding::glossary[parent::article or parent::book or parent::part][1] |preceding::index[$generate.index != 0] [parent::article or parent::book or parent::part][1] |preceding::setindex[$generate.index != 0][1] |ancestor::set |ancestor::book[1] |ancestor::preface[1] |ancestor::chapter[1] |ancestor::appendix[1] |ancestor::part[1] |ancestor::reference[1] |ancestor::article[1] |ancestor::topic[1] |$prev-v1 |$prev-v2)[last()]"/>
+
+<!-- speed optimizations for pgsql-docs -->
+ <xsl:variable name="next-v1" select="following::*[self::sect1 or self::sect2 or self::sect3 or self::sect4 or self::sect5][1]"/>
+
+ <xsl:variable name="next-v2" select="(descendant::sect1[$chunk.section.depth > 0 and not(ancestor::*/processing-instruction('dbhtml')[normalize-space(.) ='stop-chunking'])][1] |descendant::sect2[$chunk.section.depth > 1 and not(ancestor::*/processing-instruction('dbhtml')[normalize-space(.) ='stop-chunking'])][1] |descendant::sect3[$chunk.section.depth > 2 and not(ancestor::*/processing-instruction('dbhtml')[normalize-space(.) ='stop-chunking'])][1] |descendant::sect4[$chunk.section.depth > 3 and not(ancestor::*/processing-instruction('dbhtml')[normalize-space(.) ='stop-chunking'])][1] |descendant::sect5[$chunk.section.depth > 4 and not(ancestor::*/processing-instruction('dbhtml')[normalize-space(.) ='stop-chunking'])][1] |descendant::section[$chunk.section.depth > count(ancestor::section) and not(ancestor::*/processing-instruction('dbhtml')[normalize-space(.) ='stop-chunking'])][1])[1]"/>
+
+ <xsl:variable name="next" select="(following::book[1] |following::preface[1] |following::chapter[1] |following::appendix[1] |following::part[1] |following::reference[1] |following::refentry[1] |following::colophon[1] |following::bibliography[parent::article or parent::book or parent::part][1] |following::glossary[parent::article or parent::book or parent::part][1] |following::index[$generate.index != 0] [parent::article or parent::book][1] |following::article[1] |following::topic[1] |following::setindex[$generate.index != 0][1] |descendant::book[1] |descendant::preface[1] |descendant::chapter[1] |descendant::appendix[1] |descendant::article[1] |descendant::topic[1] |descendant::bibliography[parent::article or parent::book][1] |descendant::glossary[parent::article or parent::book or parent::part][1] |descendant::index[$generate.index != 0] [parent::article or parent::book][1] |descendant::colophon[1] |descendant::setindex[$generate.index != 0][1] |descendant::part[1] |descendant::reference[1] |descendant::refentry[1] |$next-v1 |$next-v2)[1]"/>
+
+
+ <xsl:call-template name="process-chunk">
+ <xsl:with-param name="prev" select="$prev"/>
+ <xsl:with-param name="next" select="$next"/>
+ <xsl:with-param name="content" select="$content"/>
+ </xsl:call-template>
+
+</xsl:template>
+
+
+<xsl:template name="make.legalnotice.head.links">
+ <!-- * the following ID is used as part of the legalnotice filename; -->
+ <!-- * we need it in order to construct the filename for use in the -->
+ <!-- * value of the href attribute on the link -->
+
+ <xsl:param name="ln-node" select="(//legalnotice)[1]"/>
+
+ <xsl:param name="linktype">
+ <xsl:choose>
+ <xsl:when test="contains($html.head.legalnotice.link.types, ' ')">
+ <xsl:value-of select="normalize-space( substring-before($html.head.legalnotice.link.types, ' '))"/>
+ </xsl:when>
+ <xsl:otherwise>
+ <xsl:value-of select="$html.head.legalnotice.link.types"/>
+ </xsl:otherwise>
+ </xsl:choose>
+ </xsl:param>
+ <xsl:param name="remaining.linktypes" select="concat( normalize-space( substring-after($html.head.legalnotice.link.types, ' ')),' ')"/>
+ <xsl:if test="not($linktype = '')">
+ <!-- Compute name of legalnotice file (see titlepage.xsl) -->
+ <xsl:variable name="file">
+ <xsl:call-template name="ln.or.rh.filename">
+ <xsl:with-param name="node" select="$ln-node"/>
+ </xsl:call-template>
+ </xsl:variable>
+
+ <link rel="{$linktype}">
+ <xsl:attribute name="href">
+ <xsl:value-of select="$file"/>
+ </xsl:attribute>
+ <xsl:attribute name="title">
+<!-- speed optimizations for pgsql-docs -->
+ <xsl:apply-templates select="/book/bookinfo/legalnotice" mode="object.title.markup.textonly"/>
+ </xsl:attribute>
+ </link>
+<!-- speed optimizations for pgsql-docs -->
+<!-- <xsl:call-template name="make.legalnotice.head.links">
+ < ! - - * pop the next value off the list of link types - - >
+ <xsl:with-param name="linktype" select="substring-before($remaining.linktypes, ' ')"/>
+ < ! - - * remove the link type from the list of remaining link types - - >
+ <xsl:with-param name="remaining.linktypes" select="substring-after($remaining.linktypes, ' ')"/>
+ </xsl:call-template> -->
+ </xsl:if>
+</xsl:template>
+
+<!-- xhtml/html.xsl (needed for the following "reference" template) -->
+<xsl:template name="id.attribute">
+ <xsl:param name="node" select="."/>
+ <xsl:param name="conditional" select="1"/>
+ <xsl:choose>
+ <xsl:when test="$generate.id.attributes = 0">
+ <!-- No id attributes when this param is zero -->
+ </xsl:when>
+ <xsl:when test="$conditional = 0 or $node/@id or $node/@xml:id">
+ <xsl:attribute name="id">
+ <xsl:call-template name="object.id">
+ <xsl:with-param name="object" select="$node"/>
+ </xsl:call-template>
+ </xsl:attribute>
+ </xsl:when>
+ </xsl:choose>
+</xsl:template>
+
+<!-- xhtml/autoidx.xsl -->
+<xsl:template name="reference">
+ <xsl:param name="scope" select="."/>
+ <xsl:param name="role" select="''"/>
+ <xsl:param name="type" select="''"/>
+ <xsl:param name="zones"/>
+
+ <xsl:choose>
+ <xsl:when test="contains($zones, ' ')">
+ <xsl:variable name="zone" select="substring-before($zones, ' ')"/>
+ <xsl:variable name="target" select="key('sections', $zone)"/>
+
+ <a>
+ <xsl:apply-templates select="." mode="class.attribute"/>
+ <xsl:call-template name="id.attribute"/>
+ <xsl:attribute name="href">
+ <xsl:call-template name="href.target">
+ <xsl:with-param name="object" select="$target[1]"/>
+ <xsl:with-param name="context" select="//index[count(ancestor::node()|$scope) = count(ancestor::node()) and ($role = @role or $type = @type or (string-length($role) = 0 and string-length($type) = 0))][1]"/>
+ </xsl:call-template>
+ </xsl:attribute>
+ <xsl:apply-templates select="$target[1]" mode="index-title-content"/>
+ </a>
+ <xsl:text>, </xsl:text>
+ <xsl:call-template name="reference">
+ <xsl:with-param name="zones" select="substring-after($zones, ' ')"/>
+ <xsl:with-param name="position" select="position()"/>
+ <xsl:with-param name="scope" select="$scope"/>
+ <xsl:with-param name="role" select="$role"/>
+ <xsl:with-param name="type" select="$type"/>
+ </xsl:call-template>
+ </xsl:when>
+ <xsl:otherwise>
+ <xsl:variable name="zone" select="$zones"/>
+ <xsl:variable name="target" select="key('sections', $zone)"/>
+
+ <a>
+ <xsl:apply-templates select="." mode="class.attribute"/>
+ <xsl:call-template name="id.attribute"/>
+ <xsl:attribute name="href">
+ <xsl:call-template name="href.target">
+ <xsl:with-param name="object" select="$target[1]"/>
+<!-- speed optimizations for pgsql-docs -->
+ <xsl:with-param name="context" select="/book/index[count(ancestor::node()|$scope) = count(ancestor::node()) and ($role = @role or $type = @type or (string-length($role) = 0 and string-length($type) = 0))][1]"/>
+ </xsl:call-template>
+ </xsl:attribute>
+ <xsl:apply-templates select="$target[1]" mode="index-title-content"/>
+ </a>
+ </xsl:otherwise>
+ </xsl:choose>
+</xsl:template>
+
+</xsl:stylesheet>
diff --git a/doc/src/sgml/stylesheet.xsl b/doc/src/sgml/stylesheet.xsl
index 7967b36..8b01f41 100644
--- a/doc/src/sgml/stylesheet.xsl
+++ b/doc/src/sgml/stylesheet.xsl
@@ -6,6 +6,7 @@
<xsl:import href="http://docbook.sourceforge.net/release/xsl/current/xhtml/chunk.xsl"/>
<xsl:include href="stylesheet-common.xsl" />
+<xsl:include href="stylesheet-xhtml-speedup.xsl" />
<!-- Parameters -->
^ permalink raw reply [nested|flat] 86+ messages in thread
* Re: Docbook 5.x
2016-04-20 14:30 Docbook 5.x Jürgen Purtz <[email protected]>
2016-05-03 19:34 ` Re: Docbook 5.x Alvaro Herrera <[email protected]>
2016-05-03 20:13 ` Re: Docbook 5.x Oleg Bartunov <[email protected]>
2016-05-04 00:44 ` Re: Docbook 5.x Peter Eisentraut <[email protected]>
2016-05-05 04:45 ` Re: Docbook 5.x Alexander Law <[email protected]>
@ 2016-06-03 19:31 ` Peter Eisentraut <[email protected]>
2016-06-04 14:28 ` Re: Docbook 5.x Alexander Law <[email protected]>
0 siblings, 1 reply; 86+ messages in thread
From: Peter Eisentraut @ 2016-06-03 19:31 UTC (permalink / raw)
To: Alexander Law <[email protected]>; [email protected]; Alvaro Herrera <[email protected]>; Alexander Lakhin <[email protected]>; +Cc: Jürgen Purtz <[email protected]>; pgsql-docs
On 5/5/16 12:45 AM, Alexander Law wrote:
> Done (previous patch cleaned).
> This patch optimizes XSL transformations contained in docbook-xsl (1.78.1).
I have looked through this patch, and it's awesome. I have tweaked it a
bit more along the lines you guys have started, and now the build time
is pretty much the same as with DSSSL. Attached is my final patch,
which I plan to commit as soon as the new branch opens.
(I only have Alexander Lakhin as credit right now. Please let me know
if anyone else contributed.)
--
Peter Eisentraut http://www.2ndQuadrant.com/
PostgreSQL Development, 24x7 Support, Remote DBA, Training & Services
From bc7fc7693e3a054ab6e46c3dc931c1d2535f2b40 Mon Sep 17 00:00:00 2001
From: Peter Eisentraut <[email protected]>
Date: Fri, 3 Jun 2016 14:47:38 -0400
Subject: [PATCH] doc: Speed up XSLT builds
The upstream XSLT stylesheets use some very general XPath expressions in
some places that end up being very slow. We can optimize them with
knowledge about the DocBook document structure and our particular use
thereof. For example, when counting preceding chapters to get a number
for the current chapter, we only need to count preceding sibling
nodes (more or less) instead of searching through the entire node tree
for chapter elements.
This change attacks the slowest pieces as identified by xsltproc
--profile. This makes the HTML build roughly 10 times faster, resulting
in the new total build time being about the same as the old DSSSL-based
build. Some of the non-HTML build targets (especially FO) will also
benefit a bit, but they have not been specifically analyzed.
With this, also remove the pg.fast parameter, which was previously a
hack to get the build to a manageable speed.
Alexander Lakhin <[email protected]>, with some additional
tweaking by me
---
doc/src/sgml/stylesheet-common.xsl | 8 +-
doc/src/sgml/stylesheet-speedup-common.xsl | 94 +++++++++
doc/src/sgml/stylesheet-speedup-xhtml.xsl | 293 +++++++++++++++++++++++++++++
doc/src/sgml/stylesheet.xsl | 1 +
4 files changed, 391 insertions(+), 5 deletions(-)
create mode 100644 doc/src/sgml/stylesheet-speedup-common.xsl
create mode 100644 doc/src/sgml/stylesheet-speedup-xhtml.xsl
diff --git a/doc/src/sgml/stylesheet-common.xsl b/doc/src/sgml/stylesheet-common.xsl
index de36376..e384113 100644
--- a/doc/src/sgml/stylesheet-common.xsl
+++ b/doc/src/sgml/stylesheet-common.xsl
@@ -7,11 +7,10 @@
all output formats (HTML, HTML Help, XSL-FO, etc.).
-->
+<xsl:include href="stylesheet-speedup-common.xsl" />
<!-- Parameters -->
-<xsl:param name="pg.fast" select="'0'"/>
-
<!--
<xsl:param name="draft.mode">
<xsl:choose>
@@ -31,9 +30,8 @@
<xsl:param name="callout.graphics" select="'0'"></xsl:param>
<xsl:param name="toc.section.depth">2</xsl:param>
<xsl:param name="linenumbering.extension" select="'0'"></xsl:param>
-<xsl:param name="generate.index" select="1 - $pg.fast"></xsl:param>
-<xsl:param name="section.autolabel" select="1 - $pg.fast"></xsl:param>
-<xsl:param name="section.label.includes.component.label" select="1 - $pg.fast"></xsl:param>
+<xsl:param name="section.autolabel" select="1"></xsl:param>
+<xsl:param name="section.label.includes.component.label" select="1"></xsl:param>
<xsl:param name="refentry.xref.manvolnum" select="0"/>
<xsl:param name="formal.procedures" select="0"></xsl:param>
<xsl:param name="punct.honorific" select="''"></xsl:param>
diff --git a/doc/src/sgml/stylesheet-speedup-common.xsl b/doc/src/sgml/stylesheet-speedup-common.xsl
new file mode 100644
index 0000000..007fdf6
--- /dev/null
+++ b/doc/src/sgml/stylesheet-speedup-common.xsl
@@ -0,0 +1,94 @@
+<?xml version="1.0" encoding="utf-8"?>
+<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform";
+ version='1.0'>
+
+<!-- Performance-optimized versions of some upstream templates from common/
+ directory -->
+
+<!-- from common/labels.xsl -->
+
+<xsl:template match="chapter" mode="label.markup">
+ <xsl:choose>
+ <xsl:when test="@label">
+ <xsl:value-of select="@label"/>
+ </xsl:when>
+ <xsl:when test="string($chapter.autolabel) != 0">
+ <xsl:if test="$component.label.includes.part.label != 0 and
+ ancestor::part">
+ <xsl:variable name="part.label">
+ <xsl:apply-templates select="ancestor::part"
+ mode="label.markup"/>
+ </xsl:variable>
+ <xsl:if test="$part.label != ''">
+ <xsl:value-of select="$part.label"/>
+ <xsl:apply-templates select="ancestor::part"
+ mode="intralabel.punctuation">
+ <xsl:with-param name="object" select="."/>
+ </xsl:apply-templates>
+ </xsl:if>
+ </xsl:if>
+ <xsl:variable name="format">
+ <xsl:call-template name="autolabel.format">
+ <xsl:with-param name="format" select="$chapter.autolabel"/>
+ </xsl:call-template>
+ </xsl:variable>
+ <xsl:choose>
+ <xsl:when test="$label.from.part != 0 and ancestor::part">
+ <xsl:number from="part" count="chapter" format="{$format}" level="any"/>
+ </xsl:when>
+ <xsl:otherwise>
+ <!-- Optimization for pgsql-docs: When counting to get label for
+ this chapter, preceding chapters can only be our siblings or
+ children of a preceding part, so only count those instead of
+ scanning the entire node tree. -->
+ <!-- <xsl:number from="book" count="chapter" format="{$format}" level="any"/> -->
+ <xsl:number value="count(../preceding-sibling::part/chapter) + count(preceding-sibling::chapter) + 1" format="{$format}"/>
+ </xsl:otherwise>
+ </xsl:choose>
+ </xsl:when>
+ </xsl:choose>
+</xsl:template>
+
+<xsl:template match="appendix" mode="label.markup">
+ <xsl:choose>
+ <xsl:when test="@label">
+ <xsl:value-of select="@label"/>
+ </xsl:when>
+ <xsl:when test="string($appendix.autolabel) != 0">
+ <xsl:if test="$component.label.includes.part.label != 0 and
+ ancestor::part">
+ <xsl:variable name="part.label">
+ <xsl:apply-templates select="ancestor::part"
+ mode="label.markup"/>
+ </xsl:variable>
+ <xsl:if test="$part.label != ''">
+ <xsl:value-of select="$part.label"/>
+ <xsl:apply-templates select="ancestor::part"
+ mode="intralabel.punctuation">
+ <xsl:with-param name="object" select="."/>
+ </xsl:apply-templates>
+ </xsl:if>
+ </xsl:if>
+ <xsl:variable name="format">
+ <xsl:call-template name="autolabel.format">
+ <xsl:with-param name="format" select="$appendix.autolabel"/>
+ </xsl:call-template>
+ </xsl:variable>
+ <xsl:choose>
+ <xsl:when test="$label.from.part != 0 and ancestor::part">
+ <xsl:number from="part" count="appendix" format="{$format}" level="any"/>
+ </xsl:when>
+ <xsl:otherwise>
+ <!-- Optimization for pgsql-docs: When counting to get label for
+ this appendix, preceding appendixes can only be our siblings or
+ children of a preceding part, so only count those instead of
+ scanning the entire node tree. -->
+ <!-- <xsl:number from="book|article" count="appendix" format="{$format}" level="any"/> -->
+ <xsl:number value="count(../preceding-sibling::part/appendix) + count(preceding-sibling::appendix) + 1" format="{$format}"/>
+ </xsl:otherwise>
+ </xsl:choose>
+ </xsl:when>
+ </xsl:choose>
+</xsl:template>
+
+</xsl:stylesheet>
diff --git a/doc/src/sgml/stylesheet-speedup-xhtml.xsl b/doc/src/sgml/stylesheet-speedup-xhtml.xsl
new file mode 100644
index 0000000..7c391a0
--- /dev/null
+++ b/doc/src/sgml/stylesheet-speedup-xhtml.xsl
@@ -0,0 +1,293 @@
+<?xml version="1.0" encoding="utf-8"?>
+<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform";
+ xmlns="http://www.w3.org/1999/xhtml";
+ version='1.0'>
+
+<!-- Performance-optimized versions of some upstream templates from xhtml/
+ directory -->
+
+<!-- from xhtml/autoidx.xsl -->
+
+<xsl:template match="indexterm" mode="reference">
+ <xsl:param name="scope" select="."/>
+ <xsl:param name="role" select="''"/>
+ <xsl:param name="type" select="''"/>
+ <xsl:param name="position"/>
+ <xsl:param name="separator" select="''"/>
+
+ <xsl:variable name="term.separator">
+ <xsl:call-template name="index.separator">
+ <xsl:with-param name="key" select="'index.term.separator'"/>
+ </xsl:call-template>
+ </xsl:variable>
+
+ <xsl:variable name="number.separator">
+ <xsl:call-template name="index.separator">
+ <xsl:with-param name="key" select="'index.number.separator'"/>
+ </xsl:call-template>
+ </xsl:variable>
+
+ <xsl:variable name="range.separator">
+ <xsl:call-template name="index.separator">
+ <xsl:with-param name="key" select="'index.range.separator'"/>
+ </xsl:call-template>
+ </xsl:variable>
+
+ <xsl:choose>
+ <xsl:when test="$separator != ''">
+ <xsl:value-of select="$separator"/>
+ </xsl:when>
+ <xsl:when test="$position = 1">
+ <xsl:value-of select="$term.separator"/>
+ </xsl:when>
+ <xsl:otherwise>
+ <xsl:value-of select="$number.separator"/>
+ </xsl:otherwise>
+ </xsl:choose>
+
+ <xsl:choose>
+ <xsl:when test="@zone and string(@zone)">
+ <xsl:call-template name="reference">
+ <xsl:with-param name="zones" select="normalize-space(@zone)"/>
+ <xsl:with-param name="position" select="position()"/>
+ <xsl:with-param name="scope" select="$scope"/>
+ <xsl:with-param name="role" select="$role"/>
+ <xsl:with-param name="type" select="$type"/>
+ </xsl:call-template>
+ </xsl:when>
+ <xsl:otherwise>
+ <a>
+ <xsl:apply-templates select="." mode="class.attribute"/>
+ <xsl:variable name="title">
+ <xsl:choose>
+ <xsl:when test="$index.prefer.titleabbrev != 0">
+ <xsl:apply-templates select="(ancestor-or-self::set|ancestor-or-self::book|ancestor-or-self::part|ancestor-or-self::reference|ancestor-or-self::partintro|ancestor-or-self::chapter|ancestor-or-self::appendix|ancestor-or-self::preface|ancestor-or-self::article|ancestor-or-self::section|ancestor-or-self::sect1|ancestor-or-self::sect2|ancestor-or-self::sect3|ancestor-or-self::sect4|ancestor-or-self::sect5|ancestor-or-self::refentry|ancestor-or-self::refsect1|ancestor-or-self::refsect2|ancestor-or-self::refsect3|ancestor-or-self::simplesect|ancestor-or-self::bibliography|ancestor-or-self::glossary|ancestor-or-self::index|ancestor-or-self::webpage|ancestor-or-self::topic)[last()]" mode="titleabbrev.markup"/>
+ </xsl:when>
+ <xsl:otherwise>
+ <xsl:apply-templates select="(ancestor-or-self::set|ancestor-or-self::book|ancestor-or-self::part|ancestor-or-self::reference|ancestor-or-self::partintro|ancestor-or-self::chapter|ancestor-or-self::appendix|ancestor-or-self::preface|ancestor-or-self::article|ancestor-or-self::section|ancestor-or-self::sect1|ancestor-or-self::sect2|ancestor-or-self::sect3|ancestor-or-self::sect4|ancestor-or-self::sect5|ancestor-or-self::refentry|ancestor-or-self::refsect1|ancestor-or-self::refsect2|ancestor-or-self::refsect3|ancestor-or-self::simplesect|ancestor-or-self::bibliography|ancestor-or-self::glossary|ancestor-or-self::index|ancestor-or-self::webpage|ancestor-or-self::topic)[last()]" mode="title.markup"/>
+ </xsl:otherwise>
+ </xsl:choose>
+ </xsl:variable>
+
+ <xsl:attribute name="href">
+ <xsl:choose>
+ <xsl:when test="$index.links.to.section = 1">
+ <xsl:call-template name="href.target">
+ <xsl:with-param name="object" select="(ancestor-or-self::set|ancestor-or-self::book|ancestor-or-self::part|ancestor-or-self::reference|ancestor-or-self::partintro|ancestor-or-self::chapter|ancestor-or-self::appendix|ancestor-or-self::preface|ancestor-or-self::article|ancestor-or-self::section|ancestor-or-self::sect1|ancestor-or-self::sect2|ancestor-or-self::sect3|ancestor-or-self::sect4|ancestor-or-self::sect5|ancestor-or-self::refentry|ancestor-or-self::refsect1|ancestor-or-self::refsect2|ancestor-or-self::refsect3|ancestor-or-self::simplesect|ancestor-or-self::bibliography|ancestor-or-self::glossary|ancestor-or-self::index|ancestor-or-self::webpage|ancestor-or-self::topic)[last()]"/>
+ <!-- Optimization for pgsql-docs: We only have an index as a
+ child of book, so look that up directly instead of
+ scanning the entire node tree. Also, don't look for
+ setindex. -->
+ <!-- <xsl:with-param name="context" select="(//index[count(ancestor::node()|$scope) = count(ancestor::node()) and ($role = @role or $type = @type or (string-length($role) = 0 and string-length($type) = 0))] | //setindex[count(ancestor::node()|$scope) = count(ancestor::node()) and ($role = @role or $type = @type or (string-length($role) = 0 and string-length($type) = 0))])[1]"/> -->
+ <xsl:with-param name="context" select="(/book/index[count(ancestor::node()|$scope) = count(ancestor::node()) and ($role = @role or $type = @type or (string-length($role) = 0 and string-length($type) = 0))])[1]"/>
+ </xsl:call-template>
+ </xsl:when>
+ <xsl:otherwise>
+ <xsl:call-template name="href.target">
+ <xsl:with-param name="object" select="."/>
+ <xsl:with-param name="context" select="(//index[count(ancestor::node()|$scope) = count(ancestor::node()) and ($role = @role or $type = @type or (string-length($role) = 0 and string-length($type) = 0))] | //setindex[count(ancestor::node()|$scope) = count(ancestor::node()) and ($role = @role or $type = @type or (string-length($role) = 0 and string-length($type) = 0))])[1]"/>
+ </xsl:call-template>
+ </xsl:otherwise>
+ </xsl:choose>
+
+ </xsl:attribute>
+
+ <xsl:value-of select="$title"/> <!-- text only -->
+ </a>
+
+ <xsl:variable name="id" select="(@id|@xml:id)[1]"/>
+ <xsl:if test="key('endofrange', $id)[count(ancestor::node()|$scope) = count(ancestor::node()) and ($role = @role or $type = @type or (string-length($role) = 0 and string-length($type) = 0))]">
+ <xsl:apply-templates select="key('endofrange', $id)[count(ancestor::node()|$scope) = count(ancestor::node()) and ($role = @role or $type = @type or (string-length($role) = 0 and string-length($type) = 0))][last()]" mode="reference">
+ <xsl:with-param name="position" select="position()"/>
+ <xsl:with-param name="scope" select="$scope"/>
+ <xsl:with-param name="role" select="$role"/>
+ <xsl:with-param name="type" select="$type"/>
+ <xsl:with-param name="separator" select="$range.separator"/>
+ </xsl:apply-templates>
+ </xsl:if>
+ </xsl:otherwise>
+ </xsl:choose>
+</xsl:template>
+
+<xsl:template name="reference">
+ <xsl:param name="scope" select="."/>
+ <xsl:param name="role" select="''"/>
+ <xsl:param name="type" select="''"/>
+ <xsl:param name="zones"/>
+
+ <xsl:choose>
+ <xsl:when test="contains($zones, ' ')">
+ <xsl:variable name="zone" select="substring-before($zones, ' ')"/>
+ <xsl:variable name="target" select="key('sections', $zone)"/>
+
+ <a>
+ <xsl:apply-templates select="." mode="class.attribute"/>
+ <xsl:call-template name="id.attribute"/>
+ <xsl:attribute name="href">
+ <xsl:call-template name="href.target">
+ <xsl:with-param name="object" select="$target[1]"/>
+ <xsl:with-param name="context" select="//index[count(ancestor::node()|$scope) = count(ancestor::node()) and ($role = @role or $type = @type or (string-length($role) = 0 and string-length($type) = 0))][1]"/>
+ </xsl:call-template>
+ </xsl:attribute>
+ <xsl:apply-templates select="$target[1]" mode="index-title-content"/>
+ </a>
+ <xsl:text>, </xsl:text>
+ <xsl:call-template name="reference">
+ <xsl:with-param name="zones" select="substring-after($zones, ' ')"/>
+ <xsl:with-param name="position" select="position()"/>
+ <xsl:with-param name="scope" select="$scope"/>
+ <xsl:with-param name="role" select="$role"/>
+ <xsl:with-param name="type" select="$type"/>
+ </xsl:call-template>
+ </xsl:when>
+ <xsl:otherwise>
+ <xsl:variable name="zone" select="$zones"/>
+ <xsl:variable name="target" select="key('sections', $zone)"/>
+
+ <a>
+ <xsl:apply-templates select="." mode="class.attribute"/>
+ <xsl:call-template name="id.attribute"/>
+ <xsl:attribute name="href">
+ <xsl:call-template name="href.target">
+ <xsl:with-param name="object" select="$target[1]"/>
+ <!-- Optimization for pgsql-docs: Only look for index under book
+ instead of searching the whole node tree. -->
+ <!-- <xsl:with-param name="context" select="//index[count(ancestor::node()|$scope) = count(ancestor::node()) and ($role = @role or $type = @type or (string-length($role) = 0 and string-length($type) = 0))][1]"/> -->
+ <xsl:with-param name="context" select="/book/index[count(ancestor::node()|$scope) = count(ancestor::node()) and ($role = @role or $type = @type or (string-length($role) = 0 and string-length($type) = 0))][1]"/>
+ </xsl:call-template>
+ </xsl:attribute>
+ <xsl:apply-templates select="$target[1]" mode="index-title-content"/>
+ </a>
+ </xsl:otherwise>
+ </xsl:choose>
+</xsl:template>
+
+
+<!-- from xhtml/chunk-common.xsl -->
+
+<xsl:template name="chunk-all-sections">
+ <xsl:param name="content">
+ <xsl:apply-imports/>
+ </xsl:param>
+
+ <!-- Optimization for pgsql-docs: Since we set a fixed $chunk.section.depth,
+ we can do away with a bunch of complicated XPath searches for the
+ previous and next sections at various levels. -->
+
+ <xsl:if test="$chunk.section.depth != 1">
+ <xsl:message terminate="yes">
+ <xsl:text>Error: If you change $chunk.section.depth, then you must update the performance-optimized chunk-all-sections-template.</xsl:text>
+ </xsl:message>
+ </xsl:if>
+
+ <xsl:variable name="prev"
+ select="(preceding::book[1]
+ |preceding::preface[1]
+ |preceding::chapter[1]
+ |preceding::appendix[1]
+ |preceding::part[1]
+ |preceding::reference[1]
+ |preceding::refentry[1]
+ |preceding::colophon[1]
+ |preceding::article[1]
+ |preceding::topic[1]
+ |preceding::bibliography[parent::article or parent::book or parent::part][1]
+ |preceding::glossary[parent::article or parent::book or parent::part][1]
+ |preceding::index[$generate.index != 0]
+ [parent::article or parent::book or parent::part][1]
+ |preceding::setindex[$generate.index != 0][1]
+ |ancestor::set
+ |ancestor::book[1]
+ |ancestor::preface[1]
+ |ancestor::chapter[1]
+ |ancestor::appendix[1]
+ |ancestor::part[1]
+ |ancestor::reference[1]
+ |ancestor::article[1]
+ |ancestor::topic[1]
+ |preceding::sect1[1]
+ |ancestor::sect1[1])[last()]"/>
+
+ <xsl:variable name="next"
+ select="(following::book[1]
+ |following::preface[1]
+ |following::chapter[1]
+ |following::appendix[1]
+ |following::part[1]
+ |following::reference[1]
+ |following::refentry[1]
+ |following::colophon[1]
+ |following::bibliography[parent::article or parent::book or parent::part][1]
+ |following::glossary[parent::article or parent::book or parent::part][1]
+ |following::index[$generate.index != 0]
+ [parent::article or parent::book][1]
+ |following::article[1]
+ |following::topic[1]
+ |following::setindex[$generate.index != 0][1]
+ |descendant::book[1]
+ |descendant::preface[1]
+ |descendant::chapter[1]
+ |descendant::appendix[1]
+ |descendant::article[1]
+ |descendant::topic[1]
+ |descendant::bibliography[parent::article or parent::book][1]
+ |descendant::glossary[parent::article or parent::book or parent::part][1]
+ |descendant::index[$generate.index != 0]
+ [parent::article or parent::book][1]
+ |descendant::colophon[1]
+ |descendant::setindex[$generate.index != 0][1]
+ |descendant::part[1]
+ |descendant::reference[1]
+ |descendant::refentry[1]
+ |following::sect1[1]
+ |descendant::sect1[1])[1]"/>
+
+ <xsl:call-template name="process-chunk">
+ <xsl:with-param name="prev" select="$prev"/>
+ <xsl:with-param name="next" select="$next"/>
+ <xsl:with-param name="content" select="$content"/>
+ </xsl:call-template>
+</xsl:template>
+
+<xsl:template name="html.head">
+ <xsl:param name="prev" select="/foo"/>
+ <xsl:param name="next" select="/foo"/>
+
+ <!-- Optimization for pgsql-docs: Cut out a bunch of things we don't need
+ here, including an expensive //legalnotice search. -->
+
+ <head>
+ <xsl:call-template name="system.head.content"/>
+ <xsl:call-template name="head.content"/>
+
+ <xsl:if test="$prev">
+ <link rel="prev">
+ <xsl:attribute name="href">
+ <xsl:call-template name="href.target">
+ <xsl:with-param name="object" select="$prev"/>
+ </xsl:call-template>
+ </xsl:attribute>
+ <xsl:attribute name="title">
+ <xsl:apply-templates select="$prev" mode="object.title.markup.textonly"/>
+ </xsl:attribute>
+ </link>
+ </xsl:if>
+
+ <xsl:if test="$next">
+ <link rel="next">
+ <xsl:attribute name="href">
+ <xsl:call-template name="href.target">
+ <xsl:with-param name="object" select="$next"/>
+ </xsl:call-template>
+ </xsl:attribute>
+ <xsl:attribute name="title">
+ <xsl:apply-templates select="$next" mode="object.title.markup.textonly"/>
+ </xsl:attribute>
+ </link>
+ </xsl:if>
+
+ <xsl:call-template name="user.head.content"/>
+ </head>
+</xsl:template>
+
+</xsl:stylesheet>
diff --git a/doc/src/sgml/stylesheet.xsl b/doc/src/sgml/stylesheet.xsl
index 7967b36..631fcc4 100644
--- a/doc/src/sgml/stylesheet.xsl
+++ b/doc/src/sgml/stylesheet.xsl
@@ -6,6 +6,7 @@
<xsl:import href="http://docbook.sourceforge.net/release/xsl/current/xhtml/chunk.xsl"/;
<xsl:include href="stylesheet-common.xsl" />
+<xsl:include href="stylesheet-speedup-xhtml.xsl" />
<!-- Parameters -->
--
2.8.3
--
Sent via pgsql-docs mailing list ([email protected])
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-docs
Attachments:
[text/plain] 0001-doc-Speed-up-XSLT-builds.patch (22.1K, 2-0001-doc-Speed-up-XSLT-builds.patch)
download | inline diff:
From bc7fc7693e3a054ab6e46c3dc931c1d2535f2b40 Mon Sep 17 00:00:00 2001
From: Peter Eisentraut <[email protected]>
Date: Fri, 3 Jun 2016 14:47:38 -0400
Subject: [PATCH] doc: Speed up XSLT builds
The upstream XSLT stylesheets use some very general XPath expressions in
some places that end up being very slow. We can optimize them with
knowledge about the DocBook document structure and our particular use
thereof. For example, when counting preceding chapters to get a number
for the current chapter, we only need to count preceding sibling
nodes (more or less) instead of searching through the entire node tree
for chapter elements.
This change attacks the slowest pieces as identified by xsltproc
--profile. This makes the HTML build roughly 10 times faster, resulting
in the new total build time being about the same as the old DSSSL-based
build. Some of the non-HTML build targets (especially FO) will also
benefit a bit, but they have not been specifically analyzed.
With this, also remove the pg.fast parameter, which was previously a
hack to get the build to a manageable speed.
Alexander Lakhin <[email protected]>, with some additional
tweaking by me
---
doc/src/sgml/stylesheet-common.xsl | 8 +-
doc/src/sgml/stylesheet-speedup-common.xsl | 94 +++++++++
doc/src/sgml/stylesheet-speedup-xhtml.xsl | 293 +++++++++++++++++++++++++++++
doc/src/sgml/stylesheet.xsl | 1 +
4 files changed, 391 insertions(+), 5 deletions(-)
create mode 100644 doc/src/sgml/stylesheet-speedup-common.xsl
create mode 100644 doc/src/sgml/stylesheet-speedup-xhtml.xsl
diff --git a/doc/src/sgml/stylesheet-common.xsl b/doc/src/sgml/stylesheet-common.xsl
index de36376..e384113 100644
--- a/doc/src/sgml/stylesheet-common.xsl
+++ b/doc/src/sgml/stylesheet-common.xsl
@@ -7,11 +7,10 @@
all output formats (HTML, HTML Help, XSL-FO, etc.).
-->
+<xsl:include href="stylesheet-speedup-common.xsl" />
<!-- Parameters -->
-<xsl:param name="pg.fast" select="'0'"/>
-
<!--
<xsl:param name="draft.mode">
<xsl:choose>
@@ -31,9 +30,8 @@
<xsl:param name="callout.graphics" select="'0'"></xsl:param>
<xsl:param name="toc.section.depth">2</xsl:param>
<xsl:param name="linenumbering.extension" select="'0'"></xsl:param>
-<xsl:param name="generate.index" select="1 - $pg.fast"></xsl:param>
-<xsl:param name="section.autolabel" select="1 - $pg.fast"></xsl:param>
-<xsl:param name="section.label.includes.component.label" select="1 - $pg.fast"></xsl:param>
+<xsl:param name="section.autolabel" select="1"></xsl:param>
+<xsl:param name="section.label.includes.component.label" select="1"></xsl:param>
<xsl:param name="refentry.xref.manvolnum" select="0"/>
<xsl:param name="formal.procedures" select="0"></xsl:param>
<xsl:param name="punct.honorific" select="''"></xsl:param>
diff --git a/doc/src/sgml/stylesheet-speedup-common.xsl b/doc/src/sgml/stylesheet-speedup-common.xsl
new file mode 100644
index 0000000..007fdf6
--- /dev/null
+++ b/doc/src/sgml/stylesheet-speedup-common.xsl
@@ -0,0 +1,94 @@
+<?xml version="1.0" encoding="utf-8"?>
+<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
+ version='1.0'>
+
+<!-- Performance-optimized versions of some upstream templates from common/
+ directory -->
+
+<!-- from common/labels.xsl -->
+
+<xsl:template match="chapter" mode="label.markup">
+ <xsl:choose>
+ <xsl:when test="@label">
+ <xsl:value-of select="@label"/>
+ </xsl:when>
+ <xsl:when test="string($chapter.autolabel) != 0">
+ <xsl:if test="$component.label.includes.part.label != 0 and
+ ancestor::part">
+ <xsl:variable name="part.label">
+ <xsl:apply-templates select="ancestor::part"
+ mode="label.markup"/>
+ </xsl:variable>
+ <xsl:if test="$part.label != ''">
+ <xsl:value-of select="$part.label"/>
+ <xsl:apply-templates select="ancestor::part"
+ mode="intralabel.punctuation">
+ <xsl:with-param name="object" select="."/>
+ </xsl:apply-templates>
+ </xsl:if>
+ </xsl:if>
+ <xsl:variable name="format">
+ <xsl:call-template name="autolabel.format">
+ <xsl:with-param name="format" select="$chapter.autolabel"/>
+ </xsl:call-template>
+ </xsl:variable>
+ <xsl:choose>
+ <xsl:when test="$label.from.part != 0 and ancestor::part">
+ <xsl:number from="part" count="chapter" format="{$format}" level="any"/>
+ </xsl:when>
+ <xsl:otherwise>
+ <!-- Optimization for pgsql-docs: When counting to get label for
+ this chapter, preceding chapters can only be our siblings or
+ children of a preceding part, so only count those instead of
+ scanning the entire node tree. -->
+ <!-- <xsl:number from="book" count="chapter" format="{$format}" level="any"/> -->
+ <xsl:number value="count(../preceding-sibling::part/chapter) + count(preceding-sibling::chapter) + 1" format="{$format}"/>
+ </xsl:otherwise>
+ </xsl:choose>
+ </xsl:when>
+ </xsl:choose>
+</xsl:template>
+
+<xsl:template match="appendix" mode="label.markup">
+ <xsl:choose>
+ <xsl:when test="@label">
+ <xsl:value-of select="@label"/>
+ </xsl:when>
+ <xsl:when test="string($appendix.autolabel) != 0">
+ <xsl:if test="$component.label.includes.part.label != 0 and
+ ancestor::part">
+ <xsl:variable name="part.label">
+ <xsl:apply-templates select="ancestor::part"
+ mode="label.markup"/>
+ </xsl:variable>
+ <xsl:if test="$part.label != ''">
+ <xsl:value-of select="$part.label"/>
+ <xsl:apply-templates select="ancestor::part"
+ mode="intralabel.punctuation">
+ <xsl:with-param name="object" select="."/>
+ </xsl:apply-templates>
+ </xsl:if>
+ </xsl:if>
+ <xsl:variable name="format">
+ <xsl:call-template name="autolabel.format">
+ <xsl:with-param name="format" select="$appendix.autolabel"/>
+ </xsl:call-template>
+ </xsl:variable>
+ <xsl:choose>
+ <xsl:when test="$label.from.part != 0 and ancestor::part">
+ <xsl:number from="part" count="appendix" format="{$format}" level="any"/>
+ </xsl:when>
+ <xsl:otherwise>
+ <!-- Optimization for pgsql-docs: When counting to get label for
+ this appendix, preceding appendixes can only be our siblings or
+ children of a preceding part, so only count those instead of
+ scanning the entire node tree. -->
+ <!-- <xsl:number from="book|article" count="appendix" format="{$format}" level="any"/> -->
+ <xsl:number value="count(../preceding-sibling::part/appendix) + count(preceding-sibling::appendix) + 1" format="{$format}"/>
+ </xsl:otherwise>
+ </xsl:choose>
+ </xsl:when>
+ </xsl:choose>
+</xsl:template>
+
+</xsl:stylesheet>
diff --git a/doc/src/sgml/stylesheet-speedup-xhtml.xsl b/doc/src/sgml/stylesheet-speedup-xhtml.xsl
new file mode 100644
index 0000000..7c391a0
--- /dev/null
+++ b/doc/src/sgml/stylesheet-speedup-xhtml.xsl
@@ -0,0 +1,293 @@
+<?xml version="1.0" encoding="utf-8"?>
+<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
+ xmlns="http://www.w3.org/1999/xhtml"
+ version='1.0'>
+
+<!-- Performance-optimized versions of some upstream templates from xhtml/
+ directory -->
+
+<!-- from xhtml/autoidx.xsl -->
+
+<xsl:template match="indexterm" mode="reference">
+ <xsl:param name="scope" select="."/>
+ <xsl:param name="role" select="''"/>
+ <xsl:param name="type" select="''"/>
+ <xsl:param name="position"/>
+ <xsl:param name="separator" select="''"/>
+
+ <xsl:variable name="term.separator">
+ <xsl:call-template name="index.separator">
+ <xsl:with-param name="key" select="'index.term.separator'"/>
+ </xsl:call-template>
+ </xsl:variable>
+
+ <xsl:variable name="number.separator">
+ <xsl:call-template name="index.separator">
+ <xsl:with-param name="key" select="'index.number.separator'"/>
+ </xsl:call-template>
+ </xsl:variable>
+
+ <xsl:variable name="range.separator">
+ <xsl:call-template name="index.separator">
+ <xsl:with-param name="key" select="'index.range.separator'"/>
+ </xsl:call-template>
+ </xsl:variable>
+
+ <xsl:choose>
+ <xsl:when test="$separator != ''">
+ <xsl:value-of select="$separator"/>
+ </xsl:when>
+ <xsl:when test="$position = 1">
+ <xsl:value-of select="$term.separator"/>
+ </xsl:when>
+ <xsl:otherwise>
+ <xsl:value-of select="$number.separator"/>
+ </xsl:otherwise>
+ </xsl:choose>
+
+ <xsl:choose>
+ <xsl:when test="@zone and string(@zone)">
+ <xsl:call-template name="reference">
+ <xsl:with-param name="zones" select="normalize-space(@zone)"/>
+ <xsl:with-param name="position" select="position()"/>
+ <xsl:with-param name="scope" select="$scope"/>
+ <xsl:with-param name="role" select="$role"/>
+ <xsl:with-param name="type" select="$type"/>
+ </xsl:call-template>
+ </xsl:when>
+ <xsl:otherwise>
+ <a>
+ <xsl:apply-templates select="." mode="class.attribute"/>
+ <xsl:variable name="title">
+ <xsl:choose>
+ <xsl:when test="$index.prefer.titleabbrev != 0">
+ <xsl:apply-templates select="(ancestor-or-self::set|ancestor-or-self::book|ancestor-or-self::part|ancestor-or-self::reference|ancestor-or-self::partintro|ancestor-or-self::chapter|ancestor-or-self::appendix|ancestor-or-self::preface|ancestor-or-self::article|ancestor-or-self::section|ancestor-or-self::sect1|ancestor-or-self::sect2|ancestor-or-self::sect3|ancestor-or-self::sect4|ancestor-or-self::sect5|ancestor-or-self::refentry|ancestor-or-self::refsect1|ancestor-or-self::refsect2|ancestor-or-self::refsect3|ancestor-or-self::simplesect|ancestor-or-self::bibliography|ancestor-or-self::glossary|ancestor-or-self::index|ancestor-or-self::webpage|ancestor-or-self::topic)[last()]" mode="titleabbrev.markup"/>
+ </xsl:when>
+ <xsl:otherwise>
+ <xsl:apply-templates select="(ancestor-or-self::set|ancestor-or-self::book|ancestor-or-self::part|ancestor-or-self::reference|ancestor-or-self::partintro|ancestor-or-self::chapter|ancestor-or-self::appendix|ancestor-or-self::preface|ancestor-or-self::article|ancestor-or-self::section|ancestor-or-self::sect1|ancestor-or-self::sect2|ancestor-or-self::sect3|ancestor-or-self::sect4|ancestor-or-self::sect5|ancestor-or-self::refentry|ancestor-or-self::refsect1|ancestor-or-self::refsect2|ancestor-or-self::refsect3|ancestor-or-self::simplesect|ancestor-or-self::bibliography|ancestor-or-self::glossary|ancestor-or-self::index|ancestor-or-self::webpage|ancestor-or-self::topic)[last()]" mode="title.markup"/>
+ </xsl:otherwise>
+ </xsl:choose>
+ </xsl:variable>
+
+ <xsl:attribute name="href">
+ <xsl:choose>
+ <xsl:when test="$index.links.to.section = 1">
+ <xsl:call-template name="href.target">
+ <xsl:with-param name="object" select="(ancestor-or-self::set|ancestor-or-self::book|ancestor-or-self::part|ancestor-or-self::reference|ancestor-or-self::partintro|ancestor-or-self::chapter|ancestor-or-self::appendix|ancestor-or-self::preface|ancestor-or-self::article|ancestor-or-self::section|ancestor-or-self::sect1|ancestor-or-self::sect2|ancestor-or-self::sect3|ancestor-or-self::sect4|ancestor-or-self::sect5|ancestor-or-self::refentry|ancestor-or-self::refsect1|ancestor-or-self::refsect2|ancestor-or-self::refsect3|ancestor-or-self::simplesect|ancestor-or-self::bibliography|ancestor-or-self::glossary|ancestor-or-self::index|ancestor-or-self::webpage|ancestor-or-self::topic)[last()]"/>
+ <!-- Optimization for pgsql-docs: We only have an index as a
+ child of book, so look that up directly instead of
+ scanning the entire node tree. Also, don't look for
+ setindex. -->
+ <!-- <xsl:with-param name="context" select="(//index[count(ancestor::node()|$scope) = count(ancestor::node()) and ($role = @role or $type = @type or (string-length($role) = 0 and string-length($type) = 0))] | //setindex[count(ancestor::node()|$scope) = count(ancestor::node()) and ($role = @role or $type = @type or (string-length($role) = 0 and string-length($type) = 0))])[1]"/> -->
+ <xsl:with-param name="context" select="(/book/index[count(ancestor::node()|$scope) = count(ancestor::node()) and ($role = @role or $type = @type or (string-length($role) = 0 and string-length($type) = 0))])[1]"/>
+ </xsl:call-template>
+ </xsl:when>
+ <xsl:otherwise>
+ <xsl:call-template name="href.target">
+ <xsl:with-param name="object" select="."/>
+ <xsl:with-param name="context" select="(//index[count(ancestor::node()|$scope) = count(ancestor::node()) and ($role = @role or $type = @type or (string-length($role) = 0 and string-length($type) = 0))] | //setindex[count(ancestor::node()|$scope) = count(ancestor::node()) and ($role = @role or $type = @type or (string-length($role) = 0 and string-length($type) = 0))])[1]"/>
+ </xsl:call-template>
+ </xsl:otherwise>
+ </xsl:choose>
+
+ </xsl:attribute>
+
+ <xsl:value-of select="$title"/> <!-- text only -->
+ </a>
+
+ <xsl:variable name="id" select="(@id|@xml:id)[1]"/>
+ <xsl:if test="key('endofrange', $id)[count(ancestor::node()|$scope) = count(ancestor::node()) and ($role = @role or $type = @type or (string-length($role) = 0 and string-length($type) = 0))]">
+ <xsl:apply-templates select="key('endofrange', $id)[count(ancestor::node()|$scope) = count(ancestor::node()) and ($role = @role or $type = @type or (string-length($role) = 0 and string-length($type) = 0))][last()]" mode="reference">
+ <xsl:with-param name="position" select="position()"/>
+ <xsl:with-param name="scope" select="$scope"/>
+ <xsl:with-param name="role" select="$role"/>
+ <xsl:with-param name="type" select="$type"/>
+ <xsl:with-param name="separator" select="$range.separator"/>
+ </xsl:apply-templates>
+ </xsl:if>
+ </xsl:otherwise>
+ </xsl:choose>
+</xsl:template>
+
+<xsl:template name="reference">
+ <xsl:param name="scope" select="."/>
+ <xsl:param name="role" select="''"/>
+ <xsl:param name="type" select="''"/>
+ <xsl:param name="zones"/>
+
+ <xsl:choose>
+ <xsl:when test="contains($zones, ' ')">
+ <xsl:variable name="zone" select="substring-before($zones, ' ')"/>
+ <xsl:variable name="target" select="key('sections', $zone)"/>
+
+ <a>
+ <xsl:apply-templates select="." mode="class.attribute"/>
+ <xsl:call-template name="id.attribute"/>
+ <xsl:attribute name="href">
+ <xsl:call-template name="href.target">
+ <xsl:with-param name="object" select="$target[1]"/>
+ <xsl:with-param name="context" select="//index[count(ancestor::node()|$scope) = count(ancestor::node()) and ($role = @role or $type = @type or (string-length($role) = 0 and string-length($type) = 0))][1]"/>
+ </xsl:call-template>
+ </xsl:attribute>
+ <xsl:apply-templates select="$target[1]" mode="index-title-content"/>
+ </a>
+ <xsl:text>, </xsl:text>
+ <xsl:call-template name="reference">
+ <xsl:with-param name="zones" select="substring-after($zones, ' ')"/>
+ <xsl:with-param name="position" select="position()"/>
+ <xsl:with-param name="scope" select="$scope"/>
+ <xsl:with-param name="role" select="$role"/>
+ <xsl:with-param name="type" select="$type"/>
+ </xsl:call-template>
+ </xsl:when>
+ <xsl:otherwise>
+ <xsl:variable name="zone" select="$zones"/>
+ <xsl:variable name="target" select="key('sections', $zone)"/>
+
+ <a>
+ <xsl:apply-templates select="." mode="class.attribute"/>
+ <xsl:call-template name="id.attribute"/>
+ <xsl:attribute name="href">
+ <xsl:call-template name="href.target">
+ <xsl:with-param name="object" select="$target[1]"/>
+ <!-- Optimization for pgsql-docs: Only look for index under book
+ instead of searching the whole node tree. -->
+ <!-- <xsl:with-param name="context" select="//index[count(ancestor::node()|$scope) = count(ancestor::node()) and ($role = @role or $type = @type or (string-length($role) = 0 and string-length($type) = 0))][1]"/> -->
+ <xsl:with-param name="context" select="/book/index[count(ancestor::node()|$scope) = count(ancestor::node()) and ($role = @role or $type = @type or (string-length($role) = 0 and string-length($type) = 0))][1]"/>
+ </xsl:call-template>
+ </xsl:attribute>
+ <xsl:apply-templates select="$target[1]" mode="index-title-content"/>
+ </a>
+ </xsl:otherwise>
+ </xsl:choose>
+</xsl:template>
+
+
+<!-- from xhtml/chunk-common.xsl -->
+
+<xsl:template name="chunk-all-sections">
+ <xsl:param name="content">
+ <xsl:apply-imports/>
+ </xsl:param>
+
+ <!-- Optimization for pgsql-docs: Since we set a fixed $chunk.section.depth,
+ we can do away with a bunch of complicated XPath searches for the
+ previous and next sections at various levels. -->
+
+ <xsl:if test="$chunk.section.depth != 1">
+ <xsl:message terminate="yes">
+ <xsl:text>Error: If you change $chunk.section.depth, then you must update the performance-optimized chunk-all-sections-template.</xsl:text>
+ </xsl:message>
+ </xsl:if>
+
+ <xsl:variable name="prev"
+ select="(preceding::book[1]
+ |preceding::preface[1]
+ |preceding::chapter[1]
+ |preceding::appendix[1]
+ |preceding::part[1]
+ |preceding::reference[1]
+ |preceding::refentry[1]
+ |preceding::colophon[1]
+ |preceding::article[1]
+ |preceding::topic[1]
+ |preceding::bibliography[parent::article or parent::book or parent::part][1]
+ |preceding::glossary[parent::article or parent::book or parent::part][1]
+ |preceding::index[$generate.index != 0]
+ [parent::article or parent::book or parent::part][1]
+ |preceding::setindex[$generate.index != 0][1]
+ |ancestor::set
+ |ancestor::book[1]
+ |ancestor::preface[1]
+ |ancestor::chapter[1]
+ |ancestor::appendix[1]
+ |ancestor::part[1]
+ |ancestor::reference[1]
+ |ancestor::article[1]
+ |ancestor::topic[1]
+ |preceding::sect1[1]
+ |ancestor::sect1[1])[last()]"/>
+
+ <xsl:variable name="next"
+ select="(following::book[1]
+ |following::preface[1]
+ |following::chapter[1]
+ |following::appendix[1]
+ |following::part[1]
+ |following::reference[1]
+ |following::refentry[1]
+ |following::colophon[1]
+ |following::bibliography[parent::article or parent::book or parent::part][1]
+ |following::glossary[parent::article or parent::book or parent::part][1]
+ |following::index[$generate.index != 0]
+ [parent::article or parent::book][1]
+ |following::article[1]
+ |following::topic[1]
+ |following::setindex[$generate.index != 0][1]
+ |descendant::book[1]
+ |descendant::preface[1]
+ |descendant::chapter[1]
+ |descendant::appendix[1]
+ |descendant::article[1]
+ |descendant::topic[1]
+ |descendant::bibliography[parent::article or parent::book][1]
+ |descendant::glossary[parent::article or parent::book or parent::part][1]
+ |descendant::index[$generate.index != 0]
+ [parent::article or parent::book][1]
+ |descendant::colophon[1]
+ |descendant::setindex[$generate.index != 0][1]
+ |descendant::part[1]
+ |descendant::reference[1]
+ |descendant::refentry[1]
+ |following::sect1[1]
+ |descendant::sect1[1])[1]"/>
+
+ <xsl:call-template name="process-chunk">
+ <xsl:with-param name="prev" select="$prev"/>
+ <xsl:with-param name="next" select="$next"/>
+ <xsl:with-param name="content" select="$content"/>
+ </xsl:call-template>
+</xsl:template>
+
+<xsl:template name="html.head">
+ <xsl:param name="prev" select="/foo"/>
+ <xsl:param name="next" select="/foo"/>
+
+ <!-- Optimization for pgsql-docs: Cut out a bunch of things we don't need
+ here, including an expensive //legalnotice search. -->
+
+ <head>
+ <xsl:call-template name="system.head.content"/>
+ <xsl:call-template name="head.content"/>
+
+ <xsl:if test="$prev">
+ <link rel="prev">
+ <xsl:attribute name="href">
+ <xsl:call-template name="href.target">
+ <xsl:with-param name="object" select="$prev"/>
+ </xsl:call-template>
+ </xsl:attribute>
+ <xsl:attribute name="title">
+ <xsl:apply-templates select="$prev" mode="object.title.markup.textonly"/>
+ </xsl:attribute>
+ </link>
+ </xsl:if>
+
+ <xsl:if test="$next">
+ <link rel="next">
+ <xsl:attribute name="href">
+ <xsl:call-template name="href.target">
+ <xsl:with-param name="object" select="$next"/>
+ </xsl:call-template>
+ </xsl:attribute>
+ <xsl:attribute name="title">
+ <xsl:apply-templates select="$next" mode="object.title.markup.textonly"/>
+ </xsl:attribute>
+ </link>
+ </xsl:if>
+
+ <xsl:call-template name="user.head.content"/>
+ </head>
+</xsl:template>
+
+</xsl:stylesheet>
diff --git a/doc/src/sgml/stylesheet.xsl b/doc/src/sgml/stylesheet.xsl
index 7967b36..631fcc4 100644
--- a/doc/src/sgml/stylesheet.xsl
+++ b/doc/src/sgml/stylesheet.xsl
@@ -6,6 +6,7 @@
<xsl:import href="http://docbook.sourceforge.net/release/xsl/current/xhtml/chunk.xsl"/>
<xsl:include href="stylesheet-common.xsl" />
+<xsl:include href="stylesheet-speedup-xhtml.xsl" />
<!-- Parameters -->
--
2.8.3
^ permalink raw reply [nested|flat] 86+ messages in thread
* Re: Docbook 5.x
2016-04-20 14:30 Docbook 5.x Jürgen Purtz <[email protected]>
2016-05-03 19:34 ` Re: Docbook 5.x Alvaro Herrera <[email protected]>
2016-05-03 20:13 ` Re: Docbook 5.x Oleg Bartunov <[email protected]>
2016-05-04 00:44 ` Re: Docbook 5.x Peter Eisentraut <[email protected]>
2016-05-05 04:45 ` Re: Docbook 5.x Alexander Law <[email protected]>
2016-06-03 19:31 ` Re: Docbook 5.x Peter Eisentraut <[email protected]>
@ 2016-06-04 14:28 ` Alexander Law <[email protected]>
2016-06-06 12:28 ` Re: Docbook 5.x Peter Eisentraut <[email protected]>
0 siblings, 1 reply; 86+ messages in thread
From: Alexander Law @ 2016-06-04 14:28 UTC (permalink / raw)
To: Peter Eisentraut <[email protected]>; [email protected]; Alvaro Herrera <[email protected]>; Alexander Lakhin <[email protected]>; +Cc: Jürgen Purtz <[email protected]>; pgsql-docs
Hello Peter,
Thanks for improvements!
I checked outputs (with the attached script) and found that there is
small difference with the improved patch.
For example, look at xtypes.html:
- <link rel="home" href="index.html" title="PostgreSQL 9.6beta1
Documentation" /><link rel="up" href="extend.html"
title="Chapter 35. Extending SQL" /><link rel="prev" href="xaggr.html"
title="35.10. User-defined Aggregates" /><link rel="next"
href="xoper.html" title="35.12. User-defined Operators" /><link
rel="copyright" href="legalnotice.html" title="Legal Notice" /></head>
+ <link rel="prev" href="xaggr.html" title="35.10. User-defined
Aggregates" /><link rel="next" href="xoper.html"
title="35.12. User-defined Operators" /></head>
It caused by <xsl:template name="html.head">.
Leaving aside the question whether the links "home", "up" and
"copyright" are needed, maybe it's better to split the commit to two?
First to speed up the conversion while making sure that the output is
the same, and the second to change the html.head output format.
Best regards,
Alexander
03.06.2016 22:31, Peter Eisentraut пишет:
> On 5/5/16 12:45 AM, Alexander Law wrote:
>> Done (previous patch cleaned).
>> This patch optimizes XSL transformations contained in docbook-xsl
>> (1.78.1).
>
> I have looked through this patch, and it's awesome. I have tweaked it
> a bit more along the lines you guys have started, and now the build
> time is pretty much the same as with DSSSL. Attached is my final
> patch, which I plan to commit as soon as the new branch opens.
>
> (I only have Alexander Lakhin as credit right now. Please let me know
> if anyone else contributed.)
>
--
Sent via pgsql-docs mailing list ([email protected])
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-docs
Attachments:
[application/x-shellscript] check_patch.sh (2.1K, 2-check_patch.sh)
download
^ permalink raw reply [nested|flat] 86+ messages in thread
* Re: Docbook 5.x
2016-04-20 14:30 Docbook 5.x Jürgen Purtz <[email protected]>
2016-05-03 19:34 ` Re: Docbook 5.x Alvaro Herrera <[email protected]>
2016-05-03 20:13 ` Re: Docbook 5.x Oleg Bartunov <[email protected]>
2016-05-04 00:44 ` Re: Docbook 5.x Peter Eisentraut <[email protected]>
2016-05-05 04:45 ` Re: Docbook 5.x Alexander Law <[email protected]>
2016-06-03 19:31 ` Re: Docbook 5.x Peter Eisentraut <[email protected]>
2016-06-04 14:28 ` Re: Docbook 5.x Alexander Law <[email protected]>
@ 2016-06-06 12:28 ` Peter Eisentraut <[email protected]>
2016-06-06 17:49 ` Re: Docbook 5.x Alexander Law <[email protected]>
2016-08-18 17:56 ` Re: Docbook 5.x Peter Eisentraut <[email protected]>
0 siblings, 2 replies; 86+ messages in thread
From: Peter Eisentraut @ 2016-06-06 12:28 UTC (permalink / raw)
To: Alexander Law <[email protected]>; [email protected]; Alvaro Herrera <[email protected]>; Alexander Lakhin <[email protected]>; +Cc: Jürgen Purtz <[email protected]>; pgsql-docs
On 6/4/16 10:28 AM, Alexander Law wrote:
> It caused by <xsl:template name="html.head">.
> Leaving aside the question whether the links "home", "up" and
> "copyright" are needed, maybe it's better to split the commit to two?
> First to speed up the conversion while making sure that the output is
> the same, and the second to change the html.head output format.
I did that intentionally, but I agree that it might be better to split
this off into a separate commit.
--
Peter Eisentraut http://www.2ndQuadrant.com/
PostgreSQL Development, 24x7 Support, Remote DBA, Training & Services
--
Sent via pgsql-docs mailing list ([email protected])
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-docs
^ permalink raw reply [nested|flat] 86+ messages in thread
* Re: Docbook 5.x
2016-04-20 14:30 Docbook 5.x Jürgen Purtz <[email protected]>
2016-05-03 19:34 ` Re: Docbook 5.x Alvaro Herrera <[email protected]>
2016-05-03 20:13 ` Re: Docbook 5.x Oleg Bartunov <[email protected]>
2016-05-04 00:44 ` Re: Docbook 5.x Peter Eisentraut <[email protected]>
2016-05-05 04:45 ` Re: Docbook 5.x Alexander Law <[email protected]>
2016-06-03 19:31 ` Re: Docbook 5.x Peter Eisentraut <[email protected]>
2016-06-04 14:28 ` Re: Docbook 5.x Alexander Law <[email protected]>
2016-06-06 12:28 ` Re: Docbook 5.x Peter Eisentraut <[email protected]>
@ 2016-06-06 17:49 ` Alexander Law <[email protected]>
2016-06-06 19:56 ` Re: Docbook 5.x Peter Eisentraut <[email protected]>
1 sibling, 1 reply; 86+ messages in thread
From: Alexander Law @ 2016-06-06 17:49 UTC (permalink / raw)
To: Peter Eisentraut <[email protected]>; [email protected]; Alvaro Herrera <[email protected]>; Alexander Lakhin <[email protected]>; +Cc: Jürgen Purtz <[email protected]>; pgsql-docs
Hello Peter,
In that case can we postpone the second commit until step 3 in your plan
of migration to XML is done?
I mean "- Port all DSSSL customizations to XSLT. Manually evaluate
output for quality. ";
If we will not change contents/formatting until migration to xslt is
done, we can ensure that output is the same by automatic means.
(See my letter:
https://www.postgresql.org/message-id/56337365.2080104%40postgrespro.ru)
Best regards,
Alexander
06.06.2016 15:28, Peter Eisentraut пишет:
> On 6/4/16 10:28 AM, Alexander Law wrote:
>> It caused by <xsl:template name="html.head">.
>> Leaving aside the question whether the links "home", "up" and
>> "copyright" are needed, maybe it's better to split the commit to two?
>> First to speed up the conversion while making sure that the output is
>> the same, and the second to change the html.head output format.
>
> I did that intentionally, but I agree that it might be better to split
> this off into a separate commit.
>
--
Sent via pgsql-docs mailing list ([email protected])
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-docs
^ permalink raw reply [nested|flat] 86+ messages in thread
* Re: Docbook 5.x
2016-04-20 14:30 Docbook 5.x Jürgen Purtz <[email protected]>
2016-05-03 19:34 ` Re: Docbook 5.x Alvaro Herrera <[email protected]>
2016-05-03 20:13 ` Re: Docbook 5.x Oleg Bartunov <[email protected]>
2016-05-04 00:44 ` Re: Docbook 5.x Peter Eisentraut <[email protected]>
2016-05-05 04:45 ` Re: Docbook 5.x Alexander Law <[email protected]>
2016-06-03 19:31 ` Re: Docbook 5.x Peter Eisentraut <[email protected]>
2016-06-04 14:28 ` Re: Docbook 5.x Alexander Law <[email protected]>
2016-06-06 12:28 ` Re: Docbook 5.x Peter Eisentraut <[email protected]>
2016-06-06 17:49 ` Re: Docbook 5.x Alexander Law <[email protected]>
@ 2016-06-06 19:56 ` Peter Eisentraut <[email protected]>
0 siblings, 0 replies; 86+ messages in thread
From: Peter Eisentraut @ 2016-06-06 19:56 UTC (permalink / raw)
To: Alexander Law <[email protected]>; [email protected]; Alvaro Herrera <[email protected]>; Alexander Lakhin <[email protected]>; +Cc: Jürgen Purtz <[email protected]>; pgsql-docs
On 6/6/16 1:49 PM, Alexander Law wrote:
> In that case can we postpone the second commit until step 3 in your plan
> of migration to XML is done?
> I mean "- Port all DSSSL customizations to XSLT. Manually evaluate
> output for quality. ";
It is part of the performance work.
--
Peter Eisentraut http://www.2ndQuadrant.com/
PostgreSQL Development, 24x7 Support, Remote DBA, Training & Services
--
Sent via pgsql-docs mailing list ([email protected])
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-docs
^ permalink raw reply [nested|flat] 86+ messages in thread
* Re: Docbook 5.x
2016-04-20 14:30 Docbook 5.x Jürgen Purtz <[email protected]>
2016-05-03 19:34 ` Re: Docbook 5.x Alvaro Herrera <[email protected]>
2016-05-03 20:13 ` Re: Docbook 5.x Oleg Bartunov <[email protected]>
2016-05-04 00:44 ` Re: Docbook 5.x Peter Eisentraut <[email protected]>
2016-05-05 04:45 ` Re: Docbook 5.x Alexander Law <[email protected]>
2016-06-03 19:31 ` Re: Docbook 5.x Peter Eisentraut <[email protected]>
2016-06-04 14:28 ` Re: Docbook 5.x Alexander Law <[email protected]>
2016-06-06 12:28 ` Re: Docbook 5.x Peter Eisentraut <[email protected]>
@ 2016-08-18 17:56 ` Peter Eisentraut <[email protected]>
2016-08-19 13:14 ` Re: Docbook 5.x Alexander Law <[email protected]>
1 sibling, 1 reply; 86+ messages in thread
From: Peter Eisentraut @ 2016-08-18 17:56 UTC (permalink / raw)
To: Alexander Law <[email protected]>; [email protected]; Alvaro Herrera <[email protected]>; Alexander Lakhin <[email protected]>; +Cc: Jürgen Purtz <[email protected]>; pgsql-docs
On 6/6/16 8:28 AM, Peter Eisentraut wrote:
> On 6/4/16 10:28 AM, Alexander Law wrote:
>> It caused by <xsl:template name="html.head">.
>> Leaving aside the question whether the links "home", "up" and
>> "copyright" are needed, maybe it's better to split the commit to two?
>> First to speed up the conversion while making sure that the output is
>> the same, and the second to change the html.head output format.
>
> I did that intentionally, but I agree that it might be better to split
> this off into a separate commit.
I have committed the first part of this, as discussed.
--
Peter Eisentraut http://www.2ndQuadrant.com/
PostgreSQL Development, 24x7 Support, Remote DBA, Training & Services
--
Sent via pgsql-docs mailing list ([email protected])
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-docs
^ permalink raw reply [nested|flat] 86+ messages in thread
* Re: Docbook 5.x
2016-04-20 14:30 Docbook 5.x Jürgen Purtz <[email protected]>
2016-05-03 19:34 ` Re: Docbook 5.x Alvaro Herrera <[email protected]>
2016-05-03 20:13 ` Re: Docbook 5.x Oleg Bartunov <[email protected]>
2016-05-04 00:44 ` Re: Docbook 5.x Peter Eisentraut <[email protected]>
2016-05-05 04:45 ` Re: Docbook 5.x Alexander Law <[email protected]>
2016-06-03 19:31 ` Re: Docbook 5.x Peter Eisentraut <[email protected]>
2016-06-04 14:28 ` Re: Docbook 5.x Alexander Law <[email protected]>
2016-06-06 12:28 ` Re: Docbook 5.x Peter Eisentraut <[email protected]>
2016-08-18 17:56 ` Re: Docbook 5.x Peter Eisentraut <[email protected]>
@ 2016-08-19 13:14 ` Alexander Law <[email protected]>
2016-08-22 18:06 ` Re: Docbook 5.x Peter Eisentraut <[email protected]>
0 siblings, 1 reply; 86+ messages in thread
From: Alexander Law @ 2016-08-19 13:14 UTC (permalink / raw)
To: Peter Eisentraut <[email protected]>; [email protected]; Alvaro Herrera <[email protected]>; Alexander Lakhin <[email protected]>; +Cc: Jürgen Purtz <[email protected]>; pgsql-docs
Great!
The next items in our plan were:
- Wait a while to make sure everyone is happy with the performance. Keep
tweaking if necessary.
- Port all DSSSL customizations to XSLT. Manually evaluate output for
quality.
Should we now compare DSSSL outputs with XSLT?
I had some success with it before. See my letter:
https://www.postgresql.org/message-id/57712848.7060306%40gmail.com
Those xslt's (see xhtml-like-dsssl.patch) can help us to see all the
differences and to decide which customizations to keep.
Best regards,
Alexander
18.08.2016 20:56, Peter Eisentraut пишет:
> On 6/6/16 8:28 AM, Peter Eisentraut wrote:
>> On 6/4/16 10:28 AM, Alexander Law wrote:
>>> It caused by <xsl:template name="html.head">.
>>> Leaving aside the question whether the links "home", "up" and
>>> "copyright" are needed, maybe it's better to split the commit to two?
>>> First to speed up the conversion while making sure that the output is
>>> the same, and the second to change the html.head output format.
>> I did that intentionally, but I agree that it might be better to split
>> this off into a separate commit.
> I have committed the first part of this, as discussed.
>
--
Sent via pgsql-docs mailing list ([email protected])
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-docs
^ permalink raw reply [nested|flat] 86+ messages in thread
* Re: Docbook 5.x
2016-04-20 14:30 Docbook 5.x Jürgen Purtz <[email protected]>
2016-05-03 19:34 ` Re: Docbook 5.x Alvaro Herrera <[email protected]>
2016-05-03 20:13 ` Re: Docbook 5.x Oleg Bartunov <[email protected]>
2016-05-04 00:44 ` Re: Docbook 5.x Peter Eisentraut <[email protected]>
2016-05-05 04:45 ` Re: Docbook 5.x Alexander Law <[email protected]>
2016-06-03 19:31 ` Re: Docbook 5.x Peter Eisentraut <[email protected]>
2016-06-04 14:28 ` Re: Docbook 5.x Alexander Law <[email protected]>
2016-06-06 12:28 ` Re: Docbook 5.x Peter Eisentraut <[email protected]>
2016-08-18 17:56 ` Re: Docbook 5.x Peter Eisentraut <[email protected]>
2016-08-19 13:14 ` Re: Docbook 5.x Alexander Law <[email protected]>
@ 2016-08-22 18:06 ` Peter Eisentraut <[email protected]>
2016-08-23 14:23 ` Re: Docbook 5.x Alexander Law <[email protected]>
0 siblings, 1 reply; 86+ messages in thread
From: Peter Eisentraut @ 2016-08-22 18:06 UTC (permalink / raw)
To: Alexander Law <[email protected]>; [email protected]; Alvaro Herrera <[email protected]>; Alexander Lakhin <[email protected]>; +Cc: Jürgen Purtz <[email protected]>; pgsql-docs
On 8/19/16 9:14 AM, Alexander Law wrote:
> The next items in our plan were:
An immediate problem is that the patched stuff no longer works with
older stylesheets (1.76.1?). I'm glad to leave older stuff behind for a
400% speedup, but we need to analyze the exact effect and possibly
document it or work around it.
> - Wait a while to make sure everyone is happy with the performance. Keep
> tweaking if necessary.
> - Port all DSSSL customizations to XSLT. Manually evaluate output for
> quality.
>
> Should we now compare DSSSL outputs with XSLT?
> I had some success with it before. See my letter:
> https://www.postgresql.org/message-id/57712848.7060306%40gmail.com
> Those xslt's (see xhtml-like-dsssl.patch) can help us to see all the
> differences and to decide which customizations to keep.
It looks like the idea there is to whack the XSLT stylesheets until the
output looks exactly like the DSSSL output? I'm not sure that's
terribly useful. It would probably be a lot of work, which we'll just
end up removing eventually. I'd rather just fix any formatting issues
we find and move forward.
--
Peter Eisentraut http://www.2ndQuadrant.com/
PostgreSQL Development, 24x7 Support, Remote DBA, Training & Services
--
Sent via pgsql-docs mailing list ([email protected])
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-docs
^ permalink raw reply [nested|flat] 86+ messages in thread
* Re: Docbook 5.x
2016-04-20 14:30 Docbook 5.x Jürgen Purtz <[email protected]>
2016-05-03 19:34 ` Re: Docbook 5.x Alvaro Herrera <[email protected]>
2016-05-03 20:13 ` Re: Docbook 5.x Oleg Bartunov <[email protected]>
2016-05-04 00:44 ` Re: Docbook 5.x Peter Eisentraut <[email protected]>
2016-05-05 04:45 ` Re: Docbook 5.x Alexander Law <[email protected]>
2016-06-03 19:31 ` Re: Docbook 5.x Peter Eisentraut <[email protected]>
2016-06-04 14:28 ` Re: Docbook 5.x Alexander Law <[email protected]>
2016-06-06 12:28 ` Re: Docbook 5.x Peter Eisentraut <[email protected]>
2016-08-18 17:56 ` Re: Docbook 5.x Peter Eisentraut <[email protected]>
2016-08-19 13:14 ` Re: Docbook 5.x Alexander Law <[email protected]>
2016-08-22 18:06 ` Re: Docbook 5.x Peter Eisentraut <[email protected]>
@ 2016-08-23 14:23 ` Alexander Law <[email protected]>
2016-08-24 15:12 ` Re: Docbook 5.x Peter Eisentraut <[email protected]>
2016-09-14 11:18 ` Re: Docbook 5.x Alexander Law <[email protected]>
0 siblings, 2 replies; 86+ messages in thread
From: Alexander Law @ 2016-08-23 14:23 UTC (permalink / raw)
To: Peter Eisentraut <[email protected]>; [email protected]; Alvaro Herrera <[email protected]>; Alexander Lakhin <[email protected]>; +Cc: Jürgen Purtz <[email protected]>; pgsql-docs
Hello,
>> The next items in our plan were:
> An immediate problem is that the patched stuff no longer works with
> older stylesheets (1.76.1?). I'm glad to leave older stuff behind for a
> 400% speedup, but we need to analyze the exact effect and possibly
> document it or work around it.
Please consider committing attached patch. Commented-out call-template
does nothing so we can just customize our customized templates further
to support 1.76.
I've just performed the build with Ubuntu 13.04/docbook 1.76.1 - it works.
(In case the call-template generated something it would appear in
bookindex.html only.)
>
>> - Wait a while to make sure everyone is happy with the performance. Keep
>> tweaking if necessary.
>> - Port all DSSSL customizations to XSLT. Manually evaluate output for
>> quality.
>>
>> Should we now compare DSSSL outputs with XSLT?
>> I had some success with it before. See my letter:
>> https://www.postgresql.org/message-id/57712848.7060306%40gmail.com
>> Those xslt's (see xhtml-like-dsssl.patch) can help us to see all the
>> differences and to decide which customizations to keep.
> It looks like the idea there is to whack the XSLT stylesheets until the
> output looks exactly like the DSSSL output? I'm not sure that's
> terribly useful. It would probably be a lot of work, which we'll just
> end up removing eventually. I'd rather just fix any formatting issues
> we find and move forward.
That work is done already and it's results are countable and observable
differences. (See comments in the xslt.)
For example, with DSSSL we don't get a chapter TOC when the chapter
contains only one sect1 (with XSLT we get the TOC with the one item).
We also had subtoc for sect1/refentry and sect1/simplesect, but with
XSLT it's absent.
So if all such differences are not important, let's move forward.
Best regards,
Alexander
--
Sent via pgsql-docs mailing list ([email protected])
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-docs
Attachments:
[text/x-patch] stylesheet-speedup-docbook-1.76.patch (1.1K, 2-stylesheet-speedup-docbook-1.76.patch)
download | inline diff:
diff --git a/doc/src/sgml/stylesheet-speedup-xhtml.xsl b/doc/src/sgml/stylesheet-speedup-xhtml.xsl
index 8428dc5..b6df684 100644
--- a/doc/src/sgml/stylesheet-speedup-xhtml.xsl
+++ b/doc/src/sgml/stylesheet-speedup-xhtml.xsl
@@ -122,7 +122,8 @@
<a>
<xsl:apply-templates select="." mode="class.attribute"/>
- <xsl:call-template name="id.attribute"/>
+<!-- Optimization for pgsql-docs: this call adds nothing but fails with docbook 1.76 -->
+<!-- <xsl:call-template name="id.attribute"/> -->
<xsl:attribute name="href">
<xsl:call-template name="href.target">
<xsl:with-param name="object" select="$target[1]"/>
@@ -146,7 +147,8 @@
<a>
<xsl:apply-templates select="." mode="class.attribute"/>
- <xsl:call-template name="id.attribute"/>
+<!-- Optimization for pgsql-docs: this call adds nothing but fails with docbook 1.76 -->
+<!-- <xsl:call-template name="id.attribute"/> -->
<xsl:attribute name="href">
<xsl:call-template name="href.target">
<xsl:with-param name="object" select="$target[1]"/>
^ permalink raw reply [nested|flat] 86+ messages in thread
* Re: Docbook 5.x
2016-04-20 14:30 Docbook 5.x Jürgen Purtz <[email protected]>
2016-05-03 19:34 ` Re: Docbook 5.x Alvaro Herrera <[email protected]>
2016-05-03 20:13 ` Re: Docbook 5.x Oleg Bartunov <[email protected]>
2016-05-04 00:44 ` Re: Docbook 5.x Peter Eisentraut <[email protected]>
2016-05-05 04:45 ` Re: Docbook 5.x Alexander Law <[email protected]>
2016-06-03 19:31 ` Re: Docbook 5.x Peter Eisentraut <[email protected]>
2016-06-04 14:28 ` Re: Docbook 5.x Alexander Law <[email protected]>
2016-06-06 12:28 ` Re: Docbook 5.x Peter Eisentraut <[email protected]>
2016-08-18 17:56 ` Re: Docbook 5.x Peter Eisentraut <[email protected]>
2016-08-19 13:14 ` Re: Docbook 5.x Alexander Law <[email protected]>
2016-08-22 18:06 ` Re: Docbook 5.x Peter Eisentraut <[email protected]>
2016-08-23 14:23 ` Re: Docbook 5.x Alexander Law <[email protected]>
@ 2016-08-24 15:12 ` Peter Eisentraut <[email protected]>
1 sibling, 0 replies; 86+ messages in thread
From: Peter Eisentraut @ 2016-08-24 15:12 UTC (permalink / raw)
To: Alexander Law <[email protected]>; [email protected]; Alvaro Herrera <[email protected]>; Alexander Lakhin <[email protected]>; +Cc: Jürgen Purtz <[email protected]>; pgsql-docs
On 8/23/16 10:23 AM, Alexander Law wrote:
>> An immediate problem is that the patched stuff no longer works with
>> > older stylesheets (1.76.1?). I'm glad to leave older stuff behind for a
>> > 400% speedup, but we need to analyze the exact effect and possibly
>> > document it or work around it.
> Please consider committing attached patch. Commented-out call-template
> does nothing so we can just customize our customized templates further
> to support 1.76.
pushed, thanks
--
Peter Eisentraut http://www.2ndQuadrant.com/
PostgreSQL Development, 24x7 Support, Remote DBA, Training & Services
--
Sent via pgsql-docs mailing list ([email protected])
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-docs
^ permalink raw reply [nested|flat] 86+ messages in thread
* Re: Docbook 5.x
2016-04-20 14:30 Docbook 5.x Jürgen Purtz <[email protected]>
2016-05-03 19:34 ` Re: Docbook 5.x Alvaro Herrera <[email protected]>
2016-05-03 20:13 ` Re: Docbook 5.x Oleg Bartunov <[email protected]>
2016-05-04 00:44 ` Re: Docbook 5.x Peter Eisentraut <[email protected]>
2016-05-05 04:45 ` Re: Docbook 5.x Alexander Law <[email protected]>
2016-06-03 19:31 ` Re: Docbook 5.x Peter Eisentraut <[email protected]>
2016-06-04 14:28 ` Re: Docbook 5.x Alexander Law <[email protected]>
2016-06-06 12:28 ` Re: Docbook 5.x Peter Eisentraut <[email protected]>
2016-08-18 17:56 ` Re: Docbook 5.x Peter Eisentraut <[email protected]>
2016-08-19 13:14 ` Re: Docbook 5.x Alexander Law <[email protected]>
2016-08-22 18:06 ` Re: Docbook 5.x Peter Eisentraut <[email protected]>
2016-08-23 14:23 ` Re: Docbook 5.x Alexander Law <[email protected]>
@ 2016-09-14 11:18 ` Alexander Law <[email protected]>
2016-09-14 13:05 ` Re: Docbook 5.x Jürgen Purtz <[email protected]>
2016-11-08 13:25 ` Re: Docbook 5.x Peter Eisentraut <[email protected]>
1 sibling, 2 replies; 86+ messages in thread
From: Alexander Law @ 2016-09-14 11:18 UTC (permalink / raw)
To: Peter Eisentraut <[email protected]>; [email protected]; Alvaro Herrera <[email protected]>; Alexander Lakhin <[email protected]>; +Cc: Jürgen Purtz <[email protected]>; pgsql-docs
Hello, Peter.
>>> Should we now compare DSSSL outputs with XSLT?
>>> I had some success with it before. See my letter:
>>> https://www.postgresql.org/message-id/57712848.7060306%40gmail.com
>>> Those xslt's (see xhtml-like-dsssl.patch) can help us to see all the
>>> differences and to decide which customizations to keep.
>> It looks like the idea there is to whack the XSLT stylesheets until the
>> output looks exactly like the DSSSL output? I'm not sure that's
>> terribly useful. It would probably be a lot of work, which we'll just
>> end up removing eventually. I'd rather just fix any formatting issues
>> we find and move forward.
> That work is done already and it's results are countable and
> observable differences. (See comments in the xslt.)
> For example, with DSSSL we don't get a chapter TOC when the chapter
> contains only one sect1 (with XSLT we get the TOC with the one item).
> We also had subtoc for sect1/refentry and sect1/simplesect, but with
> XSLT it's absent.
> So if all such differences are not important, let's move forward.
>
Please look at the
http://oc.postgrespro.ru/index.php/s/ttJyMDLr8Xr1HTu/download
where I have gathered together all the significant differences, that we
have between DSSSL and XSLT outputs.
I have marked red the differences that I would consider as negative.
Let's decide which ones are acceptable and which we need to eliminate.
Best regards,
Alexander
--
Sent via pgsql-docs mailing list ([email protected])
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-docs
^ permalink raw reply [nested|flat] 86+ messages in thread
* Re: Docbook 5.x
2016-04-20 14:30 Docbook 5.x Jürgen Purtz <[email protected]>
2016-05-03 19:34 ` Re: Docbook 5.x Alvaro Herrera <[email protected]>
2016-05-03 20:13 ` Re: Docbook 5.x Oleg Bartunov <[email protected]>
2016-05-04 00:44 ` Re: Docbook 5.x Peter Eisentraut <[email protected]>
2016-05-05 04:45 ` Re: Docbook 5.x Alexander Law <[email protected]>
2016-06-03 19:31 ` Re: Docbook 5.x Peter Eisentraut <[email protected]>
2016-06-04 14:28 ` Re: Docbook 5.x Alexander Law <[email protected]>
2016-06-06 12:28 ` Re: Docbook 5.x Peter Eisentraut <[email protected]>
2016-08-18 17:56 ` Re: Docbook 5.x Peter Eisentraut <[email protected]>
2016-08-19 13:14 ` Re: Docbook 5.x Alexander Law <[email protected]>
2016-08-22 18:06 ` Re: Docbook 5.x Peter Eisentraut <[email protected]>
2016-08-23 14:23 ` Re: Docbook 5.x Alexander Law <[email protected]>
2016-09-14 11:18 ` Re: Docbook 5.x Alexander Law <[email protected]>
@ 2016-09-14 13:05 ` Jürgen Purtz <[email protected]>
2016-09-14 13:47 ` Re: Docbook 5.x Alexander Law <[email protected]>
2016-09-14 15:30 ` Re: Docbook 5.x Alvaro Herrera <[email protected]>
1 sibling, 2 replies; 86+ messages in thread
From: Jürgen Purtz @ 2016-09-14 13:05 UTC (permalink / raw)
To: pgsql-docs
On 14.09.2016 13:18, Alexander Law wrote:
> Hello, Peter.
>>>> Should we now compare DSSSL outputs with XSLT?
>>>> I had some success with it before. See my letter:
>>>> https://www.postgresql.org/message-id/57712848.7060306%40gmail.com
>>>> Those xslt's (see xhtml-like-dsssl.patch) can help us to see all the
>>>> differences and to decide which customizations to keep.
>>> It looks like the idea there is to whack the XSLT stylesheets until the
>>> output looks exactly like the DSSSL output? I'm not sure that's
>>> terribly useful. It would probably be a lot of work, which we'll just
>>> end up removing eventually. I'd rather just fix any formatting issues
>>> we find and move forward.
>> That work is done already and it's results are countable and
>> observable differences. (See comments in the xslt.)
>> For example, with DSSSL we don't get a chapter TOC when the chapter
>> contains only one sect1 (with XSLT we get the TOC with the one item).
>> We also had subtoc for sect1/refentry and sect1/simplesect, but with
>> XSLT it's absent.
>> So if all such differences are not important, let's move forward.
>>
> Please look at the
> http://oc.postgrespro.ru/index.php/s/ttJyMDLr8Xr1HTu/download
> where I have gathered together all the significant differences, that
> we have between DSSSL and XSLT outputs.
> I have marked red the differences that I would consider as negative.
> Let's decide which ones are acceptable and which we need to eliminate.
>
> Best regards,
> Alexander
>
>
>
Hello Alexander,
great job!
In my opinion most of the differences are not only acceptable but even
better. Here are some addition notes:
For me the following topics are ok: 18, 19, 22, 37.
If possible we shall invest some more effort in solutions for: 1 (up +
home not only in footer but also in header), 8, 11, 20, 30.
Topics 9 and 22 seems to be identical.
Kind regards, Jürgen
--
Sent via pgsql-docs mailing list ([email protected])
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-docs
^ permalink raw reply [nested|flat] 86+ messages in thread
* Re: Docbook 5.x
2016-04-20 14:30 Docbook 5.x Jürgen Purtz <[email protected]>
2016-05-03 19:34 ` Re: Docbook 5.x Alvaro Herrera <[email protected]>
2016-05-03 20:13 ` Re: Docbook 5.x Oleg Bartunov <[email protected]>
2016-05-04 00:44 ` Re: Docbook 5.x Peter Eisentraut <[email protected]>
2016-05-05 04:45 ` Re: Docbook 5.x Alexander Law <[email protected]>
2016-06-03 19:31 ` Re: Docbook 5.x Peter Eisentraut <[email protected]>
2016-06-04 14:28 ` Re: Docbook 5.x Alexander Law <[email protected]>
2016-06-06 12:28 ` Re: Docbook 5.x Peter Eisentraut <[email protected]>
2016-08-18 17:56 ` Re: Docbook 5.x Peter Eisentraut <[email protected]>
2016-08-19 13:14 ` Re: Docbook 5.x Alexander Law <[email protected]>
2016-08-22 18:06 ` Re: Docbook 5.x Peter Eisentraut <[email protected]>
2016-08-23 14:23 ` Re: Docbook 5.x Alexander Law <[email protected]>
2016-09-14 11:18 ` Re: Docbook 5.x Alexander Law <[email protected]>
2016-09-14 13:05 ` Re: Docbook 5.x Jürgen Purtz <[email protected]>
@ 2016-09-14 13:47 ` Alexander Law <[email protected]>
1 sibling, 0 replies; 86+ messages in thread
From: Alexander Law @ 2016-09-14 13:47 UTC (permalink / raw)
To: Jürgen Purtz <[email protected]>; pgsql-docs
Hello Jürgen,
14.09.2016 16:05, Jürgen Purtz wrote:
> For me the following topics are ok: 18, 19, 22, 37.
The problem with 37 is that such flat numbering present only in
refentry. Other sections (sect1, sect2) have independent numbering.
So you can't find "Table 236", but you can find "Table 27.2. Collected
Statistics Views" in monitoring-stats.html, for example. So it's
inconsistent at least.
> If possible we shall invest some more effort in solutions for: 1 (up +
> home not only in footer but also in header), 8, 11, 20, 30.
What is marked "+" in the "XSLT alignment exists" column is already
solved. I mean that I've developed the XSLT templates that eliminate the
indicated differences.
I presented a patch with all the templates before (for 9.5) and adapted
it for the master branch now.
> Topics 9 and 22 seems to be identical.
Yes, that difference required changes in two places and I duplicated the
topic erroneously.
Best regards,
Alexander
--
Sent via pgsql-docs mailing list ([email protected])
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-docs
^ permalink raw reply [nested|flat] 86+ messages in thread
* Re: Docbook 5.x
2016-04-20 14:30 Docbook 5.x Jürgen Purtz <[email protected]>
2016-05-03 19:34 ` Re: Docbook 5.x Alvaro Herrera <[email protected]>
2016-05-03 20:13 ` Re: Docbook 5.x Oleg Bartunov <[email protected]>
2016-05-04 00:44 ` Re: Docbook 5.x Peter Eisentraut <[email protected]>
2016-05-05 04:45 ` Re: Docbook 5.x Alexander Law <[email protected]>
2016-06-03 19:31 ` Re: Docbook 5.x Peter Eisentraut <[email protected]>
2016-06-04 14:28 ` Re: Docbook 5.x Alexander Law <[email protected]>
2016-06-06 12:28 ` Re: Docbook 5.x Peter Eisentraut <[email protected]>
2016-08-18 17:56 ` Re: Docbook 5.x Peter Eisentraut <[email protected]>
2016-08-19 13:14 ` Re: Docbook 5.x Alexander Law <[email protected]>
2016-08-22 18:06 ` Re: Docbook 5.x Peter Eisentraut <[email protected]>
2016-08-23 14:23 ` Re: Docbook 5.x Alexander Law <[email protected]>
2016-09-14 11:18 ` Re: Docbook 5.x Alexander Law <[email protected]>
2016-09-14 13:05 ` Re: Docbook 5.x Jürgen Purtz <[email protected]>
@ 2016-09-14 15:30 ` Alvaro Herrera <[email protected]>
2016-09-14 15:46 ` Re: Docbook 5.x Alexander Law <[email protected]>
2016-10-04 15:45 ` Re: Docbook 5.x Alexander Law <[email protected]>
1 sibling, 2 replies; 86+ messages in thread
From: Alvaro Herrera @ 2016-09-14 15:30 UTC (permalink / raw)
To: Jürgen Purtz <[email protected]>; +Cc: pgsql-docs
Jürgen Purtz wrote:
> Hello Alexander,
>
> great job!
>
> In my opinion most of the differences are not only acceptable but even
> better.
Agreed. But there are a few that merit a fix. There are a few that look
a matter of style (XSL output looks odd), another few are not important.
But I think missing TOC for example is a problem.
1 is a customization we went great lengths to add, so it's a must fix I
think.
I think 12, 14, 15 merit more research too.
What's up with 30?
--
Álvaro Herrera https://www.2ndQuadrant.com/
PostgreSQL Development, 24x7 Support, Remote DBA, Training & Services
--
Sent via pgsql-docs mailing list ([email protected])
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-docs
^ permalink raw reply [nested|flat] 86+ messages in thread
* Re: Docbook 5.x
2016-04-20 14:30 Docbook 5.x Jürgen Purtz <[email protected]>
2016-05-03 19:34 ` Re: Docbook 5.x Alvaro Herrera <[email protected]>
2016-05-03 20:13 ` Re: Docbook 5.x Oleg Bartunov <[email protected]>
2016-05-04 00:44 ` Re: Docbook 5.x Peter Eisentraut <[email protected]>
2016-05-05 04:45 ` Re: Docbook 5.x Alexander Law <[email protected]>
2016-06-03 19:31 ` Re: Docbook 5.x Peter Eisentraut <[email protected]>
2016-06-04 14:28 ` Re: Docbook 5.x Alexander Law <[email protected]>
2016-06-06 12:28 ` Re: Docbook 5.x Peter Eisentraut <[email protected]>
2016-08-18 17:56 ` Re: Docbook 5.x Peter Eisentraut <[email protected]>
2016-08-19 13:14 ` Re: Docbook 5.x Alexander Law <[email protected]>
2016-08-22 18:06 ` Re: Docbook 5.x Peter Eisentraut <[email protected]>
2016-08-23 14:23 ` Re: Docbook 5.x Alexander Law <[email protected]>
2016-09-14 11:18 ` Re: Docbook 5.x Alexander Law <[email protected]>
2016-09-14 13:05 ` Re: Docbook 5.x Jürgen Purtz <[email protected]>
2016-09-14 15:30 ` Re: Docbook 5.x Alvaro Herrera <[email protected]>
@ 2016-09-14 15:46 ` Alexander Law <[email protected]>
2016-09-14 15:52 ` Re: Docbook 5.x Tom Lane <[email protected]>
2016-09-14 16:41 ` Re: Docbook 5.x Alvaro Herrera <[email protected]>
1 sibling, 2 replies; 86+ messages in thread
From: Alexander Law @ 2016-09-14 15:46 UTC (permalink / raw)
To: Alvaro Herrera <[email protected]>; Jürgen Purtz <[email protected]>; +Cc: pgsql-docs
Hello Alvaro,
14.09.2016 18:30, Alvaro Herrera wrote:
> What's up with 30?
ecpg.sgml contains "<remark>The scope of the allocated descriptor is
WHAT?.</remark>", which is printed with XSLT but ignored with DSSSL.
Maybe we can just remove such remarks. I found only two of them, other
one in dml.sgml:
<chapter id="dml">
<title>Data Manipulation</title>
<remark>
This chapter is still quite incomplete.
</remark>
Best regards,
Alexander
--
Sent via pgsql-docs mailing list ([email protected])
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-docs
^ permalink raw reply [nested|flat] 86+ messages in thread
* Re: Docbook 5.x
2016-04-20 14:30 Docbook 5.x Jürgen Purtz <[email protected]>
2016-05-03 19:34 ` Re: Docbook 5.x Alvaro Herrera <[email protected]>
2016-05-03 20:13 ` Re: Docbook 5.x Oleg Bartunov <[email protected]>
2016-05-04 00:44 ` Re: Docbook 5.x Peter Eisentraut <[email protected]>
2016-05-05 04:45 ` Re: Docbook 5.x Alexander Law <[email protected]>
2016-06-03 19:31 ` Re: Docbook 5.x Peter Eisentraut <[email protected]>
2016-06-04 14:28 ` Re: Docbook 5.x Alexander Law <[email protected]>
2016-06-06 12:28 ` Re: Docbook 5.x Peter Eisentraut <[email protected]>
2016-08-18 17:56 ` Re: Docbook 5.x Peter Eisentraut <[email protected]>
2016-08-19 13:14 ` Re: Docbook 5.x Alexander Law <[email protected]>
2016-08-22 18:06 ` Re: Docbook 5.x Peter Eisentraut <[email protected]>
2016-08-23 14:23 ` Re: Docbook 5.x Alexander Law <[email protected]>
2016-09-14 11:18 ` Re: Docbook 5.x Alexander Law <[email protected]>
2016-09-14 13:05 ` Re: Docbook 5.x Jürgen Purtz <[email protected]>
2016-09-14 15:30 ` Re: Docbook 5.x Alvaro Herrera <[email protected]>
2016-09-14 15:46 ` Re: Docbook 5.x Alexander Law <[email protected]>
@ 2016-09-14 15:52 ` Tom Lane <[email protected]>
1 sibling, 0 replies; 86+ messages in thread
From: Tom Lane @ 2016-09-14 15:52 UTC (permalink / raw)
To: Alexander Law <[email protected]>; +Cc: Alvaro Herrera <[email protected]>; Jürgen Purtz <[email protected]>; pgsql-docs
Alexander Law <[email protected]> writes:
> Hello Alvaro,
> 14.09.2016 18:30, Alvaro Herrera wrote:
>> What's up with 30?
> ecpg.sgml contains "<remark>The scope of the allocated descriptor is
> WHAT?.</remark>", which is printed with XSLT but ignored with DSSSL.
> Maybe we can just remove such remarks. I found only two of them, other
> one in dml.sgml:
> <chapter id="dml">
> <title>Data Manipulation</title>
> <remark>
> This chapter is still quite incomplete.
> </remark>
Change them to SGML comments? Although actually the DML one should
be removed, I think it's ancient and obsolete.
regards, tom lane
--
Sent via pgsql-docs mailing list ([email protected])
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-docs
^ permalink raw reply [nested|flat] 86+ messages in thread
* Re: Docbook 5.x
2016-04-20 14:30 Docbook 5.x Jürgen Purtz <[email protected]>
2016-05-03 19:34 ` Re: Docbook 5.x Alvaro Herrera <[email protected]>
2016-05-03 20:13 ` Re: Docbook 5.x Oleg Bartunov <[email protected]>
2016-05-04 00:44 ` Re: Docbook 5.x Peter Eisentraut <[email protected]>
2016-05-05 04:45 ` Re: Docbook 5.x Alexander Law <[email protected]>
2016-06-03 19:31 ` Re: Docbook 5.x Peter Eisentraut <[email protected]>
2016-06-04 14:28 ` Re: Docbook 5.x Alexander Law <[email protected]>
2016-06-06 12:28 ` Re: Docbook 5.x Peter Eisentraut <[email protected]>
2016-08-18 17:56 ` Re: Docbook 5.x Peter Eisentraut <[email protected]>
2016-08-19 13:14 ` Re: Docbook 5.x Alexander Law <[email protected]>
2016-08-22 18:06 ` Re: Docbook 5.x Peter Eisentraut <[email protected]>
2016-08-23 14:23 ` Re: Docbook 5.x Alexander Law <[email protected]>
2016-09-14 11:18 ` Re: Docbook 5.x Alexander Law <[email protected]>
2016-09-14 13:05 ` Re: Docbook 5.x Jürgen Purtz <[email protected]>
2016-09-14 15:30 ` Re: Docbook 5.x Alvaro Herrera <[email protected]>
2016-09-14 15:46 ` Re: Docbook 5.x Alexander Law <[email protected]>
@ 2016-09-14 16:41 ` Alvaro Herrera <[email protected]>
2016-09-14 16:56 ` Re: Docbook 5.x Alexander Law <[email protected]>
1 sibling, 1 reply; 86+ messages in thread
From: Alvaro Herrera @ 2016-09-14 16:41 UTC (permalink / raw)
To: Alexander Law <[email protected]>; +Cc: Jürgen Purtz <[email protected]>; pgsql-docs; Michael Meskes <[email protected]>
Alexander Law wrote:
> 14.09.2016 18:30, Alvaro Herrera wrote:
> >What's up with 30?
>
> ecpg.sgml contains "<remark>The scope of the allocated descriptor is
> WHAT?.</remark>", which is printed with XSLT but ignored with DSSSL.
>
> Maybe we can just remove such remarks.
I added Michael on CC. Maybe he can clarify what the scope of the
descriptor is, so that we can add some proper sentence, and remove the
<remark> tag.
It's strange that the xslt prints the <remark> text, when the historical
behavior was to ignore it. Maybe OASIS changed their mind as to what it
meant.
--
Álvaro Herrera https://www.2ndQuadrant.com/
PostgreSQL Development, 24x7 Support, Remote DBA, Training & Services
--
Sent via pgsql-docs mailing list ([email protected])
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-docs
^ permalink raw reply [nested|flat] 86+ messages in thread
* Re: Docbook 5.x
2016-04-20 14:30 Docbook 5.x Jürgen Purtz <[email protected]>
2016-05-03 19:34 ` Re: Docbook 5.x Alvaro Herrera <[email protected]>
2016-05-03 20:13 ` Re: Docbook 5.x Oleg Bartunov <[email protected]>
2016-05-04 00:44 ` Re: Docbook 5.x Peter Eisentraut <[email protected]>
2016-05-05 04:45 ` Re: Docbook 5.x Alexander Law <[email protected]>
2016-06-03 19:31 ` Re: Docbook 5.x Peter Eisentraut <[email protected]>
2016-06-04 14:28 ` Re: Docbook 5.x Alexander Law <[email protected]>
2016-06-06 12:28 ` Re: Docbook 5.x Peter Eisentraut <[email protected]>
2016-08-18 17:56 ` Re: Docbook 5.x Peter Eisentraut <[email protected]>
2016-08-19 13:14 ` Re: Docbook 5.x Alexander Law <[email protected]>
2016-08-22 18:06 ` Re: Docbook 5.x Peter Eisentraut <[email protected]>
2016-08-23 14:23 ` Re: Docbook 5.x Alexander Law <[email protected]>
2016-09-14 11:18 ` Re: Docbook 5.x Alexander Law <[email protected]>
2016-09-14 13:05 ` Re: Docbook 5.x Jürgen Purtz <[email protected]>
2016-09-14 15:30 ` Re: Docbook 5.x Alvaro Herrera <[email protected]>
2016-09-14 15:46 ` Re: Docbook 5.x Alexander Law <[email protected]>
2016-09-14 16:41 ` Re: Docbook 5.x Alvaro Herrera <[email protected]>
@ 2016-09-14 16:56 ` Alexander Law <[email protected]>
0 siblings, 0 replies; 86+ messages in thread
From: Alexander Law @ 2016-09-14 16:56 UTC (permalink / raw)
To: Alvaro Herrera <[email protected]>; +Cc: Jürgen Purtz <[email protected]>; pgsql-docs; Michael Meskes <[email protected]>
14.09.2016 19:41, Alvaro Herrera wrote:
> Alexander Law wrote:
>
>> 14.09.2016 18:30, Alvaro Herrera wrote:
>>> What's up with 30?
>> ecpg.sgml contains "<remark>The scope of the allocated descriptor is
>> WHAT?.</remark>", which is printed with XSLT but ignored with DSSSL.
>>
>> Maybe we can just remove such remarks.
> I added Michael on CC. Maybe he can clarify what the scope of the
> descriptor is, so that we can add some proper sentence, and remove the
> <remark> tag.
>
>
> It's strange that the xslt prints the <remark> text, when the historical
> behavior was to ignore it. Maybe OASIS changed their mind as to what it
> meant.
>
In fact it's controlled by show.comments variable in XSLT, which is
defined in doc/src/sgml/stylesheet-common.xsl as:
<xsl:param name="show.comments">
<xsl:choose>
<xsl:when test="contains($pg.version, 'devel')">1</xsl:when>
<xsl:otherwise>0</xsl:otherwise>
</xsl:choose>
</xsl:param>
And it's just inconsistent with the DSSSL definition ((define
%show-comments% draft-mode)). So we can just ignore the
difference. Though question that is still open since 2003 could be
answered at the end of the day.
--
Sent via pgsql-docs mailing list ([email protected])
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-docs
^ permalink raw reply [nested|flat] 86+ messages in thread
* Re: Docbook 5.x
2016-04-20 14:30 Docbook 5.x Jürgen Purtz <[email protected]>
2016-05-03 19:34 ` Re: Docbook 5.x Alvaro Herrera <[email protected]>
2016-05-03 20:13 ` Re: Docbook 5.x Oleg Bartunov <[email protected]>
2016-05-04 00:44 ` Re: Docbook 5.x Peter Eisentraut <[email protected]>
2016-05-05 04:45 ` Re: Docbook 5.x Alexander Law <[email protected]>
2016-06-03 19:31 ` Re: Docbook 5.x Peter Eisentraut <[email protected]>
2016-06-04 14:28 ` Re: Docbook 5.x Alexander Law <[email protected]>
2016-06-06 12:28 ` Re: Docbook 5.x Peter Eisentraut <[email protected]>
2016-08-18 17:56 ` Re: Docbook 5.x Peter Eisentraut <[email protected]>
2016-08-19 13:14 ` Re: Docbook 5.x Alexander Law <[email protected]>
2016-08-22 18:06 ` Re: Docbook 5.x Peter Eisentraut <[email protected]>
2016-08-23 14:23 ` Re: Docbook 5.x Alexander Law <[email protected]>
2016-09-14 11:18 ` Re: Docbook 5.x Alexander Law <[email protected]>
2016-09-14 13:05 ` Re: Docbook 5.x Jürgen Purtz <[email protected]>
2016-09-14 15:30 ` Re: Docbook 5.x Alvaro Herrera <[email protected]>
@ 2016-10-04 15:45 ` Alexander Law <[email protected]>
2016-10-19 09:11 ` Re: Docbook 5.x Jürgen Purtz <[email protected]>
1 sibling, 1 reply; 86+ messages in thread
From: Alexander Law @ 2016-10-04 15:45 UTC (permalink / raw)
To: pgsql-docs; +Cc: Alvaro Herrera <[email protected]>; Jürgen Purtz <[email protected]>; Peter Eisentraut <[email protected]>
Hello,
I've modified XSL's to eliminate most undesired differences between
`make html` and `make xslthtml` outputs. The patch attached.
See http://oc.postgrespro.ru/index.php/s/Gj2PGZ9IHUbDC5t/download
(eliminated differences marked cyan).
What should we do next to finish with the "Port all DSSSL customizations
to XSLT" item in our plan?
Best regards,
Alexander
14.09.2016 18:30, Alvaro Herrera wrote:
> I think 12, 14, 15 merit more research too.
>
> What's up with 30?
>
--
Sent via pgsql-docs mailing list ([email protected])
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-docs
Attachments:
[text/x-patch] xsl-like-dsssl.patch (38.3K, 2-xsl-like-dsssl.patch)
download | inline diff:
diff --git a/doc/src/sgml/stylesheet-xhtml-dsssl-like-imports.xsl b/doc/src/sgml/stylesheet-xhtml-dsssl-like-imports.xsl
new file mode 100644
index 0000000..170a21c
--- /dev/null
+++ b/doc/src/sgml/stylesheet-xhtml-dsssl-like-imports.xsl
@@ -0,0 +1,163 @@
+<?xml version="1.0" encoding="ASCII"?>
+<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xmlns="http://www.w3.org/1999/xhtml" version="1.0">
+
+<!-- ==================================================================== -->
+<!-- from component.xsl -->
+<!-- No chapter toc when there is only one sect1
+xplang.html:
+ Chapter 39. Procedural Languages
+ Table of Contents
+ [9]39.1. Installing Procedural Languages
+->
+ Chapter 39. Procedural Languages
+-->
+<xsl:template match="chapter">
+ <xsl:call-template name="id.warning"/>
+
+ <xsl:element name="{$div.element}" namespace="http://www.w3.org/1999/xhtml">
+ <xsl:call-template name="common.html.attributes">
+ <xsl:with-param name="inherit" select="1"/>
+ </xsl:call-template>
+ <xsl:call-template name="id.attribute">
+ <xsl:with-param name="conditional" select="0"/>
+ </xsl:call-template>
+
+ <xsl:call-template name="component.separator"/>
+ <xsl:call-template name="chapter.titlepage"/>
+
+ <xsl:variable name="toc.params">
+ <xsl:call-template name="find.path.params">
+ <xsl:with-param name="table" select="normalize-space($generate.toc)"/>
+ </xsl:call-template>
+ </xsl:variable>
+ <xsl:if test="contains($toc.params, 'toc') and count(sect1) > 1">
+ <xsl:call-template name="component.toc">
+ <xsl:with-param name="toc.title.p" select="contains($toc.params, 'title')"/>
+ </xsl:call-template>
+ <xsl:call-template name="component.toc.separator"/>
+ </xsl:if>
+ <xsl:apply-templates/>
+ <xsl:call-template name="process.footnotes"/>
+ </xsl:element>
+</xsl:template>
+
+<!-- ==================================================================== -->
+<!-- from sections.xsl -->
+<!--
+spi-memory.html:
+ 44.3. Memory Management
+->
+ 44.3. Memory Management
+ Table of Contents
+ SPI_palloc — allocate memory in the upper executor context
+ SPI_repalloc — reallocate memory in the upper executor context
+-->
+<xsl:template match="sect1">
+ <xsl:call-template name="id.warning"/>
+
+ <xsl:element name="{$div.element}" namespace="http://www.w3.org/1999/xhtml">
+ <xsl:call-template name="common.html.attributes">
+ <xsl:with-param name="inherit" select="1"/>
+ </xsl:call-template>
+ <xsl:call-template name="id.attribute">
+ <xsl:with-param name="conditional" select="0"/>
+ </xsl:call-template>
+
+ <xsl:choose>
+ <xsl:when test="@renderas = 'sect2'">
+ <xsl:call-template name="sect2.titlepage"/>
+ </xsl:when>
+ <xsl:when test="@renderas = 'sect3'">
+ <xsl:call-template name="sect3.titlepage"/>
+ </xsl:when>
+ <xsl:when test="@renderas = 'sect4'">
+ <xsl:call-template name="sect4.titlepage"/>
+ </xsl:when>
+ <xsl:when test="@renderas = 'sect5'">
+ <xsl:call-template name="sect5.titlepage"/>
+ </xsl:when>
+ <xsl:otherwise>
+ <xsl:call-template name="sect1.titlepage"/>
+ </xsl:otherwise>
+ </xsl:choose>
+
+ <xsl:variable name="toc.params">
+ <xsl:call-template name="find.path.params">
+ <xsl:with-param name="table" select="normalize-space($generate.toc)"/>
+ </xsl:call-template>
+ </xsl:variable>
+
+ <xsl:if test="contains($toc.params, 'toc') and ($generate.section.toc.level >= 1 or count(refentry) > 0)">
+ <xsl:call-template name="section.toc">
+ <xsl:with-param name="toc.title.p" select="contains($toc.params, 'title')"/>
+ </xsl:call-template>
+ <xsl:call-template name="section.toc.separator"/>
+ </xsl:if>
+ <xsl:apply-templates/>
+ <xsl:call-template name="process.chunk.footnotes"/>
+ </xsl:element>
+</xsl:template>
+
+<!-- ==================================================================== -->
+<!-- from xhtml/component.xsl -->
+<!--
+sourcerepo.html:
+
+Appendix I. The Source Code Repository
+ Table of Contents
+ [9]I.1. Getting The Source via Git
+->
+Appendix I. The Source Code Repository
+-->
+<xsl:template match="appendix">
+ <xsl:variable name="ischunk">
+ <xsl:call-template name="chunk"/>
+ </xsl:variable>
+
+ <xsl:call-template name="id.warning"/>
+
+ <xsl:element name="{$div.element}" namespace="http://www.w3.org/1999/xhtml">
+ <xsl:call-template name="common.html.attributes">
+ <xsl:with-param name="inherit" select="1"/>
+ </xsl:call-template>
+ <xsl:call-template name="id.attribute">
+ <xsl:with-param name="conditional" select="0"/>
+ </xsl:call-template>
+
+ <xsl:choose>
+ <xsl:when test="parent::article and $ischunk = 0">
+ <xsl:call-template name="section.heading">
+ <xsl:with-param name="level" select="1"/>
+ <xsl:with-param name="title">
+ <xsl:apply-templates select="." mode="object.title.markup"/>
+ </xsl:with-param>
+ </xsl:call-template>
+ </xsl:when>
+ <xsl:otherwise>
+ <xsl:call-template name="component.separator"/>
+ <xsl:call-template name="appendix.titlepage"/>
+ </xsl:otherwise>
+ </xsl:choose>
+
+ <xsl:variable name="toc.params">
+ <xsl:call-template name="find.path.params">
+ <xsl:with-param name="table" select="normalize-space($generate.toc)"/>
+ </xsl:call-template>
+ </xsl:variable>
+
+ <xsl:if test="contains($toc.params, 'toc') and count(sect1) > 1">
+ <xsl:call-template name="component.toc">
+ <xsl:with-param name="toc.title.p" select="contains($toc.params, 'title')"/>
+ </xsl:call-template>
+ <xsl:call-template name="component.toc.separator"/>
+ </xsl:if>
+
+ <xsl:apply-templates/>
+
+ <xsl:if test="not(parent::article) or $ischunk != 0">
+ <xsl:call-template name="process.footnotes"/>
+ </xsl:if>
+ </xsl:element>
+</xsl:template>
+
+</xsl:stylesheet>
diff --git a/doc/src/sgml/stylesheet-xhtml-dsssl-like.xsl b/doc/src/sgml/stylesheet-xhtml-dsssl-like.xsl
new file mode 100644
index 0000000..b893e9f
--- /dev/null
+++ b/doc/src/sgml/stylesheet-xhtml-dsssl-like.xsl
@@ -0,0 +1,756 @@
+<?xml version="1.0" encoding="utf-8"?>
+<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
+ xmlns:l="http://docbook.sourceforge.net/xmlns/l10n/1.0"
+ version="1.0"
+ xmlns="http://www.w3.org/1999/xhtml"
+ exclude-result-prefixes="#default">
+<xsl:import href="stylesheet-xhtml-dsssl-like-imports.xsl" />
+
+<!-- ==================================================================== -->
+<!-- from xhtml/chunk-common.xsl -->
+<!-- align header with dsssl -->
+<xsl:template name="header.navigation">
+ <xsl:param name="prev" select="/foo"/>
+ <xsl:param name="next" select="/foo"/>
+ <xsl:param name="nav.context"/>
+
+ <xsl:variable name="home" select="/*[1]"/>
+ <xsl:variable name="up" select="parent::*"/>
+
+ <xsl:variable name="row1" select="$navig.showtitles != 0"/>
+ <xsl:variable name="row2" select="count($prev) > 0 or (count($up) > 0 and generate-id($up) != generate-id($home) and $navig.showtitles != 0) or count($next) > 0"/>
+
+ <xsl:if test="$suppress.navigation = '0' and $suppress.header.navigation = '0' and not(self::book)">
+ <div class="navheader">
+ <xsl:if test="$row1 or $row2">
+ <table width="100%" summary="Navigation header">
+ <xsl:if test="$row1">
+ <tr>
+ <th colspan="4" align="center">
+ <a>
+ <xsl:attribute name="href">
+ <xsl:call-template name="href.target">
+ <xsl:with-param name="object" select="$home"/>
+ </xsl:call-template>
+ </xsl:attribute>
+ <xsl:apply-templates select="$home" mode="object.title.markup.textonly"/>
+ </a>
+ </th>
+ </tr>
+ </xsl:if>
+
+ <xsl:if test="$row2">
+ <tr>
+ <td width="10%" align="{$direction.align.start}">
+ <xsl:if test="count($prev)>0">
+ <a accesskey="p">
+ <xsl:attribute name="href">
+ <xsl:call-template name="href.target">
+ <xsl:with-param name="object" select="$prev"/>
+ </xsl:call-template>
+ </xsl:attribute>
+ <xsl:call-template name="navig.content">
+ <xsl:with-param name="direction" select="'prev'"/>
+ </xsl:call-template>
+ </a>
+ </xsl:if>
+ <xsl:text> </xsl:text>
+ </td>
+ <td width="10%" align="center">
+ <xsl:choose>
+ <xsl:when test="count($up)>0 and generate-id($up) != generate-id($home)">
+ <a accesskey="u">
+ <xsl:attribute name="href">
+ <xsl:call-template name="href.target">
+ <xsl:with-param name="object" select="$up"/>
+ </xsl:call-template>
+ </xsl:attribute>
+ <xsl:call-template name="navig.content">
+ <xsl:with-param name="direction" select="'up'"/>
+ </xsl:call-template>
+ </a>
+ </xsl:when>
+ <xsl:otherwise>
+ <a accesskey="h">
+ <xsl:attribute name="href">
+ <xsl:call-template name="href.target">
+ <xsl:with-param name="object" select="$home"/>
+ </xsl:call-template>
+ </xsl:attribute>
+ <xsl:call-template name="navig.content">
+ <xsl:with-param name="direction" select="'home'"/>
+ </xsl:call-template>
+ </a>
+<!--   -->
+ </xsl:otherwise>
+ </xsl:choose>
+ </td>
+ <th width="60%" align="center">
+ <xsl:choose>
+ <xsl:when test="count($up) > 0 and local-name($up) != 'part' and local-name($up) != 'sect1' and local-name($up) != 'reference' and generate-id($up) != generate-id($home) and $navig.showtitles != 0">
+ <xsl:apply-templates select="$up" mode="object.title.markup"/>
+ </xsl:when>
+ <xsl:otherwise> </xsl:otherwise>
+ </xsl:choose>
+ </th>
+ <td width="20%" align="{$direction.align.end}">
+ <xsl:text> </xsl:text>
+ <xsl:if test="count($next)>0">
+ <a accesskey="n">
+ <xsl:attribute name="href">
+ <xsl:call-template name="href.target">
+ <xsl:with-param name="object" select="$next"/>
+ </xsl:call-template>
+ </xsl:attribute>
+ <xsl:call-template name="navig.content">
+ <xsl:with-param name="direction" select="'next'"/>
+ </xsl:call-template>
+ </a>
+ </xsl:if>
+ </td>
+ </tr>
+ </xsl:if>
+ </table>
+ </xsl:if>
+ <xsl:if test="$header.rule != 0">
+ <hr/>
+ </xsl:if>
+ </div>
+ </xsl:if>
+</xsl:template>
+
+<!-- ==================================================================== -->
+<!-- from xhtml/chunk-common.xsl -->
+<!-- align footer with dsssl -->
+<xsl:template name="footer.navigation">
+ <xsl:param name="prev" select="/foo"/>
+ <xsl:param name="next" select="/foo"/>
+ <xsl:param name="nav.context"/>
+
+ <xsl:variable name="home" select="/*[1]"/>
+ <xsl:variable name="up" select="parent::*"/>
+
+ <xsl:variable name="row1" select="count($prev) > 0 or count($up) > 0 or count($next) > 0"/>
+
+ <xsl:variable name="row2" select="($prev and $navig.showtitles != 0) or (generate-id($home) != generate-id(.) or $nav.context = 'toc') or ($chunk.tocs.and.lots != 0 and $nav.context != 'toc') or ($next and $navig.showtitles != 0)"/>
+
+ <xsl:if test="$suppress.navigation = '0' and $suppress.footer.navigation = '0'">
+ <div class="navfooter">
+ <xsl:if test="$footer.rule != 0">
+ <hr/>
+ </xsl:if>
+
+ <xsl:if test="$row1 or $row2">
+ <table width="100%" summary="Navigation footer">
+ <xsl:if test="$row1">
+ <tr>
+ <td width="40%" align="{$direction.align.start}">
+ <xsl:if test="count($prev)>0">
+ <a accesskey="p">
+ <xsl:attribute name="href">
+ <xsl:call-template name="href.target">
+ <xsl:with-param name="object" select="$prev"/>
+ </xsl:call-template>
+ </xsl:attribute>
+ <xsl:call-template name="navig.content">
+ <xsl:with-param name="direction" select="'prev'"/>
+ </xsl:call-template>
+ </a>
+ </xsl:if>
+ <xsl:text> </xsl:text>
+ </td>
+ <td width="20%" align="center">
+ <xsl:choose>
+ <xsl:when test="$home != . or $nav.context = 'toc'">
+ <a accesskey="h">
+ <xsl:attribute name="href">
+ <xsl:call-template name="href.target">
+ <xsl:with-param name="object" select="$home"/>
+ </xsl:call-template>
+ </xsl:attribute>
+ <xsl:call-template name="navig.content">
+ <xsl:with-param name="direction" select="'home'"/>
+ </xsl:call-template>
+ </a>
+ <xsl:if test="$chunk.tocs.and.lots != 0 and $nav.context != 'toc'">
+ <xsl:text> | </xsl:text>
+ </xsl:if>
+ </xsl:when>
+ <xsl:otherwise> </xsl:otherwise>
+ </xsl:choose>
+
+ <xsl:if test="$chunk.tocs.and.lots != 0 and $nav.context != 'toc'">
+ <a accesskey="t">
+ <xsl:attribute name="href">
+ <xsl:value-of select="$chunked.filename.prefix"/>
+ <xsl:apply-templates select="/*[1]" mode="recursive-chunk-filename">
+ <xsl:with-param name="recursive" select="true()"/>
+ </xsl:apply-templates>
+ <xsl:text>-toc</xsl:text>
+ <xsl:value-of select="$html.ext"/>
+ </xsl:attribute>
+ <xsl:call-template name="gentext">
+ <xsl:with-param name="key" select="'nav-toc'"/>
+ </xsl:call-template>
+ </a>
+ </xsl:if>
+ </td>
+ <td width="40%" align="{$direction.align.end}">
+ <xsl:text> </xsl:text>
+ <xsl:if test="count($next)>0">
+ <a accesskey="n">
+ <xsl:attribute name="href">
+ <xsl:call-template name="href.target">
+ <xsl:with-param name="object" select="$next"/>
+ </xsl:call-template>
+ </xsl:attribute>
+ <xsl:call-template name="navig.content">
+ <xsl:with-param name="direction" select="'next'"/>
+ </xsl:call-template>
+ </a>
+ </xsl:if>
+ </td>
+ </tr>
+ </xsl:if>
+
+ <xsl:if test="$row2">
+ <tr>
+ <td width="40%" align="{$direction.align.start}" valign="top">
+ <xsl:if test="$navig.showtitles != 0">
+ <xsl:apply-templates select="$prev" mode="object.title.markup.textonly"/>
+ </xsl:if>
+ <xsl:text> </xsl:text>
+ </td>
+ <td width="20%" align="center">
+ <xsl:choose>
+ <xsl:when test="count($up)>0 and generate-id($up) != generate-id($home)">
+ <a accesskey="u">
+ <xsl:attribute name="href">
+ <xsl:call-template name="href.target">
+ <xsl:with-param name="object" select="$up"/>
+ </xsl:call-template>
+ </xsl:attribute>
+ <xsl:call-template name="navig.content">
+ <xsl:with-param name="direction" select="'up'"/>
+ </xsl:call-template>
+ </a>
+ </xsl:when>
+ <xsl:otherwise> </xsl:otherwise>
+ </xsl:choose>
+ </td>
+ <td width="40%" align="{$direction.align.end}" valign="top">
+ <xsl:text> </xsl:text>
+ <xsl:if test="$navig.showtitles != 0">
+ <xsl:apply-templates select="$next" mode="object.title.markup.textonly"/>
+ </xsl:if>
+ </td>
+ </tr>
+ </xsl:if>
+ </table>
+ </xsl:if>
+ </div>
+ </xsl:if>
+</xsl:template>
+
+<!-- ==================================================================== -->
+<!-- from xhtml/chunk-common.xsl -->
+<!-- Modify html.head -->
+<xsl:template name="html.head">
+ <xsl:param name="prev" select="/foo"/>
+ <xsl:param name="next" select="/foo"/>
+ <xsl:variable name="this" select="."/>
+ <xsl:variable name="home" select="/*[1]"/>
+ <xsl:variable name="up" select="parent::*"/>
+
+ <head>
+ <xsl:call-template name="system.head.content"/>
+ <xsl:call-template name="head.content"/>
+
+ <!-- home link not valid in HTML5 -->
+ <xsl:if test="$home and $div.element != 'section' and not(self::book)">
+ <link rel="home">
+ <xsl:attribute name="href">
+ <xsl:call-template name="href.target">
+ <xsl:with-param name="object" select="$home"/>
+ </xsl:call-template>
+ </xsl:attribute>
+ <xsl:attribute name="title">
+ <xsl:apply-templates select="$home" mode="object.title.markup.textonly"/>
+ </xsl:attribute>
+ </link>
+ </xsl:if>
+
+ <!-- up link not valid in HTML5 -->
+ <xsl:if test="$up and $div.element != 'section' and generate-id($up) != generate-id($home)"> <!-- LAW -->
+ <link rel="up">
+ <xsl:attribute name="href">
+ <xsl:call-template name="href.target">
+ <xsl:with-param name="object" select="$up"/>
+ </xsl:call-template>
+ </xsl:attribute>
+ <xsl:attribute name="title">
+ <xsl:apply-templates select="$up" mode="object.title.markup.textonly"/>
+ </xsl:attribute>
+ </link>
+ </xsl:if>
+
+ <xsl:if test="$prev">
+ <link rel="prev">
+ <xsl:attribute name="href">
+ <xsl:call-template name="href.target">
+ <xsl:with-param name="object" select="$prev"/>
+ </xsl:call-template>
+ </xsl:attribute>
+ <xsl:attribute name="title">
+ <xsl:apply-templates select="$prev" mode="object.title.markup.textonly"/>
+ </xsl:attribute>
+ </link>
+ </xsl:if>
+
+ <xsl:if test="$next">
+ <link rel="next">
+ <xsl:attribute name="href">
+ <xsl:call-template name="href.target">
+ <xsl:with-param name="object" select="$next"/>
+ </xsl:call-template>
+ </xsl:attribute>
+ <xsl:attribute name="title">
+ <xsl:apply-templates select="$next" mode="object.title.markup.textonly"/>
+ </xsl:attribute>
+ </link>
+ </xsl:if>
+
+ <xsl:if test="$html.extra.head.links != 0">
+ <xsl:for-each select="//part |//reference |//preface |//chapter |//article |//refentry |//appendix[not(parent::article)]|appendix |//glossary[not(parent::article)]|glossary |//index[not(parent::article)]|index">
+ <link rel="{local-name(.)}">
+ <xsl:attribute name="href">
+ <xsl:call-template name="href.target">
+ <xsl:with-param name="context" select="$this"/>
+ <xsl:with-param name="object" select="."/>
+ </xsl:call-template>
+ </xsl:attribute>
+ <xsl:attribute name="title">
+ <xsl:apply-templates select="." mode="object.title.markup.textonly"/>
+ </xsl:attribute>
+ </link>
+ </xsl:for-each>
+
+ <xsl:for-each select="section|sect1|refsection|refsect1">
+ <link>
+ <xsl:attribute name="rel">
+ <xsl:choose>
+ <xsl:when test="local-name($this) = 'section' or local-name($this) = 'refsection'">
+ <xsl:value-of select="'subsection'"/>
+ </xsl:when>
+ <xsl:otherwise>
+ <xsl:value-of select="'section'"/>
+ </xsl:otherwise>
+ </xsl:choose>
+ </xsl:attribute>
+ <xsl:attribute name="href">
+ <xsl:call-template name="href.target">
+ <xsl:with-param name="context" select="$this"/>
+ <xsl:with-param name="object" select="."/>
+ </xsl:call-template>
+ </xsl:attribute>
+ <xsl:attribute name="title">
+ <xsl:apply-templates select="." mode="object.title.markup.textonly"/>
+ </xsl:attribute>
+ </link>
+ </xsl:for-each>
+
+ <xsl:for-each select="sect2|sect3|sect4|sect5|refsect2|refsect3">
+ <link rel="subsection">
+ <xsl:attribute name="href">
+ <xsl:call-template name="href.target">
+ <xsl:with-param name="context" select="$this"/>
+ <xsl:with-param name="object" select="."/>
+ </xsl:call-template>
+ </xsl:attribute>
+ <xsl:attribute name="title">
+ <xsl:apply-templates select="." mode="object.title.markup.textonly"/>
+ </xsl:attribute>
+ </link>
+ </xsl:for-each>
+ </xsl:if>
+
+ <!-- * if we have a legalnotice and user wants it output as a -->
+ <!-- * separate page and $html.head.legalnotice.link.types is -->
+ <!-- * non-empty, we generate a link or links for each value in -->
+ <!-- * $html.head.legalnotice.link.types -->
+<!-- <xsl:if test="//legalnotice and not($generate.legalnotice.link = 0) and not($html.head.legalnotice.link.types = '')">
+ <xsl:call-template name="make.legalnotice.head.links"/>
+ </xsl:if> -->
+
+ <xsl:call-template name="user.head.content"/>
+ </head>
+</xsl:template>
+
+<!-- ==================================================================== -->
+<!-- from xhtml/chunk-code.xsl (see stylesheet-xhtml-dsssl-like-imports.xsl) -->
+<xsl:template match="chapter|sect1|appendix">
+ <xsl:choose>
+ <xsl:when test="$onechunk != 0 and parent::*">
+ <xsl:apply-imports/>
+ </xsl:when>
+ <xsl:otherwise>
+ <xsl:call-template name="process-chunk-element"/>
+ </xsl:otherwise>
+ </xsl:choose>
+</xsl:template>
+
+<!-- ==================================================================== -->
+<!-- from xhtml/block.xsl -->
+<!--
+auth-pg-hba-conf.htm:
+ Users sometimes wonder why host names are handled in this
+ seemingly complicated way, with two name resolutions including a
+ reverse lookup of the client's IP address. This complicates use
+->
+ Users sometimes wonder why host names are handled in this seemingly
+ complicated way, with two name resolutions including a reverse lookup
+ of the client's IP address. This complicates use of the feature in case
+
+-->
+<xsl:template match="sidebar">
+ <table cellpadding="5" border="1">
+ <xsl:call-template name="common.html.attributes"/>
+ <tr><td>
+ <div>
+ <xsl:call-template name="common.html.attributes"/>
+ <xsl:call-template name="id.attribute"/>
+ <xsl:call-template name="anchor"/>
+ <xsl:call-template name="sidebar.titlepage"/>
+ <xsl:apply-templates/>
+ </div>
+ </td></tr></table>
+</xsl:template>
+
+<!-- ==================================================================== -->
+<!-- from xhtml/autotoc.xsl -->
+<!-- Change subtoc output condition
+contrib.html:
+ F.1. adminpack
+ F.1.1. Functions Implemented
+ F.2. auth_delay
+ F.2.1. Configuration Parameters
+ F.2.2. Author
+ F.3. auto_explain
+->
+ F.1. adminpack
+ F.2. auth_delay
+ F.3. auto_explain
+
+-->
+<xsl:template name="subtoc">
+ <xsl:param name="toc-context" select="."/>
+ <xsl:param name="nodes" select="NOT-AN-ELEMENT"/>
+
+ <xsl:variable name="nodes.plus" select="$nodes | qandaset"/>
+
+ <xsl:variable name="subtoc">
+ <xsl:element name="{$toc.list.type}" namespace="http://www.w3.org/1999/xhtml">
+ <xsl:choose>
+ <xsl:when test="$qanda.in.toc != 0">
+ <xsl:apply-templates mode="toc" select="$nodes.plus">
+ <xsl:with-param name="toc-context" select="$toc-context"/>
+ </xsl:apply-templates>
+ </xsl:when>
+ <xsl:otherwise>
+ <xsl:apply-templates mode="toc" select="$nodes">
+ <xsl:with-param name="toc-context" select="$toc-context"/>
+ </xsl:apply-templates>
+ </xsl:otherwise>
+ </xsl:choose>
+ </xsl:element>
+ </xsl:variable>
+
+ <xsl:variable name="depth">
+ <xsl:choose>
+ <xsl:when test="local-name(.) = 'section'">
+ <xsl:value-of select="count(ancestor::section) + 1"/>
+ </xsl:when>
+ <xsl:when test="local-name(.) = 'sect1'">1</xsl:when>
+ <xsl:when test="local-name(.) = 'sect2'">2</xsl:when>
+ <xsl:when test="local-name(.) = 'sect3'">3</xsl:when>
+ <xsl:when test="local-name(.) = 'sect4'">4</xsl:when>
+ <xsl:when test="local-name(.) = 'sect5'">5</xsl:when>
+ <xsl:when test="local-name(.) = 'refsect1'">1</xsl:when>
+ <xsl:when test="local-name(.) = 'refsect2'">2</xsl:when>
+ <xsl:when test="local-name(.) = 'refsect3'">3</xsl:when>
+ <xsl:when test="local-name(.) = 'topic'">1</xsl:when>
+ <xsl:when test="local-name(.) = 'simplesect'">
+ <!-- sigh... -->
+ <xsl:choose>
+ <xsl:when test="local-name(..) = 'section'">
+ <xsl:value-of select="count(ancestor::section)"/>
+ </xsl:when>
+ <xsl:when test="local-name(..) = 'sect1'">2</xsl:when>
+ <xsl:when test="local-name(..) = 'sect2'">3</xsl:when>
+ <xsl:when test="local-name(..) = 'sect3'">4</xsl:when>
+ <xsl:when test="local-name(..) = 'sect4'">5</xsl:when>
+ <xsl:when test="local-name(..) = 'sect5'">6</xsl:when>
+ <xsl:when test="local-name(..) = 'topic'">2</xsl:when>
+ <xsl:when test="local-name(..) = 'refsect1'">2</xsl:when>
+ <xsl:when test="local-name(..) = 'refsect2'">3</xsl:when>
+ <xsl:when test="local-name(..) = 'refsect3'">4</xsl:when>
+ <xsl:otherwise>1</xsl:otherwise>
+ </xsl:choose>
+ </xsl:when>
+ <xsl:otherwise>0</xsl:otherwise>
+ </xsl:choose>
+ </xsl:variable>
+
+ <xsl:variable name="depth.from.context" select="count(ancestor::*)-count($toc-context/ancestor::*)"/>
+
+ <xsl:variable name="subtoc.list">
+ <xsl:choose>
+ <xsl:when test="$toc.dd.type = ''">
+ <xsl:copy-of select="$subtoc"/>
+ </xsl:when>
+ <xsl:otherwise>
+ <xsl:element name="{$toc.dd.type}" namespace="http://www.w3.org/1999/xhtml">
+ <xsl:copy-of select="$subtoc"/>
+ </xsl:element>
+ </xsl:otherwise>
+ </xsl:choose>
+ </xsl:variable>
+ <xsl:variable name="output.subtoc"><xsl:value-of select="
+ ( (self::set or self::book or self::part) or
+ ($toc.section.depth > $depth and local-name($toc-context)!='appendix' and local-name($toc-context)!='preface') ) and
+ ( ($qanda.in.toc = 0 and (count($nodes)>1 or (count($nodes)>0 and ($toc.section.depth - 1 > $depth)) )) or
+ ($qanda.in.toc != 0 and (count($nodes.plus)>1 or (count($nodes)>0 and $toc.section.depth - 1 > $depth) ))) and
+ $toc.max.depth > $depth.from.context
+ "/></xsl:variable>
+ <xsl:element name="{$toc.listitem.type}" namespace="http://www.w3.org/1999/xhtml">
+ <xsl:call-template name="toc.line">
+ <xsl:with-param name="toc-context" select="$toc-context"/>
+ </xsl:call-template>
+ <xsl:if test="$toc.listitem.type = 'li' and $output.subtoc = 'true'">
+ <xsl:copy-of select="$subtoc.list"/>
+ </xsl:if>
+ </xsl:element>
+ <xsl:if test="$toc.listitem.type != 'li' and $output.subtoc = 'true'">
+ <xsl:copy-of select="$subtoc.list"/>
+ </xsl:if>
+</xsl:template>
+
+<!-- ==================================================================== -->
+<!-- from common/gentext.xsl -->
+<!-- error-style-guide.html:
+What Goes Where
+->
+51.3.1. What Goes Where
+-->
+<xsl:template match="simplesect"
+ mode="object.title.template">
+<xsl:text>%n. %t</xsl:text>
+</xsl:template>
+
+<!-- ==================================================================== -->
+<!-- based on xhtml/component.xsl: <xsl:template match="topic/title|topic/info/title" mode="titlepage.mode" priority="2"> -->
+<!-- sql-commands.html:
+SQL Commands
+->
+I. SQL Commands
+-->
+<xsl:template match="reference/title" mode="titlepage.mode" priority="2">
+ <xsl:call-template name="component.title">
+ <xsl:with-param name="node" select="ancestor::reference[1]"/>
+ </xsl:call-template>
+</xsl:template>
+
+<xsl:template match="reference"
+ mode="object.title.template">
+<xsl:text>%n. %t</xsl:text>
+</xsl:template>
+
+<!-- ==================================================================== -->
+<!-- Custom function for chunk numbering -->
+<xsl:template name="footnote.in.chunk.number">
+ <xsl:param name="node" select="."/>
+ <xsl:param name="footnote" select="."/>
+
+ <xsl:variable name="is.chunk">
+ <xsl:call-template name="chunk">
+ <xsl:with-param name="node" select="$node"/>
+ </xsl:call-template>
+ </xsl:variable>
+
+ <xsl:choose>
+ <xsl:when test="$is.chunk = 1">
+ <xsl:value-of select="count($node//footnote[not(@label)][count(./preceding::node()) <= count($node//footnote[not(@label)][.=$footnote]/preceding::node())])" />
+ </xsl:when>
+ <xsl:otherwise>
+ <xsl:if test="$node/parent::*">
+ <xsl:call-template name="footnote.in.chunk.number">
+ <xsl:with-param name="node" select="$node/parent::*"/>
+ <xsl:with-param name="footnote" select="$footnote"/>
+ </xsl:call-template>
+ </xsl:if>
+ </xsl:otherwise>
+ </xsl:choose>
+</xsl:template>
+
+<!-- from xhtml/footnote.xsl
+Independent footnote numbering inside chunks
+error-message-reporting.html:
+ [11] %m does not require any corresponding entry in the parameter list for errmsg.
+->
+ [1] %m does not require any corresponding entry in the parameter list for errmsg.
+-->
+<xsl:template match="footnote" mode="footnote.number">
+ <xsl:choose>
+ <xsl:when test="string-length(@label) != 0">
+ <xsl:value-of select="@label"/>
+ </xsl:when>
+ <xsl:when test="ancestor::table or ancestor::informaltable">
+ <xsl:variable name="tfnum">
+ <xsl:number level="any" from="table|informaltable" format="1"/>
+ </xsl:variable>
+
+ <xsl:choose>
+ <xsl:when test="string-length($table.footnote.number.symbols) >= $tfnum">
+ <xsl:value-of select="substring($table.footnote.number.symbols, $tfnum, 1)"/>
+ </xsl:when>
+ <xsl:otherwise>
+ <xsl:number level="any" from="table | informaltable" format="{$table.footnote.number.format}"/>
+ </xsl:otherwise>
+ </xsl:choose>
+ </xsl:when>
+ <xsl:otherwise>
+ <xsl:variable name="fnum"> <!--"count($pfoot) - count($ptfoot) + 1"/> -->
+ <xsl:choose>
+ <xsl:when test="$onechunk != 0">
+ <xsl:variable name="pfoot" select="preceding::footnote[not(@label)]"/>
+ <xsl:variable name="ptfoot" select="preceding::table//footnote | preceding::informaltable//footnote"/>
+ <xsl:value-of select="count($pfoot) - count($ptfoot) + 1"/>
+ </xsl:when>
+ <xsl:otherwise>
+ <xsl:call-template name="footnote.in.chunk.number">
+ </xsl:call-template>
+ </xsl:otherwise>
+ </xsl:choose>
+ </xsl:variable>
+ <xsl:choose>
+ <xsl:when test="string-length($footnote.number.symbols) >= $fnum">
+ <xsl:value-of select="substring($footnote.number.symbols, $fnum, 1)"/>
+ </xsl:when>
+ <xsl:otherwise>
+ <xsl:number value="$fnum" format="{$footnote.number.format}"/>
+ </xsl:otherwise>
+ </xsl:choose>
+ </xsl:otherwise>
+ </xsl:choose>
+</xsl:template>
+
+<!-- ==================================================================== -->
+<!-- from xhtml/xref.xsl -->
+<!--
+tutorial-sql-intro.html:
+ written on SQL, including [melt93] and [date97].
+->
+ written on SQL, including Understanding the New SQL and A Guide
+ to the SQL Standard.
+-->
+<xsl:template match="biblioentry|bibliomixed" mode="xref-to">
+ <xsl:param name="referrer"/>
+ <xsl:param name="xrefstyle"/>
+ <xsl:param name="verbose" select="1"/>
+ <!-- handles both biblioentry and bibliomixed -->
+
+ <xsl:choose>
+ <xsl:when test="string(.) = ''">
+ <xsl:variable name="bib" select="document($bibliography.collection,.)"/>
+ <xsl:variable name="id" select="(@id|@xml:id)[1]"/>
+ <xsl:variable name="entry" select="$bib/bibliography/ *[@id=$id or @xml:id=$id][1]"/>
+ <xsl:choose>
+ <xsl:when test="$entry">
+ <xsl:choose>
+ <xsl:when test="$bibliography.numbered != 0">
+ <xsl:number from="bibliography" count="biblioentry|bibliomixed" level="any" format="1"/>
+ </xsl:when>
+ <xsl:when test="local-name($entry/*[1]) = 'abbrev'">
+ <xsl:apply-templates select="$entry/*[1]" mode="no.anchor.mode"/>
+ </xsl:when>
+ <xsl:otherwise>
+ <xsl:value-of select="(@id|@xml:id)[1]"/>
+ </xsl:otherwise>
+ </xsl:choose>
+ </xsl:when>
+ <xsl:otherwise>
+ <xsl:message>
+ <xsl:text>No bibliography entry: </xsl:text>
+ <xsl:value-of select="$id"/>
+ <xsl:text> found in </xsl:text>
+ <xsl:value-of select="$bibliography.collection"/>
+ </xsl:message>
+ <xsl:value-of select="(@id|@xml:id)[1]"/>
+ </xsl:otherwise>
+ </xsl:choose>
+ </xsl:when>
+ <xsl:otherwise>
+ <xsl:choose>
+ <xsl:when test="$bibliography.numbered != 0">
+ <xsl:number from="bibliography" count="biblioentry|bibliomixed" level="any" format="1"/>
+ </xsl:when>
+ <xsl:when test="local-name(*[1]) = 'abbrev'">
+ <xsl:apply-templates select="*[1]" mode="no.anchor.mode"/>
+ </xsl:when>
+ <xsl:otherwise>
+ <xsl:value-of select="normalize-space((title|(biblioset[1]/title))[1])"/>
+ </xsl:otherwise>
+ </xsl:choose>
+ </xsl:otherwise>
+ </xsl:choose>
+</xsl:template>
+
+<!-- from xhtml/xref.xsl -->
+<xsl:template match="biblioentry|bibliomixed" mode="xref-to-prefix">
+</xsl:template>
+
+<!-- from xhtml/xref.xsl -->
+<xsl:template match="biblioentry|bibliomixed" mode="xref-to-suffix">
+</xsl:template>
+
+<!-- ==================================================================== -->
+<!-- from common/labels.xsl -->
+<!-- Table numbering inside reference
+pgbench.html:
+Table 237. Automatic Variables
+->
+Table 1. Automatic Variables
+-->
+<xsl:template match="figure|table|example" mode="label.markup">
+ <xsl:variable name="pchap"
+ select="(ancestor::chapter
+ |ancestor::appendix
+ |ancestor::article[ancestor::book])[last()]"/>
+
+ <xsl:variable name="prefix">
+ <xsl:if test="count($pchap) > 0">
+ <xsl:apply-templates select="$pchap" mode="label.markup"/>
+ </xsl:if>
+ </xsl:variable>
+ <xsl:choose>
+ <xsl:when test="@label">
+ <xsl:value-of select="@label"/>
+ </xsl:when>
+ <xsl:otherwise>
+ <xsl:choose>
+ <xsl:when test="$prefix != ''">
+ <xsl:apply-templates select="$pchap" mode="label.markup"/>
+ <xsl:apply-templates select="$pchap" mode="intralabel.punctuation">
+ <xsl:with-param name="object" select="."/>
+ </xsl:apply-templates>
+ <xsl:number format="1" from="chapter|appendix" level="any"/>
+ </xsl:when>
+ <xsl:otherwise>
+ <xsl:number format="1" from="book|article|reference" level="any"/>
+ </xsl:otherwise>
+ </xsl:choose>
+ </xsl:otherwise>
+ </xsl:choose>
+</xsl:template>
+
+</xsl:stylesheet>
diff --git a/doc/src/sgml/stylesheet.xsl b/doc/src/sgml/stylesheet.xsl
index 631fcc4..e17a443 100644
--- a/doc/src/sgml/stylesheet.xsl
+++ b/doc/src/sgml/stylesheet.xsl
@@ -7,6 +7,7 @@
<xsl:import href="http://docbook.sourceforge.net/release/xsl/current/xhtml/chunk.xsl"/>
<xsl:include href="stylesheet-common.xsl" />
<xsl:include href="stylesheet-speedup-xhtml.xsl" />
+<xsl:include href="stylesheet-xhtml-dsssl-like.xsl" />
<!-- Parameters -->
@@ -20,6 +21,9 @@
<xsl:param name="chunk.quietly" select="1"></xsl:param>
<xsl:param name="toc.max.depth">2</xsl:param>
+<xsl:param name="refentry.generate.name" select="0"/>
+<xsl:param name="refentry.generate.title" select="1"/>
+<xsl:param name="xref.with.number.and.title" select="0"></xsl:param>
<xsl:param name="website.stylesheet" select="0"/>
<xsl:param name="html.stylesheet">
@@ -50,7 +54,7 @@ preface toc,title
qandadiv toc
qandaset toc
reference toc,title
-sect1 toc
+sect1 toc,title
sect2 toc
sect3 toc
sect4 toc
^ permalink raw reply [nested|flat] 86+ messages in thread
* Re: Docbook 5.x
2016-04-20 14:30 Docbook 5.x Jürgen Purtz <[email protected]>
2016-05-03 19:34 ` Re: Docbook 5.x Alvaro Herrera <[email protected]>
2016-05-03 20:13 ` Re: Docbook 5.x Oleg Bartunov <[email protected]>
2016-05-04 00:44 ` Re: Docbook 5.x Peter Eisentraut <[email protected]>
2016-05-05 04:45 ` Re: Docbook 5.x Alexander Law <[email protected]>
2016-06-03 19:31 ` Re: Docbook 5.x Peter Eisentraut <[email protected]>
2016-06-04 14:28 ` Re: Docbook 5.x Alexander Law <[email protected]>
2016-06-06 12:28 ` Re: Docbook 5.x Peter Eisentraut <[email protected]>
2016-08-18 17:56 ` Re: Docbook 5.x Peter Eisentraut <[email protected]>
2016-08-19 13:14 ` Re: Docbook 5.x Alexander Law <[email protected]>
2016-08-22 18:06 ` Re: Docbook 5.x Peter Eisentraut <[email protected]>
2016-08-23 14:23 ` Re: Docbook 5.x Alexander Law <[email protected]>
2016-09-14 11:18 ` Re: Docbook 5.x Alexander Law <[email protected]>
2016-09-14 13:05 ` Re: Docbook 5.x Jürgen Purtz <[email protected]>
2016-09-14 15:30 ` Re: Docbook 5.x Alvaro Herrera <[email protected]>
2016-10-04 15:45 ` Re: Docbook 5.x Alexander Law <[email protected]>
@ 2016-10-19 09:11 ` Jürgen Purtz <[email protected]>
0 siblings, 0 replies; 86+ messages in thread
From: Jürgen Purtz @ 2016-10-19 09:11 UTC (permalink / raw)
To: pgsql-docs
The Docbook TC is discussing the mid-term plans for Docbook 6, see:
https://lists.oasis-open.org/archives/docbook/201610/msg00005.html .
Just like at Docbook 5, the normative standard will be written in
RelaxNG+Schematron. In the past they generated dtd and xsd files out of
RelaxNG. But for Docbook 6 they consider to drop the xsd version - the
dtd will survive as it can be generated automatically.
* Does anybody need the xsd version in the long term? * xmllint is able
to validate against RelaxNG.
Kind regards, Jürgen
--
Sent via pgsql-docs mailing list ([email protected])
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-docs
^ permalink raw reply [nested|flat] 86+ messages in thread
* Re: Docbook 5.x
2016-04-20 14:30 Docbook 5.x Jürgen Purtz <[email protected]>
2016-05-03 19:34 ` Re: Docbook 5.x Alvaro Herrera <[email protected]>
2016-05-03 20:13 ` Re: Docbook 5.x Oleg Bartunov <[email protected]>
2016-05-04 00:44 ` Re: Docbook 5.x Peter Eisentraut <[email protected]>
2016-05-05 04:45 ` Re: Docbook 5.x Alexander Law <[email protected]>
2016-06-03 19:31 ` Re: Docbook 5.x Peter Eisentraut <[email protected]>
2016-06-04 14:28 ` Re: Docbook 5.x Alexander Law <[email protected]>
2016-06-06 12:28 ` Re: Docbook 5.x Peter Eisentraut <[email protected]>
2016-08-18 17:56 ` Re: Docbook 5.x Peter Eisentraut <[email protected]>
2016-08-19 13:14 ` Re: Docbook 5.x Alexander Law <[email protected]>
2016-08-22 18:06 ` Re: Docbook 5.x Peter Eisentraut <[email protected]>
2016-08-23 14:23 ` Re: Docbook 5.x Alexander Law <[email protected]>
2016-09-14 11:18 ` Re: Docbook 5.x Alexander Law <[email protected]>
@ 2016-11-08 13:25 ` Peter Eisentraut <[email protected]>
2016-11-08 15:02 ` Re: Docbook 5.x Tom Lane <[email protected]>
2016-11-09 10:00 ` Re: Docbook 5.x Alexander Law <[email protected]>
1 sibling, 2 replies; 86+ messages in thread
From: Peter Eisentraut @ 2016-11-08 13:25 UTC (permalink / raw)
To: Alexander Law <[email protected]>; [email protected]; Alvaro Herrera <[email protected]>; Alexander Lakhin <[email protected]>; +Cc: Jürgen Purtz <[email protected]>; pgsql-docs
On 9/14/16 7:18 AM, Alexander Law wrote:
> Please look at the
> http://oc.postgrespro.ru/index.php/s/ttJyMDLr8Xr1HTu/download
> where I have gathered together all the significant differences, that we
> have between DSSSL and XSLT outputs.
> I have marked red the differences that I would consider as negative.
> Let's decide which ones are acceptable and which we need to eliminate.
Thank you for making that list. I have a similar list that is not quite
the same, so together we'll probably find all the problems. I have
checked both lists and most of the issues are not terribly critical.
I have now committed fixes for what I think were the major missing
usability issues: header customization and index letter links. I would
be comfortable with switching the default build to XSLT now and work out
the remaining issues on the fly. What do you think?
(I also have a similar list for switching the PDF build from jadetex to
fop. We are also in pretty good shape there, but I have not finished
the evaluation fully.)
--
Peter Eisentraut http://www.2ndQuadrant.com/
PostgreSQL Development, 24x7 Support, Remote DBA, Training & Services
--
Sent via pgsql-docs mailing list ([email protected])
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-docs
^ permalink raw reply [nested|flat] 86+ messages in thread
* Re: Docbook 5.x
2016-04-20 14:30 Docbook 5.x Jürgen Purtz <[email protected]>
2016-05-03 19:34 ` Re: Docbook 5.x Alvaro Herrera <[email protected]>
2016-05-03 20:13 ` Re: Docbook 5.x Oleg Bartunov <[email protected]>
2016-05-04 00:44 ` Re: Docbook 5.x Peter Eisentraut <[email protected]>
2016-05-05 04:45 ` Re: Docbook 5.x Alexander Law <[email protected]>
2016-06-03 19:31 ` Re: Docbook 5.x Peter Eisentraut <[email protected]>
2016-06-04 14:28 ` Re: Docbook 5.x Alexander Law <[email protected]>
2016-06-06 12:28 ` Re: Docbook 5.x Peter Eisentraut <[email protected]>
2016-08-18 17:56 ` Re: Docbook 5.x Peter Eisentraut <[email protected]>
2016-08-19 13:14 ` Re: Docbook 5.x Alexander Law <[email protected]>
2016-08-22 18:06 ` Re: Docbook 5.x Peter Eisentraut <[email protected]>
2016-08-23 14:23 ` Re: Docbook 5.x Alexander Law <[email protected]>
2016-09-14 11:18 ` Re: Docbook 5.x Alexander Law <[email protected]>
2016-11-08 13:25 ` Re: Docbook 5.x Peter Eisentraut <[email protected]>
@ 2016-11-08 15:02 ` Tom Lane <[email protected]>
2016-11-08 16:34 ` Re: Docbook 5.x Peter Eisentraut <[email protected]>
1 sibling, 1 reply; 86+ messages in thread
From: Tom Lane @ 2016-11-08 15:02 UTC (permalink / raw)
To: Peter Eisentraut <[email protected]>; +Cc: Alexander Law <[email protected]>; [email protected]; Alvaro Herrera <[email protected]>; Alexander Lakhin <[email protected]>; Jürgen Purtz <[email protected]>; pgsql-docs
Peter Eisentraut <[email protected]> writes:
> I have now committed fixes for what I think were the major missing
> usability issues: header customization and index letter links. I would
> be comfortable with switching the default build to XSLT now and work out
> the remaining issues on the fly. What do you think?
What does that imply in terms of changing build dependencies for people
who want to build the docs?
regards, tom lane
--
Sent via pgsql-docs mailing list ([email protected])
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-docs
^ permalink raw reply [nested|flat] 86+ messages in thread
* Re: Docbook 5.x
2016-04-20 14:30 Docbook 5.x Jürgen Purtz <[email protected]>
2016-05-03 19:34 ` Re: Docbook 5.x Alvaro Herrera <[email protected]>
2016-05-03 20:13 ` Re: Docbook 5.x Oleg Bartunov <[email protected]>
2016-05-04 00:44 ` Re: Docbook 5.x Peter Eisentraut <[email protected]>
2016-05-05 04:45 ` Re: Docbook 5.x Alexander Law <[email protected]>
2016-06-03 19:31 ` Re: Docbook 5.x Peter Eisentraut <[email protected]>
2016-06-04 14:28 ` Re: Docbook 5.x Alexander Law <[email protected]>
2016-06-06 12:28 ` Re: Docbook 5.x Peter Eisentraut <[email protected]>
2016-08-18 17:56 ` Re: Docbook 5.x Peter Eisentraut <[email protected]>
2016-08-19 13:14 ` Re: Docbook 5.x Alexander Law <[email protected]>
2016-08-22 18:06 ` Re: Docbook 5.x Peter Eisentraut <[email protected]>
2016-08-23 14:23 ` Re: Docbook 5.x Alexander Law <[email protected]>
2016-09-14 11:18 ` Re: Docbook 5.x Alexander Law <[email protected]>
2016-11-08 13:25 ` Re: Docbook 5.x Peter Eisentraut <[email protected]>
2016-11-08 15:02 ` Re: Docbook 5.x Tom Lane <[email protected]>
@ 2016-11-08 16:34 ` Peter Eisentraut <[email protected]>
0 siblings, 0 replies; 86+ messages in thread
From: Peter Eisentraut @ 2016-11-08 16:34 UTC (permalink / raw)
To: Tom Lane <[email protected]>; +Cc: Alexander Law <[email protected]>; [email protected]; Alvaro Herrera <[email protected]>; Alexander Lakhin <[email protected]>; Jürgen Purtz <[email protected]>; pgsql-docs
On 11/8/16 10:02 AM, Tom Lane wrote:
> Peter Eisentraut <[email protected]> writes:
>> I have now committed fixes for what I think were the major missing
>> usability issues: header customization and index letter links. I would
>> be comfortable with switching the default build to XSLT now and work out
>> the remaining issues on the fly. What do you think?
>
> What does that imply in terms of changing build dependencies for people
> who want to build the docs?
I will write a full explanation to hackers before making any change.
But the short answer is, it's the same tools we use for building the man
pages now, so if you can run make man or make world, you're set.
--
Peter Eisentraut http://www.2ndQuadrant.com/
PostgreSQL Development, 24x7 Support, Remote DBA, Training & Services
--
Sent via pgsql-docs mailing list ([email protected])
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-docs
^ permalink raw reply [nested|flat] 86+ messages in thread
* Re: Docbook 5.x
2016-04-20 14:30 Docbook 5.x Jürgen Purtz <[email protected]>
2016-05-03 19:34 ` Re: Docbook 5.x Alvaro Herrera <[email protected]>
2016-05-03 20:13 ` Re: Docbook 5.x Oleg Bartunov <[email protected]>
2016-05-04 00:44 ` Re: Docbook 5.x Peter Eisentraut <[email protected]>
2016-05-05 04:45 ` Re: Docbook 5.x Alexander Law <[email protected]>
2016-06-03 19:31 ` Re: Docbook 5.x Peter Eisentraut <[email protected]>
2016-06-04 14:28 ` Re: Docbook 5.x Alexander Law <[email protected]>
2016-06-06 12:28 ` Re: Docbook 5.x Peter Eisentraut <[email protected]>
2016-08-18 17:56 ` Re: Docbook 5.x Peter Eisentraut <[email protected]>
2016-08-19 13:14 ` Re: Docbook 5.x Alexander Law <[email protected]>
2016-08-22 18:06 ` Re: Docbook 5.x Peter Eisentraut <[email protected]>
2016-08-23 14:23 ` Re: Docbook 5.x Alexander Law <[email protected]>
2016-09-14 11:18 ` Re: Docbook 5.x Alexander Law <[email protected]>
2016-11-08 13:25 ` Re: Docbook 5.x Peter Eisentraut <[email protected]>
@ 2016-11-09 10:00 ` Alexander Law <[email protected]>
2016-11-16 11:30 ` Re: Docbook 5.x Alexander Law <[email protected]>
1 sibling, 1 reply; 86+ messages in thread
From: Alexander Law @ 2016-11-09 10:00 UTC (permalink / raw)
To: Peter Eisentraut <[email protected]>; [email protected]; Alvaro Herrera <[email protected]>; Alexander Lakhin <[email protected]>; +Cc: Jürgen Purtz <[email protected]>; pgsql-docs
Hello Peter,
I think it's time to switch to XSLT. We at Postgres Pro already build
(converted to XML) and publish the docs (for version 9.6, in English and
Russian) and we've got only one bug report related to the
header/navigation differences.
(See https://postgrespro.com/docs/postgresql/9.6/tutorial-concepts.html
vs https://postgrespro.com/docs/postgresql/9.5/tutorial-concepts.html).
There are other customizations that I would like to apply, but it could
be done later.
And as we should completely move away from DSSSL to migrate to XML, I
think the sooner we switch to XSLT, the better.
Best regards,
Alexander
08.11.2016 16:25, Peter Eisentraut wrote:
> I have now committed fixes for what I think were the major missing
> usability issues: header customization and index letter links. I would
> be comfortable with switching the default build to XSLT now and work out
> the remaining issues on the fly. What do you think?
>
--
Sent via pgsql-docs mailing list ([email protected])
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-docs
^ permalink raw reply [nested|flat] 86+ messages in thread
* Re: Docbook 5.x
2016-04-20 14:30 Docbook 5.x Jürgen Purtz <[email protected]>
2016-05-03 19:34 ` Re: Docbook 5.x Alvaro Herrera <[email protected]>
2016-05-03 20:13 ` Re: Docbook 5.x Oleg Bartunov <[email protected]>
2016-05-04 00:44 ` Re: Docbook 5.x Peter Eisentraut <[email protected]>
2016-05-05 04:45 ` Re: Docbook 5.x Alexander Law <[email protected]>
2016-06-03 19:31 ` Re: Docbook 5.x Peter Eisentraut <[email protected]>
2016-06-04 14:28 ` Re: Docbook 5.x Alexander Law <[email protected]>
2016-06-06 12:28 ` Re: Docbook 5.x Peter Eisentraut <[email protected]>
2016-08-18 17:56 ` Re: Docbook 5.x Peter Eisentraut <[email protected]>
2016-08-19 13:14 ` Re: Docbook 5.x Alexander Law <[email protected]>
2016-08-22 18:06 ` Re: Docbook 5.x Peter Eisentraut <[email protected]>
2016-08-23 14:23 ` Re: Docbook 5.x Alexander Law <[email protected]>
2016-09-14 11:18 ` Re: Docbook 5.x Alexander Law <[email protected]>
2016-11-08 13:25 ` Re: Docbook 5.x Peter Eisentraut <[email protected]>
2016-11-09 10:00 ` Re: Docbook 5.x Alexander Law <[email protected]>
@ 2016-11-16 11:30 ` Alexander Law <[email protected]>
2016-11-16 14:40 ` Re: Docbook 5.x Jürgen Purtz <[email protected]>
2017-02-28 08:55 ` Re: Docbook 5.x Alexander Law <[email protected]>
0 siblings, 2 replies; 86+ messages in thread
From: Alexander Law @ 2016-11-16 11:30 UTC (permalink / raw)
To: Peter Eisentraut <[email protected]>; [email protected]; Alvaro Herrera <[email protected]>; Alexander Lakhin <[email protected]>; +Cc: Jürgen Purtz <[email protected]>; pgsql-docs
Hello Peter,
I saw that you committed the patch to switch the html build to XSLT by
default.
So It seems, now we can continue the move to XML.
I'd suggest to move in several steps.
Please see the attached scripts.
The main script is 7_check_conversion.sh. It performs all the conversion
and checks whether the html output is the same.
I suggest to split conversion in three commits.
Commit#0 is for manual corrections - it replaces "<" with "<" and so
on in some sgml's and it doesn't affect the build or outputs.
It needed just for the next step - automatic conversion. These changes
to sgml's are countable and observable.
Commit#1 performs conversion of all SGML's to make them compatible with
XML (as much as possible). (Thanks to Jurgen for his sgml2xml.pl script.)
These changes to sgml's are massive, but they are produced
automatically, so we need just to check the script and make sure that
the output is the same.
After that commit we still can use SGML build.
And the last commit, commit#2 is for switching to XML. At that point
doc/src/sgml renamed to doc/src/xml, build environment modified and
cleaned, but changes in sgml/xml are minimal, so we can observe and
check them.
After the commit#2 we get all our docs in XML (DocBook 4.2) and can
build it just as we did with 'make html/man/...' before.
Maybe the commit#2 should be applied later, but commits #0 and #1 are
not intrusive and can be applied anytime.
Best regards,
Alexander
--
Sent via pgsql-docs mailing list ([email protected])
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-docs
Attachments:
[application/x-bzip] pg-doc.check.tar.bz2 (20.7K, 2-pg-doc.check.tar.bz2)
download
^ permalink raw reply [nested|flat] 86+ messages in thread
* Re: Docbook 5.x
2016-04-20 14:30 Docbook 5.x Jürgen Purtz <[email protected]>
2016-05-03 19:34 ` Re: Docbook 5.x Alvaro Herrera <[email protected]>
2016-05-03 20:13 ` Re: Docbook 5.x Oleg Bartunov <[email protected]>
2016-05-04 00:44 ` Re: Docbook 5.x Peter Eisentraut <[email protected]>
2016-05-05 04:45 ` Re: Docbook 5.x Alexander Law <[email protected]>
2016-06-03 19:31 ` Re: Docbook 5.x Peter Eisentraut <[email protected]>
2016-06-04 14:28 ` Re: Docbook 5.x Alexander Law <[email protected]>
2016-06-06 12:28 ` Re: Docbook 5.x Peter Eisentraut <[email protected]>
2016-08-18 17:56 ` Re: Docbook 5.x Peter Eisentraut <[email protected]>
2016-08-19 13:14 ` Re: Docbook 5.x Alexander Law <[email protected]>
2016-08-22 18:06 ` Re: Docbook 5.x Peter Eisentraut <[email protected]>
2016-08-23 14:23 ` Re: Docbook 5.x Alexander Law <[email protected]>
2016-09-14 11:18 ` Re: Docbook 5.x Alexander Law <[email protected]>
2016-11-08 13:25 ` Re: Docbook 5.x Peter Eisentraut <[email protected]>
2016-11-09 10:00 ` Re: Docbook 5.x Alexander Law <[email protected]>
2016-11-16 11:30 ` Re: Docbook 5.x Alexander Law <[email protected]>
@ 2016-11-16 14:40 ` Jürgen Purtz <[email protected]>
1 sibling, 0 replies; 86+ messages in thread
From: Jürgen Purtz @ 2016-11-16 14:40 UTC (permalink / raw)
To: pgsql-docs
> Hello Peter,
>
> I saw that you committed the patch to switch the html build to XSLT by
> default.
> So It seems, now we can continue the move to XML.
> I'd suggest to move in several steps.
> Please see the attached scripts.
> The main script is 7_check_conversion.sh. It performs all the
> conversion and checks whether the html output is the same.
> I suggest to split conversion in three commits.
> Commit#0 is for manual corrections - it replaces "<" with "<" and
> so on in some sgml's and it doesn't affect the build or outputs.
> It needed just for the next step - automatic conversion. These changes
> to sgml's are countable and observable.
>
> Commit#1 performs conversion of all SGML's to make them compatible
> with XML (as much as possible). (Thanks to Jurgen for his sgml2xml.pl
> script.)
> These changes to sgml's are massive, but they are produced
> automatically, so we need just to check the script and make sure that
> the output is the same.
> After that commit we still can use SGML build.
>
> And the last commit, commit#2 is for switching to XML. At that point
> doc/src/sgml renamed to doc/src/xml, build environment modified and
> cleaned, but changes in sgml/xml are minimal, so we can observe and
> check them.
>
> After the commit#2 we get all our docs in XML (DocBook 4.2) and can
> build it just as we did with 'make html/man/...' before.
> Maybe the commit#2 should be applied later, but commits #0 and #1 are
> not intrusive and can be applied anytime.
>
> Best regards,
> Alexander
>
Hello,
I greatly welcome the next steps toward XML.
In addition to the submitted scripts I want to point out that we will
get validation error messages if the following three things coincide: a)
Docbook 4.2, b) use of XInclude, c) a different directory (eg: 'ref').
The xi:base attribute (to specify a different directory) was introduced
into the Docbook DTD with version 4.3. Older DTDs cannot use it without
manual changes to the DTD, please see:
http://www.sagehill.net/docbookxsl/ValidXinclude.html. To overcome this
shortage I suggest the use of Docbook 4.3 (or 4.5) - as a separate
commit or implicitly with commit #2. As far as I have seen, all
converted documents validate against 4.5.
Kind regards
Jürgen Purtz
--
Sent via pgsql-docs mailing list ([email protected])
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-docs
^ permalink raw reply [nested|flat] 86+ messages in thread
* Re: Docbook 5.x
2016-04-20 14:30 Docbook 5.x Jürgen Purtz <[email protected]>
2016-05-03 19:34 ` Re: Docbook 5.x Alvaro Herrera <[email protected]>
2016-05-03 20:13 ` Re: Docbook 5.x Oleg Bartunov <[email protected]>
2016-05-04 00:44 ` Re: Docbook 5.x Peter Eisentraut <[email protected]>
2016-05-05 04:45 ` Re: Docbook 5.x Alexander Law <[email protected]>
2016-06-03 19:31 ` Re: Docbook 5.x Peter Eisentraut <[email protected]>
2016-06-04 14:28 ` Re: Docbook 5.x Alexander Law <[email protected]>
2016-06-06 12:28 ` Re: Docbook 5.x Peter Eisentraut <[email protected]>
2016-08-18 17:56 ` Re: Docbook 5.x Peter Eisentraut <[email protected]>
2016-08-19 13:14 ` Re: Docbook 5.x Alexander Law <[email protected]>
2016-08-22 18:06 ` Re: Docbook 5.x Peter Eisentraut <[email protected]>
2016-08-23 14:23 ` Re: Docbook 5.x Alexander Law <[email protected]>
2016-09-14 11:18 ` Re: Docbook 5.x Alexander Law <[email protected]>
2016-11-08 13:25 ` Re: Docbook 5.x Peter Eisentraut <[email protected]>
2016-11-09 10:00 ` Re: Docbook 5.x Alexander Law <[email protected]>
2016-11-16 11:30 ` Re: Docbook 5.x Alexander Law <[email protected]>
@ 2017-02-28 08:55 ` Alexander Law <[email protected]>
2017-02-28 09:50 ` Re: Docbook 5.x Jürgen Purtz <[email protected]>
2017-03-11 02:06 ` Re: Docbook 5.x Peter Eisentraut <[email protected]>
2017-04-05 02:33 ` Re: Docbook 5.x Peter Eisentraut <[email protected]>
2017-09-06 15:54 ` Re: Docbook 5.x Peter Eisentraut <[email protected]>
1 sibling, 4 replies; 86+ messages in thread
From: Alexander Law @ 2017-02-28 08:55 UTC (permalink / raw)
To: Peter Eisentraut <[email protected]>; +Cc: [email protected]; Alvaro Herrera <[email protected]>; Jürgen Purtz <[email protected]>; pgsql-docs
Hello Peter,
16.11.2016 14:30, Alexander Law wrote:
> So It seems, now we can continue the move to XML.
> I'd suggest to move in several steps.
> Please see the attached scripts.
> The main script is 7_check_conversion.sh. It performs all the
> conversion and checks whether the html output is the same.
> I suggest to split conversion in three commits.
> Commit#0 is for manual corrections - it replaces "<" with "<" and
> so on in some sgml's and it doesn't affect the build or outputs.
> It needed just for the next step - automatic conversion. These changes
> to sgml's are countable and observable.
>
> Commit#1 performs conversion of all SGML's to make them compatible
> with XML (as much as possible). (Thanks to Jurgen for his sgml2xml.pl
> script.)
> These changes to sgml's are massive, but they are produced
> automatically, so we need just to check the script and make sure that
> the output is the same.
> After that commit we still can use SGML build.
>
> And the last commit, commit#2 is for switching to XML. At that point
> doc/src/sgml renamed to doc/src/xml, build environment modified and
> cleaned, but changes in sgml/xml are minimal, so we can observe and
> check them.
>
> After the commit#2 we get all our docs in XML (DocBook 4.2) and can
> build it just as we did with 'make html/man/...' before.
> Maybe the commit#2 should be applied later, but commits #0 and #1 are
> not intrusive and can be applied anytime.
I've rebased previous patches for the current "10devel" version.
Will we continue move to DocBook.XML?
Are there any obstacles that may keep us from moving forward?
Best regards,
Alexander
--
Sent via pgsql-docs mailing list ([email protected])
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-docs
Attachments:
[application/x-bzip] pg-doc.check.tar.bz2 (24.5K, 2-pg-doc.check.tar.bz2)
download
^ permalink raw reply [nested|flat] 86+ messages in thread
* Re: Docbook 5.x
2016-04-20 14:30 Docbook 5.x Jürgen Purtz <[email protected]>
2016-05-03 19:34 ` Re: Docbook 5.x Alvaro Herrera <[email protected]>
2016-05-03 20:13 ` Re: Docbook 5.x Oleg Bartunov <[email protected]>
2016-05-04 00:44 ` Re: Docbook 5.x Peter Eisentraut <[email protected]>
2016-05-05 04:45 ` Re: Docbook 5.x Alexander Law <[email protected]>
2016-06-03 19:31 ` Re: Docbook 5.x Peter Eisentraut <[email protected]>
2016-06-04 14:28 ` Re: Docbook 5.x Alexander Law <[email protected]>
2016-06-06 12:28 ` Re: Docbook 5.x Peter Eisentraut <[email protected]>
2016-08-18 17:56 ` Re: Docbook 5.x Peter Eisentraut <[email protected]>
2016-08-19 13:14 ` Re: Docbook 5.x Alexander Law <[email protected]>
2016-08-22 18:06 ` Re: Docbook 5.x Peter Eisentraut <[email protected]>
2016-08-23 14:23 ` Re: Docbook 5.x Alexander Law <[email protected]>
2016-09-14 11:18 ` Re: Docbook 5.x Alexander Law <[email protected]>
2016-11-08 13:25 ` Re: Docbook 5.x Peter Eisentraut <[email protected]>
2016-11-09 10:00 ` Re: Docbook 5.x Alexander Law <[email protected]>
2016-11-16 11:30 ` Re: Docbook 5.x Alexander Law <[email protected]>
2017-02-28 08:55 ` Re: Docbook 5.x Alexander Law <[email protected]>
@ 2017-02-28 09:50 ` Jürgen Purtz <[email protected]>
3 siblings, 0 replies; 86+ messages in thread
From: Jürgen Purtz @ 2017-02-28 09:50 UTC (permalink / raw)
To: pgsql-docs
Hello Alexander,
On 28.02.2017 09:55, Alexander Law wrote:
> Hello Peter,
>
> 16.11.2016 14:30, Alexander Law wrote:
>> So It seems, now we can continue the move to XML.
>> I'd suggest to move in several steps.
>> Please see the attached scripts.
>> The main script is 7_check_conversion.sh. It performs all the
>> conversion and checks whether the html output is the same.
>> I suggest to split conversion in three commits.
>> Commit#0 is for manual corrections - it replaces "<" with "<" and
>> so on in some sgml's and it doesn't affect the build or outputs.
>> It needed just for the next step - automatic conversion. These
>> changes to sgml's are countable and observable.
>>
>> Commit#1 performs conversion of all SGML's to make them compatible
>> with XML (as much as possible). (Thanks to Jurgen for his sgml2xml.pl
>> script.)
>> These changes to sgml's are massive, but they are produced
>> automatically, so we need just to check the script and make sure that
>> the output is the same.
>> After that commit we still can use SGML build.
>>
>> And the last commit, commit#2 is for switching to XML. At that point
>> doc/src/sgml renamed to doc/src/xml, build environment modified and
>> cleaned, but changes in sgml/xml are minimal, so we can observe and
>> check them.
>>
>> After the commit#2 we get all our docs in XML (DocBook 4.2) and can
>> build it just as we did with 'make html/man/...' before.
>> Maybe the commit#2 should be applied later, but commits #0 and #1 are
>> not intrusive and can be applied anytime.
> I've rebased previous patches for the current "10devel" version.
> Will we continue move to DocBook.XML?
> Are there any obstacles that may keep us from moving forward?
>
> Best regards,
> Alexander
>
the time gap between commit#1 and commit#2 shall be small as people may
create - in accordance with SGML - additional empty elements and shorttags.
The attached version of sgml2xml.pl is cleaned up by elimination of
unused variables and some modifications in the comments.
Kind regards, Jürgen
--
Sent via pgsql-docs mailing list ([email protected])
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-docs
Attachments:
[application/x-perl] sgml2xml.pl (3.7K, 2-sgml2xml.pl)
download
^ permalink raw reply [nested|flat] 86+ messages in thread
* Re: Docbook 5.x
2016-04-20 14:30 Docbook 5.x Jürgen Purtz <[email protected]>
2016-05-03 19:34 ` Re: Docbook 5.x Alvaro Herrera <[email protected]>
2016-05-03 20:13 ` Re: Docbook 5.x Oleg Bartunov <[email protected]>
2016-05-04 00:44 ` Re: Docbook 5.x Peter Eisentraut <[email protected]>
2016-05-05 04:45 ` Re: Docbook 5.x Alexander Law <[email protected]>
2016-06-03 19:31 ` Re: Docbook 5.x Peter Eisentraut <[email protected]>
2016-06-04 14:28 ` Re: Docbook 5.x Alexander Law <[email protected]>
2016-06-06 12:28 ` Re: Docbook 5.x Peter Eisentraut <[email protected]>
2016-08-18 17:56 ` Re: Docbook 5.x Peter Eisentraut <[email protected]>
2016-08-19 13:14 ` Re: Docbook 5.x Alexander Law <[email protected]>
2016-08-22 18:06 ` Re: Docbook 5.x Peter Eisentraut <[email protected]>
2016-08-23 14:23 ` Re: Docbook 5.x Alexander Law <[email protected]>
2016-09-14 11:18 ` Re: Docbook 5.x Alexander Law <[email protected]>
2016-11-08 13:25 ` Re: Docbook 5.x Peter Eisentraut <[email protected]>
2016-11-09 10:00 ` Re: Docbook 5.x Alexander Law <[email protected]>
2016-11-16 11:30 ` Re: Docbook 5.x Alexander Law <[email protected]>
2017-02-28 08:55 ` Re: Docbook 5.x Alexander Law <[email protected]>
@ 2017-03-11 02:06 ` Peter Eisentraut <[email protected]>
3 siblings, 0 replies; 86+ messages in thread
From: Peter Eisentraut @ 2017-03-11 02:06 UTC (permalink / raw)
To: Alexander Law <[email protected]>; +Cc: [email protected]; Alvaro Herrera <[email protected]>; Jürgen Purtz <[email protected]>; pgsql-docs
On 2/28/17 03:55, Alexander Law wrote:
> I've rebased previous patches for the current "10devel" version.
> Will we continue move to DocBook.XML?
> Are there any obstacles that may keep us from moving forward?
We still haven't gotten rid of all the DSSSL use.
--
Peter Eisentraut http://www.2ndQuadrant.com/
PostgreSQL Development, 24x7 Support, Remote DBA, Training & Services
--
Sent via pgsql-docs mailing list ([email protected])
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-docs
^ permalink raw reply [nested|flat] 86+ messages in thread
* Re: Docbook 5.x
2016-04-20 14:30 Docbook 5.x Jürgen Purtz <[email protected]>
2016-05-03 19:34 ` Re: Docbook 5.x Alvaro Herrera <[email protected]>
2016-05-03 20:13 ` Re: Docbook 5.x Oleg Bartunov <[email protected]>
2016-05-04 00:44 ` Re: Docbook 5.x Peter Eisentraut <[email protected]>
2016-05-05 04:45 ` Re: Docbook 5.x Alexander Law <[email protected]>
2016-06-03 19:31 ` Re: Docbook 5.x Peter Eisentraut <[email protected]>
2016-06-04 14:28 ` Re: Docbook 5.x Alexander Law <[email protected]>
2016-06-06 12:28 ` Re: Docbook 5.x Peter Eisentraut <[email protected]>
2016-08-18 17:56 ` Re: Docbook 5.x Peter Eisentraut <[email protected]>
2016-08-19 13:14 ` Re: Docbook 5.x Alexander Law <[email protected]>
2016-08-22 18:06 ` Re: Docbook 5.x Peter Eisentraut <[email protected]>
2016-08-23 14:23 ` Re: Docbook 5.x Alexander Law <[email protected]>
2016-09-14 11:18 ` Re: Docbook 5.x Alexander Law <[email protected]>
2016-11-08 13:25 ` Re: Docbook 5.x Peter Eisentraut <[email protected]>
2016-11-09 10:00 ` Re: Docbook 5.x Alexander Law <[email protected]>
2016-11-16 11:30 ` Re: Docbook 5.x Alexander Law <[email protected]>
2017-02-28 08:55 ` Re: Docbook 5.x Alexander Law <[email protected]>
@ 2017-04-05 02:33 ` Peter Eisentraut <[email protected]>
3 siblings, 0 replies; 86+ messages in thread
From: Peter Eisentraut @ 2017-04-05 02:33 UTC (permalink / raw)
To: Alexander Law <[email protected]>; +Cc: [email protected]; Alvaro Herrera <[email protected]>; Jürgen Purtz <[email protected]>; pgsql-docs
On 2/28/17 03:55, Alexander Law wrote:
> I've rebased previous patches for the current "10devel" version.
> Will we continue move to DocBook.XML?
I'm moving this to the next commit fest. The conversion from SGML to
XML will be a theme for the PG11 development cycle. For PG10, we have
accomplished the conversion from DSSSL to XSLT.
--
Peter Eisentraut http://www.2ndQuadrant.com/
PostgreSQL Development, 24x7 Support, Remote DBA, Training & Services
--
Sent via pgsql-docs mailing list ([email protected])
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-docs
^ permalink raw reply [nested|flat] 86+ messages in thread
* Re: Docbook 5.x
2016-04-20 14:30 Docbook 5.x Jürgen Purtz <[email protected]>
2016-05-03 19:34 ` Re: Docbook 5.x Alvaro Herrera <[email protected]>
2016-05-03 20:13 ` Re: Docbook 5.x Oleg Bartunov <[email protected]>
2016-05-04 00:44 ` Re: Docbook 5.x Peter Eisentraut <[email protected]>
2016-05-05 04:45 ` Re: Docbook 5.x Alexander Law <[email protected]>
2016-06-03 19:31 ` Re: Docbook 5.x Peter Eisentraut <[email protected]>
2016-06-04 14:28 ` Re: Docbook 5.x Alexander Law <[email protected]>
2016-06-06 12:28 ` Re: Docbook 5.x Peter Eisentraut <[email protected]>
2016-08-18 17:56 ` Re: Docbook 5.x Peter Eisentraut <[email protected]>
2016-08-19 13:14 ` Re: Docbook 5.x Alexander Law <[email protected]>
2016-08-22 18:06 ` Re: Docbook 5.x Peter Eisentraut <[email protected]>
2016-08-23 14:23 ` Re: Docbook 5.x Alexander Law <[email protected]>
2016-09-14 11:18 ` Re: Docbook 5.x Alexander Law <[email protected]>
2016-11-08 13:25 ` Re: Docbook 5.x Peter Eisentraut <[email protected]>
2016-11-09 10:00 ` Re: Docbook 5.x Alexander Law <[email protected]>
2016-11-16 11:30 ` Re: Docbook 5.x Alexander Law <[email protected]>
2017-02-28 08:55 ` Re: Docbook 5.x Alexander Law <[email protected]>
@ 2017-09-06 15:54 ` Peter Eisentraut <[email protected]>
2017-09-08 12:30 ` Re: Docbook 5.x Alexander Lakhin <[email protected]>
3 siblings, 1 reply; 86+ messages in thread
From: Peter Eisentraut @ 2017-09-06 15:54 UTC (permalink / raw)
To: Alexander Law <[email protected]>; +Cc: [email protected]; Alvaro Herrera <[email protected]>; Jürgen Purtz <[email protected]>; pgsql-docs
On 2/28/17 03:55, Alexander Law wrote:
> I've rebased previous patches for the current "10devel" version.
> Will we continue move to DocBook.XML?
> Are there any obstacles that may keep us from moving forward?
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.
--
Peter Eisentraut http://www.2ndQuadrant.com/
PostgreSQL Development, 24x7 Support, Remote DBA, Training & Services
--
Sent via pgsql-docs mailing list ([email protected])
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-docs
^ permalink raw reply [nested|flat] 86+ messages in thread
* Re: Docbook 5.x
2016-04-20 14:30 Docbook 5.x Jürgen Purtz <[email protected]>
2016-05-03 19:34 ` Re: Docbook 5.x Alvaro Herrera <[email protected]>
2016-05-03 20:13 ` Re: Docbook 5.x Oleg Bartunov <[email protected]>
2016-05-04 00:44 ` Re: Docbook 5.x Peter Eisentraut <[email protected]>
2016-05-05 04:45 ` Re: Docbook 5.x Alexander Law <[email protected]>
2016-06-03 19:31 ` Re: Docbook 5.x Peter Eisentraut <[email protected]>
2016-06-04 14:28 ` Re: Docbook 5.x Alexander Law <[email protected]>
2016-06-06 12:28 ` Re: Docbook 5.x Peter Eisentraut <[email protected]>
2016-08-18 17:56 ` Re: Docbook 5.x Peter Eisentraut <[email protected]>
2016-08-19 13:14 ` Re: Docbook 5.x Alexander Law <[email protected]>
2016-08-22 18:06 ` Re: Docbook 5.x Peter Eisentraut <[email protected]>
2016-08-23 14:23 ` Re: Docbook 5.x Alexander Law <[email protected]>
2016-09-14 11:18 ` Re: Docbook 5.x Alexander Law <[email protected]>
2016-11-08 13:25 ` Re: Docbook 5.x Peter Eisentraut <[email protected]>
2016-11-09 10:00 ` Re: Docbook 5.x Alexander Law <[email protected]>
2016-11-16 11:30 ` Re: Docbook 5.x Alexander Law <[email protected]>
2017-02-28 08:55 ` Re: Docbook 5.x Alexander Law <[email protected]>
2017-09-06 15:54 ` Re: Docbook 5.x Peter Eisentraut <[email protected]>
@ 2017-09-08 12:30 ` Alexander Lakhin <[email protected]>
2017-09-10 22:59 ` Re: Docbook 5.x Thomas Munro <[email protected]>
2017-09-15 14:32 ` Re: Docbook 5.x Peter Eisentraut <[email protected]>
0 siblings, 2 replies; 86+ messages in thread
From: Alexander Lakhin @ 2017-09-08 12:30 UTC (permalink / raw)
To: Peter Eisentraut <[email protected]>; +Cc: [email protected]; Alvaro Herrera <[email protected]>; Jürgen Purtz <[email protected]>; pgsql-docs
Hello,
06.09.2017 18:54, Peter Eisentraut 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).
Best regards,
Alexander
--
Sent via pgsql-docs mailing list ([email protected])
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-docs
Attachments:
[application/x-bzip] pg-doc.check.tar.bz2 (21.4K, 2-pg-doc.check.tar.bz2)
download
^ permalink raw reply [nested|flat] 86+ messages in thread
* Re: Docbook 5.x
2016-04-20 14:30 Docbook 5.x Jürgen Purtz <[email protected]>
2016-05-03 19:34 ` Re: Docbook 5.x Alvaro Herrera <[email protected]>
2016-05-03 20:13 ` Re: Docbook 5.x Oleg Bartunov <[email protected]>
2016-05-04 00:44 ` Re: Docbook 5.x Peter Eisentraut <[email protected]>
2016-05-05 04:45 ` Re: Docbook 5.x Alexander Law <[email protected]>
2016-06-03 19:31 ` Re: Docbook 5.x Peter Eisentraut <[email protected]>
2016-06-04 14:28 ` Re: Docbook 5.x Alexander Law <[email protected]>
2016-06-06 12:28 ` Re: Docbook 5.x Peter Eisentraut <[email protected]>
2016-08-18 17:56 ` Re: Docbook 5.x Peter Eisentraut <[email protected]>
2016-08-19 13:14 ` Re: Docbook 5.x Alexander Law <[email protected]>
2016-08-22 18:06 ` Re: Docbook 5.x Peter Eisentraut <[email protected]>
2016-08-23 14:23 ` Re: Docbook 5.x Alexander Law <[email protected]>
2016-09-14 11:18 ` Re: Docbook 5.x Alexander Law <[email protected]>
2016-11-08 13:25 ` Re: Docbook 5.x Peter Eisentraut <[email protected]>
2016-11-09 10:00 ` Re: Docbook 5.x Alexander Law <[email protected]>
2016-11-16 11:30 ` Re: Docbook 5.x Alexander Law <[email protected]>
2017-02-28 08:55 ` Re: Docbook 5.x Alexander Law <[email protected]>
2017-09-06 15:54 ` Re: Docbook 5.x Peter Eisentraut <[email protected]>
2017-09-08 12:30 ` Re: Docbook 5.x Alexander Lakhin <[email protected]>
@ 2017-09-10 22:59 ` Thomas Munro <[email protected]>
1 sibling, 0 replies; 86+ messages in thread
From: Thomas Munro @ 2017-09-10 22:59 UTC (permalink / raw)
To: Alexander Lakhin <[email protected]>; +Cc: Peter Eisentraut <[email protected]>; Oleg Bartunov <[email protected]>; Alvaro Herrera <[email protected]>; Jürgen Purtz <[email protected]>; pgsql-docs
On Sat, Sep 9, 2017 at 12:30 AM, Alexander Lakhin <[email protected]> wrote:
> Hello,
>
> 06.09.2017 18:54, Peter Eisentraut 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).
Hi Alexander,
In future versions of this patch set, if there is a dependency between
the patches would you mind indicating the order to apply them, perhaps
with prefixes like "0001-"? That would be quite useful for humans who
aren't yet familiar enough with your patch set to guess the order, and
also for stupid patch testing robots:
== Fetched patches from message ID
f00bf53f-e6b5-a033-69be-0c63878f0d30%40gmail.com
== Applying on top of commit 3c435952176ae5d294b37e5963cd72ddb66edead
== Applying patches from tarball pg-doc.check.tar.bz2...
== Applying patch pg-doc.check/patches/sgml-xml/ecpg.patch...
== Applying patch pg-doc.check/patches/sgml-xml/func.patch...
== Applying patch
pg-doc.check/patches/sgml-xml/generate-errcodes-table.pl.patch...
== Applying patch pg-doc.check/patches/sgml-xml/pgtesttiming.patch...
== Applying patch pg-doc.check/patches/sgml-xml/release-10.patch...
1 out of 5 hunks FAILED -- saving rejects to file
doc/src/sgml/release-10.sgml.rej
Thanks!
--
Thomas Munro
http://www.enterprisedb.com
--
Sent via pgsql-docs mailing list ([email protected])
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-docs
^ permalink raw reply [nested|flat] 86+ messages in thread
* Re: Docbook 5.x
2016-04-20 14:30 Docbook 5.x Jürgen Purtz <[email protected]>
2016-05-03 19:34 ` Re: Docbook 5.x Alvaro Herrera <[email protected]>
2016-05-03 20:13 ` Re: Docbook 5.x Oleg Bartunov <[email protected]>
2016-05-04 00:44 ` Re: Docbook 5.x Peter Eisentraut <[email protected]>
2016-05-05 04:45 ` Re: Docbook 5.x Alexander Law <[email protected]>
2016-06-03 19:31 ` Re: Docbook 5.x Peter Eisentraut <[email protected]>
2016-06-04 14:28 ` Re: Docbook 5.x Alexander Law <[email protected]>
2016-06-06 12:28 ` Re: Docbook 5.x Peter Eisentraut <[email protected]>
2016-08-18 17:56 ` Re: Docbook 5.x Peter Eisentraut <[email protected]>
2016-08-19 13:14 ` Re: Docbook 5.x Alexander Law <[email protected]>
2016-08-22 18:06 ` Re: Docbook 5.x Peter Eisentraut <[email protected]>
2016-08-23 14:23 ` Re: Docbook 5.x Alexander Law <[email protected]>
2016-09-14 11:18 ` Re: Docbook 5.x Alexander Law <[email protected]>
2016-11-08 13:25 ` Re: Docbook 5.x Peter Eisentraut <[email protected]>
2016-11-09 10:00 ` Re: Docbook 5.x Alexander Law <[email protected]>
2016-11-16 11:30 ` Re: Docbook 5.x Alexander Law <[email protected]>
2017-02-28 08:55 ` Re: Docbook 5.x Alexander Law <[email protected]>
2017-09-06 15:54 ` Re: Docbook 5.x Peter Eisentraut <[email protected]>
2017-09-08 12:30 ` Re: Docbook 5.x Alexander Lakhin <[email protected]>
@ 2017-09-15 14:32 ` Peter Eisentraut <[email protected]>
2017-09-15 18:54 ` Re: Docbook 5.x Jürgen Purtz <[email protected]>
1 sibling, 1 reply; 86+ messages in thread
From: Peter Eisentraut @ 2017-09-15 14:32 UTC (permalink / raw)
To: Alexander Lakhin <[email protected]>; +Cc: Jürgen Purtz <[email protected]>; pgsql-docs
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 Eisentraut http://www.2ndQuadrant.com/
PostgreSQL Development, 24x7 Support, Remote DBA, Training & Services
From 9ebfd07205254bb81487d37cbf4ea31b275b9f94 Mon Sep 17 00:00:00 2001
From: Peter Eisentraut <[email protected]>
Date: Fri, 15 Sep 2017 10:17:37 -0400
Subject: [PATCH] Get rid of parameterized marked sections in SGML
Previously, we created a variant of the installation instructions for
producing the plain-text INSTALL file by marking up certain parts of
installation.sgml using SGML parameterized marked sections. Marked
sections will not work anymore in XML, so before we can convert the
documentation to XML, we need a new approach.
DocBook provides a "profiling" feature that allows selecting content
based on attributes, which would work here. But it imposes a noticeable
overhead when building the full documentation, and give that we recently
spent a fair amount of effort optimizing the documentation build time,
it seems sad to have to accept that.
So as an alternative, (1) we create our own mini-profiling layer that
adjusts just the text we want, and (2) assemble the pieces of content
that we want in the INSTALL file using XInclude. That way, there is no
overhead when building the full documentation and most of the "ugly"
stuff in installation.sgml can be removed and dealt with out of line.
---
doc/src/sgml/Makefile | 5 +-
doc/src/sgml/filelist.sgml | 9 --
doc/src/sgml/installation.sgml | 243 +++++------------------------------
doc/src/sgml/standalone-install.sgml | 28 ----
doc/src/sgml/standalone-install.xml | 167 ++++++++++++++++++++++++
doc/src/sgml/standalone-profile.xsl | 81 ++++++++++++
6 files changed, 280 insertions(+), 253 deletions(-)
delete mode 100644 doc/src/sgml/standalone-install.sgml
create mode 100644 doc/src/sgml/standalone-install.xml
create mode 100644 doc/src/sgml/standalone-profile.xsl
diff --git a/doc/src/sgml/Makefile b/doc/src/sgml/Makefile
index 7458ef4de2..128d827c1a 100644
--- a/doc/src/sgml/Makefile
+++ b/doc/src/sgml/Makefile
@@ -134,9 +134,8 @@ INSTALL.html: %.html : stylesheet-text.xsl %.xml
$(XMLLINT) --noout --valid $*.xml
$(XSLTPROC) $(XSLTPROCFLAGS) $(XSLTPROC_HTML_FLAGS) $^ >$@
-INSTALL.xml: standalone-install.sgml installation.sgml version.sgml
- $(OSX) $(SPFLAGS) $(SGMLINCLUDE) -x lower $(filter-out version.sgml,$^) >[email protected]
- $(call mangle-xml,chapter)
+INSTALL.xml: standalone-profile.xsl standalone-install.xml postgres.xml
+ $(XSLTPROC) $(XSLTPROCFLAGS) --xinclude $(wordlist 1,2,$^) >$@
##
diff --git a/doc/src/sgml/filelist.sgml b/doc/src/sgml/filelist.sgml
index b914086009..bb93448c37 100644
--- a/doc/src/sgml/filelist.sgml
+++ b/doc/src/sgml/filelist.sgml
@@ -191,12 +191,3 @@
<!-- back matter -->
<!ENTITY biblio SYSTEM "biblio.sgml">
-
-<!--
- Some parts of the documentation are also source for some plain-text
- files used during installation. To selectively ignore or include
- some parts (e.g., external xref's) when generating these files we use
- these parameter entities. See also standalone-install.sgml.
- -->
-<!ENTITY % standalone-ignore "INCLUDE">
-<!ENTITY % standalone-include "IGNORE">
diff --git a/doc/src/sgml/installation.sgml b/doc/src/sgml/installation.sgml
index 12866b4bf7..17079c5fa4 100644
--- a/doc/src/sgml/installation.sgml
+++ b/doc/src/sgml/installation.sgml
@@ -1,28 +1,26 @@
<!-- doc/src/sgml/installation.sgml -->
<!--
-Use </link> not just </> so INSTALL.html can be created without links
-to the main documentation. Don't use <xref>; or if you must, wrap it
-in a standalone-ignore clause.
+The standalone version has some portions that are different from the version
+that is integrated into the full documentation set, in particular as regards
+links, so that INSTALL.html can be created without links to the main
+documentation. See standalone-profile.xsl for details.
-->
<chapter id="installation">
- <title><![%standalone-include[<productname>PostgreSQL</>]]>
- Installation from Source Code</title>
+ <title>Installation from Source Code</title>
<indexterm zone="installation">
<primary>installation</primary>
</indexterm>
<para>
- This <![%standalone-include;[document]]>
- <![%standalone-ignore;[chapter]]> describes the installation of
+ This <phrase>chapter</phrase> describes the installation of
<productname>PostgreSQL</productname> using the source code
distribution. (If you are installing a pre-packaged distribution,
such as an RPM or Debian package, ignore this
- <![%standalone-include;[document]]>
- <![%standalone-ignore;[chapter]]>
+ <phrase>chapter</phrase>
and read the packager's instructions instead.)
</para>
@@ -45,8 +43,7 @@ <title>Short Version</title>
/usr/local/pgsql/bin/psql test
</synopsis>
The long version is the rest of this
- <![%standalone-include;[document.]]>
- <![%standalone-ignore;[chapter.]]>
+ <phrase>chapter</phrase>.
</para>
</sect1>
@@ -197,8 +194,7 @@ <title>Requirements</title>
required version is <productname>Python</productname> 2.4.
<productname>Python 3</productname> is supported if it's
version 3.1 or later; but see
- <![%standalone-include[the <application>PL/Python</> documentation]]>
- <![%standalone-ignore[<xref linkend="plpython-python23">]]>
+ <xref linkend="plpython-python23">
when using Python 3.
</para>
@@ -267,9 +263,7 @@ <title>Requirements</title>
<para>
To build the <productname>PostgreSQL</productname> documentation,
there is a separate set of requirements; see
- <![%standalone-ignore;[<xref linkend="docguide-toolsets">.]]>
- <![%standalone-include;[the main documentation's appendix on
- documentation.]]>
+ <xref linkend="docguide-toolsets">.
</para>
</listitem>
</itemizedlist>
@@ -340,7 +334,6 @@ <title>Requirements</title>
</para>
</sect1>
-<![%standalone-ignore;[
<sect1 id="install-getsource">
<title>Getting The Source</title>
@@ -369,7 +362,6 @@ <title>Getting The Source</title>
<xref linkend="sourcerepo">.
</para>
</sect1>
-]]>
<sect1 id="install-procedure">
<title>Installation Procedure</title>
@@ -844,9 +836,8 @@ <title>Configuration</title>
<para>
Build with <acronym>LDAP</><indexterm><primary>LDAP</></>
support for authentication and connection parameter lookup (see
- <![%standalone-include[the documentation about client authentication
- and libpq]]><![%standalone-ignore[<xref linkend="libpq-ldap"> and
- <xref linkend="auth-ldap">]]> for more information). On Unix,
+ <phrase id="install-ldap-links"><xref linkend="libpq-ldap"> and
+ <xref linkend="auth-ldap"></phrase> for more information). On Unix,
this requires the <productname>OpenLDAP</> package to be
installed. On Windows, the default <productname>WinLDAP</>
library is used. <filename>configure</> will check for the required
@@ -865,8 +856,8 @@ <title>Configuration</title>
for <application>systemd</application><indexterm><primary>systemd</primary></indexterm>
service notifications. This improves integration if the server binary
is started under <application>systemd</application> but has no impact
- otherwise<![%standalone-ignore[; see <xref linkend="server-start"> for more
- information]]>. <application>libsystemd</application> and the
+ otherwise<phrase condition="standalone-ignore">; see <xref linkend="server-start"> for more
+ information</phrase>. <application>libsystemd</application> and the
associated header files need to be installed to be able to use this
option.
</para>
@@ -911,8 +902,7 @@ <title>Configuration</title>
<term><option>--with-uuid=<replaceable>LIBRARY</replaceable></option></term>
<listitem>
<para>
- Build the <![%standalone-include[uuid-ossp]]>
- <![%standalone-ignore[<xref linkend="uuid-ossp">]]> module
+ Build the <xref linkend="uuid-ossp"> module
(which provides functions to generate UUIDs), using the specified
UUID library.<indexterm><primary>UUID</primary></indexterm>
<replaceable>LIBRARY</replaceable> must be one of:
@@ -979,8 +969,7 @@ <title>Configuration</title>
<listitem>
<para>
Use libxslt when building the
- <![%standalone-include[xml2]]>
- <![%standalone-ignore[<xref linkend="xml2">]]>
+ <xref linkend="xml2">
module. <application>xml2</> relies on this library
to perform XSL transformations of XML.
</para>
@@ -1110,8 +1099,7 @@ <title>Configuration</title>
has no support for strong random numbers on the platform.
A source of random numbers is needed for some authentication
protocols, as well as some routines in the
- <![%standalone-include[pgcrypto]]>
- <![%standalone-ignore[<xref linkend="pgcrypto">]]>
+ <xref linkend="pgcrypto">
module. <option>--disable-strong-random</option> disables functionality that
requires cryptographically strong random numbers, and substitutes
a weak pseudo-random-number-generator for the generation of
@@ -1215,8 +1203,8 @@ <title>Configuration</title>
code coverage testing instrumentation. When run, they
generate files in the build directory with code coverage
metrics.
- <![%standalone-ignore[See <xref linkend="regress-coverage">
- for more information.]]> This option is for use only with GCC
+ <phrase condition="standalone-ignore">See <xref linkend="regress-coverage">
+ for more information.</phrase> This option is for use only with GCC
and when doing development work.
</para>
</listitem>
@@ -1276,8 +1264,8 @@ <title>Configuration</title>
</indexterm>
Compiles <productname>PostgreSQL</productname> with support for the
dynamic tracing tool DTrace.
- <![%standalone-ignore[See <xref linkend="dynamic-trace">
- for more information.]]>
+ <phrase condition="standalone-ignore">See <xref linkend="dynamic-trace">
+ for more information.</phrase>
</para>
<para>
@@ -1312,7 +1300,7 @@ <title>Configuration</title>
<para>
Enable tests using the Perl TAP tools. This requires a Perl
installation and the Perl module <literal>IPC::Run</literal>.
- <![%standalone-ignore;[See <xref linkend="regress-tap"> for more information.]]>
+ <phrase condition="standalone-ignore">See <xref linkend="regress-tap"> for more information.</phrase>
</para>
</listitem>
</varlistentry>
@@ -1469,9 +1457,7 @@ <title>Configuration</title>
whether Python 2 or 3 is specified here (or otherwise
implicitly chosen) determines which variant of the PL/Python
language becomes available. See
- <![%standalone-include[the <application>PL/Python</>
- documentation]]>
- <![%standalone-ignore[<xref linkend="plpython-python23">]]>
+ <xref linkend="plpython-python23">
for more information.
</para>
</listitem>
@@ -1598,10 +1584,7 @@ <title>Regression Tests</title>
<userinput>make check</userinput>
</screen>
(This won't work as root; do it as an unprivileged user.)
- <![%standalone-include[The file
- <filename>src/test/regress/README</> and the
- documentation contain]]>
- <![%standalone-ignore[<xref linkend="regress"> contains]]>
+ See <xref linkend="regress"> for
detailed information about interpreting the test results. You can
repeat this test at any later time by issuing the same command.
</para>
@@ -1613,8 +1596,7 @@ <title>Installing the Files</title>
<note>
<para>
If you are upgrading an existing system be sure to read
- <![%standalone-include[the documentation,]]>
- <![%standalone-ignore[<xref linkend="upgrading">]]>
+ <xref linkend="upgrading">,
which has instructions about upgrading a
cluster.
</para>
@@ -1872,167 +1854,6 @@ <title>Environment Variables</title>
</sect2>
</sect1>
-
-<![%standalone-include;[
- <sect1 id="install-getting-started">
- <title>Getting Started</title>
-
- <para>
- The following is a quick summary of how to get <productname>PostgreSQL</> up and
- running once installed. The main documentation contains more information.
- </para>
-
- <procedure>
- <step>
- <para>
- Create a user account for the <productname>PostgreSQL</>
- server. This is the user the server will run as. For production
- use you should create a separate, unprivileged account
- (<quote>postgres</> is commonly used). If you do not have root
- access or just want to play around, your own user account is
- enough, but running the server as root is a security risk and
- will not work.
-<screen>
-<userinput>adduser postgres</>
-</screen>
- </para>
- </step>
-
- <step>
- <para>
- Create a database installation with the <command>initdb</>
- command. To run <command>initdb</> you must be logged in to your
- <productname>PostgreSQL</> server account. It will not work as
- root.
-<screen>
-root# <userinput>mkdir /usr/local/pgsql/data</>
-root# <userinput>chown postgres /usr/local/pgsql/data</>
-root# <userinput>su - postgres</>
-postgres$ <userinput>/usr/local/pgsql/bin/initdb -D /usr/local/pgsql/data</>
-</screen>
- </para>
-
- <para>
- The <option>-D</> option specifies the location where the data
- will be stored. You can use any path you want, it does not have
- to be under the installation directory. Just make sure that the
- server account can write to the directory (or create it, if it
- doesn't already exist) before starting <command>initdb</>, as
- illustrated here.
- </para>
- </step>
-
- <step>
- <para>
- At this point, if you did not use the <command>initdb</> <literal>-A</>
- option, you might want to modify <filename>pg_hba.conf</> to control
- local access to the server before you start it. The default is to
- trust all local users.
- </para>
- </step>
-
- <step>
- <para>
- The previous <command>initdb</> step should have told you how to
- start up the database server. Do so now. The command should look
- something like:
-<programlisting>
-/usr/local/pgsql/bin/postgres -D /usr/local/pgsql/data
-</programlisting>
- This will start the server in the foreground. To put the server
- in the background use something like:
-<programlisting>
-nohup /usr/local/pgsql/bin/postgres -D /usr/local/pgsql/data \
- </dev/null >>server.log 2>&1 </dev/null &
-</programlisting>
- </para>
-
- <para>
- To stop a server running in the background you can type:
-<programlisting>
-kill `cat /usr/local/pgsql/data/postmaster.pid`
-</programlisting>
- </para>
- </step>
-
- <step>
- <para>
- Create a database:
-<screen>
-<userinput>createdb testdb</>
-</screen>
- Then enter:
-<screen>
-<userinput>psql testdb</>
-</screen>
- to connect to that database. At the prompt you can enter SQL
- commands and start experimenting.
- </para>
- </step>
- </procedure>
- </sect1>
-
- <sect1 id="install-whatnow">
- <title>What Now?</title>
-
- <para>
- <itemizedlist>
- <listitem>
- <para>
- The <productname>PostgreSQL</> distribution contains a
- comprehensive documentation set, which you should read sometime.
- After installation, the documentation can be accessed by
- pointing your browser to
- <filename>/usr/local/pgsql/doc/html/index.html</>, unless you
- changed the installation directories.
- </para>
-
- <para>
- The first few chapters of the main documentation are the Tutorial,
- which should be your first reading if you are completely new to
- <acronym>SQL</> databases. If you are familiar with database
- concepts then you want to proceed with part on server
- administration, which contains information about how to set up
- the database server, database users, and authentication.
- </para>
- </listitem>
-
- <listitem>
- <para>
- Usually, you will want to modify your computer so that it will
- automatically start the database server whenever it boots. Some
- suggestions for this are in the documentation.
- </para>
- </listitem>
-
- <listitem>
- <para>
- Run the regression tests against the installed server (using
- <command>make installcheck</command>). If you didn't run the
- tests before installation, you should definitely do it now. This
- is also explained in the documentation.
- </para>
- </listitem>
-
- <listitem>
- <para>
- By default, <productname>PostgreSQL</> is configured to run on
- minimal hardware. This allows it to start up with almost any
- hardware configuration. The default configuration is, however,
- not designed for optimum performance. To achieve optimum
- performance, several server parameters must be adjusted, the two
- most common being <varname>shared_buffers</varname> and
- <varname>work_mem</varname>.
- Other parameters mentioned in the documentation also affect
- performance.
- </para>
- </listitem>
- </itemizedlist>
- </para>
- </sect1>
-]]>
-
-
<sect1 id="supported-platforms">
<title>Supported Platforms</title>
@@ -2090,9 +1911,7 @@ <title>Platform-specific Notes</title>
regarding the installation and setup of PostgreSQL. Be sure to
read the installation instructions, and in
particular <xref linkend="install-requirements"> as well. Also,
- check <![%standalone-include[the
- file <filename>src/test/regress/README</> and the documentation]]>
- <![%standalone-ignore[<xref linkend="regress">]]> regarding the
+ check <xref linkend="regress"> regarding the
interpretation of regression test results.
</para>
@@ -2443,7 +2262,7 @@ <title>Cygwin</title>
<para>
PostgreSQL can be built using Cygwin, a Linux-like environment for
Windows, but that method is inferior to the native Windows build
- <![%standalone-ignore[(see <xref linkend="install-windows">)]]> and
+ <phrase condition="standalone-ignore">(see <xref linkend="install-windows">)</phrase> and
running a server under Cygwin is no longer recommended.
</para>
@@ -2641,8 +2460,7 @@ <title>MinGW/Native Windows</title>
Microsoft's <productname>Visual C++</productname> compiler suite.
The MinGW build variant uses the normal build system described in
this chapter; the Visual C++ build works completely differently
- and is described in <![%standalone-include[the
- documentation]]><![%standalone-ignore[<xref linkend="install-windows">]]>.
+ and is described in <xref linkend="install-windows">.
It is a fully native build and uses no additional software like
MinGW. A ready-made installer is available on the main
PostgreSQL web site.
@@ -2803,9 +2621,8 @@ <title>Compiling for Optimal Performance</title>
<title>Using DTrace for Tracing PostgreSQL</title>
<para>
- Yes, using DTrace is possible. See <![%standalone-include[the
- documentation]]>
- <![%standalone-ignore[<xref linkend="dynamic-trace">]]> for further
+ Yes, using DTrace is possible. See
+ <xref linkend="dynamic-trace"> for further
information. You can also find more information in this
article: <ulink url="https://blogs.oracle.com/robertlor/entry/user_level_dtrace_probes_in"></ulink;.
</para>
diff --git a/doc/src/sgml/standalone-install.sgml b/doc/src/sgml/standalone-install.sgml
deleted file mode 100644
index 1942f9dc4c..0000000000
--- a/doc/src/sgml/standalone-install.sgml
+++ /dev/null
@@ -1,28 +0,0 @@
-<!-- doc/src/sgml/standalone-install.sgml -->
-
-<!--
-This file helps in generating the INSTALL text file that lives in the
-top level directory of the distribution.
--->
-
-<!DOCTYPE chapter PUBLIC "-//OASIS//DTD DocBook V4.2//EN" [
-
-<!ENTITY % version SYSTEM "version.sgml">
-%version;
-
-<!--
-The standalone version has some portions that are different from the
-version that is integrated into the full documentation set, in
-particular as regards links. The following are essentially SGML's
-equivalent of C's #ifdef and friends. The other end of this is in
-installation.sgml.
--->
-
- <!ENTITY % standalone-ignore "IGNORE">
- <!ENTITY % standalone-include "INCLUDE">
-
-<!--
-When you're building the full documentation set, you want to flip the
-IGNORE and INCLUDE.
--->
-]>
diff --git a/doc/src/sgml/standalone-install.xml b/doc/src/sgml/standalone-install.xml
new file mode 100644
index 0000000000..49d94c5187
--- /dev/null
+++ b/doc/src/sgml/standalone-install.xml
@@ -0,0 +1,167 @@
+<?xml version="1.0"?>
+<!DOCTYPE article PUBLIC "-//OASIS//DTD DocBook XML V4.2//EN" "http://www.oasis-open.org/docbook/xml/4.2/docbookx.dtd";
+<!--
+This file contains the stand-alone installation instructions that end up in
+the INSTALL file. This document stitches together parts of the installation
+instructions in the main documentation with some material that only appears
+in the stand-alone version.
+-->
+<article id="installation">
+ <title><productname>PostgreSQL</productname> Installation from Source Code</title>
+
+ <para>
+ This document describes the installation of
+ <productname>PostgreSQL</productname> using this source code distribution.
+ </para>
+
+ <xi:include href="postgres.xml" xpointer="install-short" xmlns:xi="http://www.w3.org/2001/XInclude"/;
+ <xi:include href="postgres.xml" xpointer="install-requirements" xmlns:xi="http://www.w3.org/2001/XInclude"/;
+ <xi:include href="postgres.xml" xpointer="install-procedure" xmlns:xi="http://www.w3.org/2001/XInclude"/;
+ <xi:include href="postgres.xml" xpointer="install-post" xmlns:xi="http://www.w3.org/2001/XInclude"/;
+
+ <sect1 id="install-getting-started">
+ <title>Getting Started</title>
+
+ <para>
+ The following is a quick summary of how to get <productname>PostgreSQL</productname> up and
+ running once installed. The main documentation contains more information.
+ </para>
+
+ <procedure>
+ <step>
+ <para>
+ Create a user account for the <productname>PostgreSQL</productname>
+ server. This is the user the server will run as. For production
+ use you should create a separate, unprivileged account
+ (<quote>postgres</quote> is commonly used). If you do not have root
+ access or just want to play around, your own user account is
+ enough, but running the server as root is a security risk and
+ will not work.
+<screen><userinput>adduser postgres</userinput></screen>
+ </para>
+ </step>
+
+ <step>
+ <para>
+ Create a database installation with the <command>initdb</command>
+ command. To run <command>initdb</command> you must be logged in to your
+ <productname>PostgreSQL</productname> server account. It will not work as
+ root.
+<screen>root# <userinput>mkdir /usr/local/pgsql/data</userinput>
+root# <userinput>chown postgres /usr/local/pgsql/data</userinput>
+root# <userinput>su - postgres</userinput>
+postgres$ <userinput>/usr/local/pgsql/bin/initdb -D /usr/local/pgsql/data</userinput></screen>
+ </para>
+
+ <para>
+ The <option>-D</option> option specifies the location where the data
+ will be stored. You can use any path you want, it does not have
+ to be under the installation directory. Just make sure that the
+ server account can write to the directory (or create it, if it
+ doesn't already exist) before starting <command>initdb</command>, as
+ illustrated here.
+ </para>
+ </step>
+
+ <step>
+ <para>
+ At this point, if you did not use the <command>initdb</command> <literal>-A</literal>
+ option, you might want to modify <filename>pg_hba.conf</filename> to control
+ local access to the server before you start it. The default is to
+ trust all local users.
+ </para>
+ </step>
+
+ <step>
+ <para>
+ The previous <command>initdb</command> step should have told you how to
+ start up the database server. Do so now. The command should look
+ something like:
+<programlisting>/usr/local/pgsql/bin/postgres -D /usr/local/pgsql/data</programlisting>
+ This will start the server in the foreground. To put the server
+ in the background use something like:
+<programlisting>nohup /usr/local/pgsql/bin/postgres -D /usr/local/pgsql/data \
+ </dev/null >>server.log 2>&1 </dev/null &</programlisting>
+ </para>
+
+ <para>
+ To stop a server running in the background you can type:
+<programlisting>kill `cat /usr/local/pgsql/data/postmaster.pid`</programlisting>
+ </para>
+ </step>
+
+ <step>
+ <para>
+ Create a database:
+<screen><userinput>createdb testdb</userinput></screen>
+ Then enter:
+<screen><userinput>psql testdb</userinput></screen>
+ to connect to that database. At the prompt you can enter SQL
+ commands and start experimenting.
+ </para>
+ </step>
+ </procedure>
+ </sect1>
+
+ <sect1 id="install-whatnow">
+ <title>What Now?</title>
+
+ <para>
+ <itemizedlist>
+ <listitem>
+ <para>
+ The <productname>PostgreSQL</productname> distribution contains a
+ comprehensive documentation set, which you should read sometime.
+ After installation, the documentation can be accessed by
+ pointing your browser to
+ <filename>/usr/local/pgsql/doc/html/index.html</filename>, unless you
+ changed the installation directories.
+ </para>
+
+ <para>
+ The first few chapters of the main documentation are the Tutorial,
+ which should be your first reading if you are completely new to
+ <acronym>SQL</acronym> databases. If you are familiar with database
+ concepts then you want to proceed with part on server
+ administration, which contains information about how to set up
+ the database server, database users, and authentication.
+ </para>
+ </listitem>
+
+ <listitem>
+ <para>
+ Usually, you will want to modify your computer so that it will
+ automatically start the database server whenever it boots. Some
+ suggestions for this are in the documentation.
+ </para>
+ </listitem>
+
+ <listitem>
+ <para>
+ Run the regression tests against the installed server (using
+ <command>make installcheck</command>). If you didn't run the
+ tests before installation, you should definitely do it now. This
+ is also explained in the documentation.
+ </para>
+ </listitem>
+
+ <listitem>
+ <para>
+ By default, <productname>PostgreSQL</productname> is configured to run on
+ minimal hardware. This allows it to start up with almost any
+ hardware configuration. The default configuration is, however,
+ not designed for optimum performance. To achieve optimum
+ performance, several server parameters must be adjusted, the two
+ most common being <varname>shared_buffers</varname> and
+ <varname>work_mem</varname>.
+ Other parameters mentioned in the documentation also affect
+ performance.
+ </para>
+ </listitem>
+ </itemizedlist>
+ </para>
+ </sect1>
+
+ <xi:include href="postgres.xml" xpointer="supported-platforms" xmlns:xi="http://www.w3.org/2001/XInclude"/;
+ <xi:include href="postgres.xml" xpointer="installation-platform-notes" xmlns:xi="http://www.w3.org/2001/XInclude"/;
+</article>
diff --git a/doc/src/sgml/standalone-profile.xsl b/doc/src/sgml/standalone-profile.xsl
new file mode 100644
index 0000000000..ff464c1654
--- /dev/null
+++ b/doc/src/sgml/standalone-profile.xsl
@@ -0,0 +1,81 @@
+<?xml version='1.0'?>
+<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform";
+ version="1.0">
+
+<!--
+This is a preprocessing layer to convert the installation instructions into a
+variant without links and references to the main documentation.
+
+- To omit something in the stand-alone INSTALL file, give the element a
+ condition="standalone-ignore" attribute.
+
+- If there is no element that exactly covers what you want to change, wrap it
+ in a <phrase> element, which otherwise does nothing.
+
+- Otherwise, write a custom rule below.
+-->
+
+<xsl:output
+ doctype-public="-//OASIS//DTD DocBook XML V4.2//EN"
+ doctype-system="http://www.oasis-open.org/docbook/xml/4.2/docbookx.dtd"/;
+
+<!-- copy everything by default -->
+
+<xsl:template match="@*|node()">
+ <xsl:copy>
+ <xsl:apply-templates select="@*|node()" />
+ </xsl:copy>
+</xsl:template>
+
+<!-- particular conversions -->
+
+<xsl:template match="*[@condition='standalone-ignore']">
+</xsl:template>
+
+<xsl:template match="phrase/text()['chapter']">
+ <xsl:text>document</xsl:text>
+</xsl:template>
+
+<xsl:template match="phrase[@id='install-ldap-links']">
+ <xsl:text>the documentation about client authentication and libpq</xsl:text>
+</xsl:template>
+
+<xsl:template match="xref[@linkend='docguide-toolsets']">
+ <xsl:text>the main documentation's appendix on documentation</xsl:text>
+</xsl:template>
+
+<xsl:template match="xref[@linkend='dynamic-trace']">
+ <xsl:text>the documentation</xsl:text>
+</xsl:template>
+
+<xsl:template match="xref[@linkend='install-windows']">
+ <xsl:text>the documentation</xsl:text>
+</xsl:template>
+
+<xsl:template match="xref[@linkend='pgcrypto']">
+ <xsl:text>pgcrypto</xsl:text>
+</xsl:template>
+
+<xsl:template match="xref[@linkend='plpython-python23']">
+ <xsl:text>the </xsl:text><application>PL/Python</application><xsl:text> documentation</xsl:text>
+</xsl:template>
+
+<xsl:template match="xref[@linkend='regress']">
+ <xsl:text>the file </xsl:text>
+ <filename>src/test/regress/README</filename>
+ <xsl:text> and the documentation</xsl:text>
+</xsl:template>
+
+<xsl:template match="xref[@linkend='upgrading']">
+ <xsl:text>the documentation</xsl:text>
+</xsl:template>
+
+<xsl:template match="xref[@linkend='uuid-ossp']">
+ <xsl:text>uuid-ossp</xsl:text>
+</xsl:template>
+
+<xsl:template match="xref[@linkend='xml2']">
+ <xsl:text>xml2</xsl:text>
+</xsl:template>
+
+</xsl:stylesheet>
--
2.11.0 (Apple Git-81)
--
Sent via pgsql-docs mailing list ([email protected])
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-docs
Attachments:
[text/plain] 0001-Get-rid-of-parameterized-marked-sections-in-SGML.patch (29.7K, 2-0001-Get-rid-of-parameterized-marked-sections-in-SGML.patch)
download | inline diff:
From 9ebfd07205254bb81487d37cbf4ea31b275b9f94 Mon Sep 17 00:00:00 2001
From: Peter Eisentraut <[email protected]>
Date: Fri, 15 Sep 2017 10:17:37 -0400
Subject: [PATCH] Get rid of parameterized marked sections in SGML
Previously, we created a variant of the installation instructions for
producing the plain-text INSTALL file by marking up certain parts of
installation.sgml using SGML parameterized marked sections. Marked
sections will not work anymore in XML, so before we can convert the
documentation to XML, we need a new approach.
DocBook provides a "profiling" feature that allows selecting content
based on attributes, which would work here. But it imposes a noticeable
overhead when building the full documentation, and give that we recently
spent a fair amount of effort optimizing the documentation build time,
it seems sad to have to accept that.
So as an alternative, (1) we create our own mini-profiling layer that
adjusts just the text we want, and (2) assemble the pieces of content
that we want in the INSTALL file using XInclude. That way, there is no
overhead when building the full documentation and most of the "ugly"
stuff in installation.sgml can be removed and dealt with out of line.
---
doc/src/sgml/Makefile | 5 +-
doc/src/sgml/filelist.sgml | 9 --
doc/src/sgml/installation.sgml | 243 +++++------------------------------
doc/src/sgml/standalone-install.sgml | 28 ----
doc/src/sgml/standalone-install.xml | 167 ++++++++++++++++++++++++
doc/src/sgml/standalone-profile.xsl | 81 ++++++++++++
6 files changed, 280 insertions(+), 253 deletions(-)
delete mode 100644 doc/src/sgml/standalone-install.sgml
create mode 100644 doc/src/sgml/standalone-install.xml
create mode 100644 doc/src/sgml/standalone-profile.xsl
diff --git a/doc/src/sgml/Makefile b/doc/src/sgml/Makefile
index 7458ef4de2..128d827c1a 100644
--- a/doc/src/sgml/Makefile
+++ b/doc/src/sgml/Makefile
@@ -134,9 +134,8 @@ INSTALL.html: %.html : stylesheet-text.xsl %.xml
$(XMLLINT) --noout --valid $*.xml
$(XSLTPROC) $(XSLTPROCFLAGS) $(XSLTPROC_HTML_FLAGS) $^ >$@
-INSTALL.xml: standalone-install.sgml installation.sgml version.sgml
- $(OSX) $(SPFLAGS) $(SGMLINCLUDE) -x lower $(filter-out version.sgml,$^) >[email protected]
- $(call mangle-xml,chapter)
+INSTALL.xml: standalone-profile.xsl standalone-install.xml postgres.xml
+ $(XSLTPROC) $(XSLTPROCFLAGS) --xinclude $(wordlist 1,2,$^) >$@
##
diff --git a/doc/src/sgml/filelist.sgml b/doc/src/sgml/filelist.sgml
index b914086009..bb93448c37 100644
--- a/doc/src/sgml/filelist.sgml
+++ b/doc/src/sgml/filelist.sgml
@@ -191,12 +191,3 @@
<!-- back matter -->
<!ENTITY biblio SYSTEM "biblio.sgml">
-
-<!--
- Some parts of the documentation are also source for some plain-text
- files used during installation. To selectively ignore or include
- some parts (e.g., external xref's) when generating these files we use
- these parameter entities. See also standalone-install.sgml.
- -->
-<!ENTITY % standalone-ignore "INCLUDE">
-<!ENTITY % standalone-include "IGNORE">
diff --git a/doc/src/sgml/installation.sgml b/doc/src/sgml/installation.sgml
index 12866b4bf7..17079c5fa4 100644
--- a/doc/src/sgml/installation.sgml
+++ b/doc/src/sgml/installation.sgml
@@ -1,28 +1,26 @@
<!-- doc/src/sgml/installation.sgml -->
<!--
-Use </link> not just </> so INSTALL.html can be created without links
-to the main documentation. Don't use <xref>; or if you must, wrap it
-in a standalone-ignore clause.
+The standalone version has some portions that are different from the version
+that is integrated into the full documentation set, in particular as regards
+links, so that INSTALL.html can be created without links to the main
+documentation. See standalone-profile.xsl for details.
-->
<chapter id="installation">
- <title><![%standalone-include[<productname>PostgreSQL</>]]>
- Installation from Source Code</title>
+ <title>Installation from Source Code</title>
<indexterm zone="installation">
<primary>installation</primary>
</indexterm>
<para>
- This <![%standalone-include;[document]]>
- <![%standalone-ignore;[chapter]]> describes the installation of
+ This <phrase>chapter</phrase> describes the installation of
<productname>PostgreSQL</productname> using the source code
distribution. (If you are installing a pre-packaged distribution,
such as an RPM or Debian package, ignore this
- <![%standalone-include;[document]]>
- <![%standalone-ignore;[chapter]]>
+ <phrase>chapter</phrase>
and read the packager's instructions instead.)
</para>
@@ -45,8 +43,7 @@ <title>Short Version</title>
/usr/local/pgsql/bin/psql test
</synopsis>
The long version is the rest of this
- <![%standalone-include;[document.]]>
- <![%standalone-ignore;[chapter.]]>
+ <phrase>chapter</phrase>.
</para>
</sect1>
@@ -197,8 +194,7 @@ <title>Requirements</title>
required version is <productname>Python</productname> 2.4.
<productname>Python 3</productname> is supported if it's
version 3.1 or later; but see
- <![%standalone-include[the <application>PL/Python</> documentation]]>
- <![%standalone-ignore[<xref linkend="plpython-python23">]]>
+ <xref linkend="plpython-python23">
when using Python 3.
</para>
@@ -267,9 +263,7 @@ <title>Requirements</title>
<para>
To build the <productname>PostgreSQL</productname> documentation,
there is a separate set of requirements; see
- <![%standalone-ignore;[<xref linkend="docguide-toolsets">.]]>
- <![%standalone-include;[the main documentation's appendix on
- documentation.]]>
+ <xref linkend="docguide-toolsets">.
</para>
</listitem>
</itemizedlist>
@@ -340,7 +334,6 @@ <title>Requirements</title>
</para>
</sect1>
-<![%standalone-ignore;[
<sect1 id="install-getsource">
<title>Getting The Source</title>
@@ -369,7 +362,6 @@ <title>Getting The Source</title>
<xref linkend="sourcerepo">.
</para>
</sect1>
-]]>
<sect1 id="install-procedure">
<title>Installation Procedure</title>
@@ -844,9 +836,8 @@ <title>Configuration</title>
<para>
Build with <acronym>LDAP</><indexterm><primary>LDAP</></>
support for authentication and connection parameter lookup (see
- <![%standalone-include[the documentation about client authentication
- and libpq]]><![%standalone-ignore[<xref linkend="libpq-ldap"> and
- <xref linkend="auth-ldap">]]> for more information). On Unix,
+ <phrase id="install-ldap-links"><xref linkend="libpq-ldap"> and
+ <xref linkend="auth-ldap"></phrase> for more information). On Unix,
this requires the <productname>OpenLDAP</> package to be
installed. On Windows, the default <productname>WinLDAP</>
library is used. <filename>configure</> will check for the required
@@ -865,8 +856,8 @@ <title>Configuration</title>
for <application>systemd</application><indexterm><primary>systemd</primary></indexterm>
service notifications. This improves integration if the server binary
is started under <application>systemd</application> but has no impact
- otherwise<![%standalone-ignore[; see <xref linkend="server-start"> for more
- information]]>. <application>libsystemd</application> and the
+ otherwise<phrase condition="standalone-ignore">; see <xref linkend="server-start"> for more
+ information</phrase>. <application>libsystemd</application> and the
associated header files need to be installed to be able to use this
option.
</para>
@@ -911,8 +902,7 @@ <title>Configuration</title>
<term><option>--with-uuid=<replaceable>LIBRARY</replaceable></option></term>
<listitem>
<para>
- Build the <![%standalone-include[uuid-ossp]]>
- <![%standalone-ignore[<xref linkend="uuid-ossp">]]> module
+ Build the <xref linkend="uuid-ossp"> module
(which provides functions to generate UUIDs), using the specified
UUID library.<indexterm><primary>UUID</primary></indexterm>
<replaceable>LIBRARY</replaceable> must be one of:
@@ -979,8 +969,7 @@ <title>Configuration</title>
<listitem>
<para>
Use libxslt when building the
- <![%standalone-include[xml2]]>
- <![%standalone-ignore[<xref linkend="xml2">]]>
+ <xref linkend="xml2">
module. <application>xml2</> relies on this library
to perform XSL transformations of XML.
</para>
@@ -1110,8 +1099,7 @@ <title>Configuration</title>
has no support for strong random numbers on the platform.
A source of random numbers is needed for some authentication
protocols, as well as some routines in the
- <![%standalone-include[pgcrypto]]>
- <![%standalone-ignore[<xref linkend="pgcrypto">]]>
+ <xref linkend="pgcrypto">
module. <option>--disable-strong-random</option> disables functionality that
requires cryptographically strong random numbers, and substitutes
a weak pseudo-random-number-generator for the generation of
@@ -1215,8 +1203,8 @@ <title>Configuration</title>
code coverage testing instrumentation. When run, they
generate files in the build directory with code coverage
metrics.
- <![%standalone-ignore[See <xref linkend="regress-coverage">
- for more information.]]> This option is for use only with GCC
+ <phrase condition="standalone-ignore">See <xref linkend="regress-coverage">
+ for more information.</phrase> This option is for use only with GCC
and when doing development work.
</para>
</listitem>
@@ -1276,8 +1264,8 @@ <title>Configuration</title>
</indexterm>
Compiles <productname>PostgreSQL</productname> with support for the
dynamic tracing tool DTrace.
- <![%standalone-ignore[See <xref linkend="dynamic-trace">
- for more information.]]>
+ <phrase condition="standalone-ignore">See <xref linkend="dynamic-trace">
+ for more information.</phrase>
</para>
<para>
@@ -1312,7 +1300,7 @@ <title>Configuration</title>
<para>
Enable tests using the Perl TAP tools. This requires a Perl
installation and the Perl module <literal>IPC::Run</literal>.
- <![%standalone-ignore;[See <xref linkend="regress-tap"> for more information.]]>
+ <phrase condition="standalone-ignore">See <xref linkend="regress-tap"> for more information.</phrase>
</para>
</listitem>
</varlistentry>
@@ -1469,9 +1457,7 @@ <title>Configuration</title>
whether Python 2 or 3 is specified here (or otherwise
implicitly chosen) determines which variant of the PL/Python
language becomes available. See
- <![%standalone-include[the <application>PL/Python</>
- documentation]]>
- <![%standalone-ignore[<xref linkend="plpython-python23">]]>
+ <xref linkend="plpython-python23">
for more information.
</para>
</listitem>
@@ -1598,10 +1584,7 @@ <title>Regression Tests</title>
<userinput>make check</userinput>
</screen>
(This won't work as root; do it as an unprivileged user.)
- <![%standalone-include[The file
- <filename>src/test/regress/README</> and the
- documentation contain]]>
- <![%standalone-ignore[<xref linkend="regress"> contains]]>
+ See <xref linkend="regress"> for
detailed information about interpreting the test results. You can
repeat this test at any later time by issuing the same command.
</para>
@@ -1613,8 +1596,7 @@ <title>Installing the Files</title>
<note>
<para>
If you are upgrading an existing system be sure to read
- <![%standalone-include[the documentation,]]>
- <![%standalone-ignore[<xref linkend="upgrading">]]>
+ <xref linkend="upgrading">,
which has instructions about upgrading a
cluster.
</para>
@@ -1872,167 +1854,6 @@ <title>Environment Variables</title>
</sect2>
</sect1>
-
-<![%standalone-include;[
- <sect1 id="install-getting-started">
- <title>Getting Started</title>
-
- <para>
- The following is a quick summary of how to get <productname>PostgreSQL</> up and
- running once installed. The main documentation contains more information.
- </para>
-
- <procedure>
- <step>
- <para>
- Create a user account for the <productname>PostgreSQL</>
- server. This is the user the server will run as. For production
- use you should create a separate, unprivileged account
- (<quote>postgres</> is commonly used). If you do not have root
- access or just want to play around, your own user account is
- enough, but running the server as root is a security risk and
- will not work.
-<screen>
-<userinput>adduser postgres</>
-</screen>
- </para>
- </step>
-
- <step>
- <para>
- Create a database installation with the <command>initdb</>
- command. To run <command>initdb</> you must be logged in to your
- <productname>PostgreSQL</> server account. It will not work as
- root.
-<screen>
-root# <userinput>mkdir /usr/local/pgsql/data</>
-root# <userinput>chown postgres /usr/local/pgsql/data</>
-root# <userinput>su - postgres</>
-postgres$ <userinput>/usr/local/pgsql/bin/initdb -D /usr/local/pgsql/data</>
-</screen>
- </para>
-
- <para>
- The <option>-D</> option specifies the location where the data
- will be stored. You can use any path you want, it does not have
- to be under the installation directory. Just make sure that the
- server account can write to the directory (or create it, if it
- doesn't already exist) before starting <command>initdb</>, as
- illustrated here.
- </para>
- </step>
-
- <step>
- <para>
- At this point, if you did not use the <command>initdb</> <literal>-A</>
- option, you might want to modify <filename>pg_hba.conf</> to control
- local access to the server before you start it. The default is to
- trust all local users.
- </para>
- </step>
-
- <step>
- <para>
- The previous <command>initdb</> step should have told you how to
- start up the database server. Do so now. The command should look
- something like:
-<programlisting>
-/usr/local/pgsql/bin/postgres -D /usr/local/pgsql/data
-</programlisting>
- This will start the server in the foreground. To put the server
- in the background use something like:
-<programlisting>
-nohup /usr/local/pgsql/bin/postgres -D /usr/local/pgsql/data \
- </dev/null >>server.log 2>&1 </dev/null &
-</programlisting>
- </para>
-
- <para>
- To stop a server running in the background you can type:
-<programlisting>
-kill `cat /usr/local/pgsql/data/postmaster.pid`
-</programlisting>
- </para>
- </step>
-
- <step>
- <para>
- Create a database:
-<screen>
-<userinput>createdb testdb</>
-</screen>
- Then enter:
-<screen>
-<userinput>psql testdb</>
-</screen>
- to connect to that database. At the prompt you can enter SQL
- commands and start experimenting.
- </para>
- </step>
- </procedure>
- </sect1>
-
- <sect1 id="install-whatnow">
- <title>What Now?</title>
-
- <para>
- <itemizedlist>
- <listitem>
- <para>
- The <productname>PostgreSQL</> distribution contains a
- comprehensive documentation set, which you should read sometime.
- After installation, the documentation can be accessed by
- pointing your browser to
- <filename>/usr/local/pgsql/doc/html/index.html</>, unless you
- changed the installation directories.
- </para>
-
- <para>
- The first few chapters of the main documentation are the Tutorial,
- which should be your first reading if you are completely new to
- <acronym>SQL</> databases. If you are familiar with database
- concepts then you want to proceed with part on server
- administration, which contains information about how to set up
- the database server, database users, and authentication.
- </para>
- </listitem>
-
- <listitem>
- <para>
- Usually, you will want to modify your computer so that it will
- automatically start the database server whenever it boots. Some
- suggestions for this are in the documentation.
- </para>
- </listitem>
-
- <listitem>
- <para>
- Run the regression tests against the installed server (using
- <command>make installcheck</command>). If you didn't run the
- tests before installation, you should definitely do it now. This
- is also explained in the documentation.
- </para>
- </listitem>
-
- <listitem>
- <para>
- By default, <productname>PostgreSQL</> is configured to run on
- minimal hardware. This allows it to start up with almost any
- hardware configuration. The default configuration is, however,
- not designed for optimum performance. To achieve optimum
- performance, several server parameters must be adjusted, the two
- most common being <varname>shared_buffers</varname> and
- <varname>work_mem</varname>.
- Other parameters mentioned in the documentation also affect
- performance.
- </para>
- </listitem>
- </itemizedlist>
- </para>
- </sect1>
-]]>
-
-
<sect1 id="supported-platforms">
<title>Supported Platforms</title>
@@ -2090,9 +1911,7 @@ <title>Platform-specific Notes</title>
regarding the installation and setup of PostgreSQL. Be sure to
read the installation instructions, and in
particular <xref linkend="install-requirements"> as well. Also,
- check <![%standalone-include[the
- file <filename>src/test/regress/README</> and the documentation]]>
- <![%standalone-ignore[<xref linkend="regress">]]> regarding the
+ check <xref linkend="regress"> regarding the
interpretation of regression test results.
</para>
@@ -2443,7 +2262,7 @@ <title>Cygwin</title>
<para>
PostgreSQL can be built using Cygwin, a Linux-like environment for
Windows, but that method is inferior to the native Windows build
- <![%standalone-ignore[(see <xref linkend="install-windows">)]]> and
+ <phrase condition="standalone-ignore">(see <xref linkend="install-windows">)</phrase> and
running a server under Cygwin is no longer recommended.
</para>
@@ -2641,8 +2460,7 @@ <title>MinGW/Native Windows</title>
Microsoft's <productname>Visual C++</productname> compiler suite.
The MinGW build variant uses the normal build system described in
this chapter; the Visual C++ build works completely differently
- and is described in <![%standalone-include[the
- documentation]]><![%standalone-ignore[<xref linkend="install-windows">]]>.
+ and is described in <xref linkend="install-windows">.
It is a fully native build and uses no additional software like
MinGW. A ready-made installer is available on the main
PostgreSQL web site.
@@ -2803,9 +2621,8 @@ <title>Compiling for Optimal Performance</title>
<title>Using DTrace for Tracing PostgreSQL</title>
<para>
- Yes, using DTrace is possible. See <![%standalone-include[the
- documentation]]>
- <![%standalone-ignore[<xref linkend="dynamic-trace">]]> for further
+ Yes, using DTrace is possible. See
+ <xref linkend="dynamic-trace"> for further
information. You can also find more information in this
article: <ulink url="https://blogs.oracle.com/robertlor/entry/user_level_dtrace_probes_in"></ulink>.
</para>
diff --git a/doc/src/sgml/standalone-install.sgml b/doc/src/sgml/standalone-install.sgml
deleted file mode 100644
index 1942f9dc4c..0000000000
--- a/doc/src/sgml/standalone-install.sgml
+++ /dev/null
@@ -1,28 +0,0 @@
-<!-- doc/src/sgml/standalone-install.sgml -->
-
-<!--
-This file helps in generating the INSTALL text file that lives in the
-top level directory of the distribution.
--->
-
-<!DOCTYPE chapter PUBLIC "-//OASIS//DTD DocBook V4.2//EN" [
-
-<!ENTITY % version SYSTEM "version.sgml">
-%version;
-
-<!--
-The standalone version has some portions that are different from the
-version that is integrated into the full documentation set, in
-particular as regards links. The following are essentially SGML's
-equivalent of C's #ifdef and friends. The other end of this is in
-installation.sgml.
--->
-
- <!ENTITY % standalone-ignore "IGNORE">
- <!ENTITY % standalone-include "INCLUDE">
-
-<!--
-When you're building the full documentation set, you want to flip the
-IGNORE and INCLUDE.
--->
-]>
diff --git a/doc/src/sgml/standalone-install.xml b/doc/src/sgml/standalone-install.xml
new file mode 100644
index 0000000000..49d94c5187
--- /dev/null
+++ b/doc/src/sgml/standalone-install.xml
@@ -0,0 +1,167 @@
+<?xml version="1.0"?>
+<!DOCTYPE article PUBLIC "-//OASIS//DTD DocBook XML V4.2//EN" "http://www.oasis-open.org/docbook/xml/4.2/docbookx.dtd">
+<!--
+This file contains the stand-alone installation instructions that end up in
+the INSTALL file. This document stitches together parts of the installation
+instructions in the main documentation with some material that only appears
+in the stand-alone version.
+-->
+<article id="installation">
+ <title><productname>PostgreSQL</productname> Installation from Source Code</title>
+
+ <para>
+ This document describes the installation of
+ <productname>PostgreSQL</productname> using this source code distribution.
+ </para>
+
+ <xi:include href="postgres.xml" xpointer="install-short" xmlns:xi="http://www.w3.org/2001/XInclude"/>
+ <xi:include href="postgres.xml" xpointer="install-requirements" xmlns:xi="http://www.w3.org/2001/XInclude"/>
+ <xi:include href="postgres.xml" xpointer="install-procedure" xmlns:xi="http://www.w3.org/2001/XInclude"/>
+ <xi:include href="postgres.xml" xpointer="install-post" xmlns:xi="http://www.w3.org/2001/XInclude"/>
+
+ <sect1 id="install-getting-started">
+ <title>Getting Started</title>
+
+ <para>
+ The following is a quick summary of how to get <productname>PostgreSQL</productname> up and
+ running once installed. The main documentation contains more information.
+ </para>
+
+ <procedure>
+ <step>
+ <para>
+ Create a user account for the <productname>PostgreSQL</productname>
+ server. This is the user the server will run as. For production
+ use you should create a separate, unprivileged account
+ (<quote>postgres</quote> is commonly used). If you do not have root
+ access or just want to play around, your own user account is
+ enough, but running the server as root is a security risk and
+ will not work.
+<screen><userinput>adduser postgres</userinput></screen>
+ </para>
+ </step>
+
+ <step>
+ <para>
+ Create a database installation with the <command>initdb</command>
+ command. To run <command>initdb</command> you must be logged in to your
+ <productname>PostgreSQL</productname> server account. It will not work as
+ root.
+<screen>root# <userinput>mkdir /usr/local/pgsql/data</userinput>
+root# <userinput>chown postgres /usr/local/pgsql/data</userinput>
+root# <userinput>su - postgres</userinput>
+postgres$ <userinput>/usr/local/pgsql/bin/initdb -D /usr/local/pgsql/data</userinput></screen>
+ </para>
+
+ <para>
+ The <option>-D</option> option specifies the location where the data
+ will be stored. You can use any path you want, it does not have
+ to be under the installation directory. Just make sure that the
+ server account can write to the directory (or create it, if it
+ doesn't already exist) before starting <command>initdb</command>, as
+ illustrated here.
+ </para>
+ </step>
+
+ <step>
+ <para>
+ At this point, if you did not use the <command>initdb</command> <literal>-A</literal>
+ option, you might want to modify <filename>pg_hba.conf</filename> to control
+ local access to the server before you start it. The default is to
+ trust all local users.
+ </para>
+ </step>
+
+ <step>
+ <para>
+ The previous <command>initdb</command> step should have told you how to
+ start up the database server. Do so now. The command should look
+ something like:
+<programlisting>/usr/local/pgsql/bin/postgres -D /usr/local/pgsql/data</programlisting>
+ This will start the server in the foreground. To put the server
+ in the background use something like:
+<programlisting>nohup /usr/local/pgsql/bin/postgres -D /usr/local/pgsql/data \
+ </dev/null >>server.log 2>&1 </dev/null &</programlisting>
+ </para>
+
+ <para>
+ To stop a server running in the background you can type:
+<programlisting>kill `cat /usr/local/pgsql/data/postmaster.pid`</programlisting>
+ </para>
+ </step>
+
+ <step>
+ <para>
+ Create a database:
+<screen><userinput>createdb testdb</userinput></screen>
+ Then enter:
+<screen><userinput>psql testdb</userinput></screen>
+ to connect to that database. At the prompt you can enter SQL
+ commands and start experimenting.
+ </para>
+ </step>
+ </procedure>
+ </sect1>
+
+ <sect1 id="install-whatnow">
+ <title>What Now?</title>
+
+ <para>
+ <itemizedlist>
+ <listitem>
+ <para>
+ The <productname>PostgreSQL</productname> distribution contains a
+ comprehensive documentation set, which you should read sometime.
+ After installation, the documentation can be accessed by
+ pointing your browser to
+ <filename>/usr/local/pgsql/doc/html/index.html</filename>, unless you
+ changed the installation directories.
+ </para>
+
+ <para>
+ The first few chapters of the main documentation are the Tutorial,
+ which should be your first reading if you are completely new to
+ <acronym>SQL</acronym> databases. If you are familiar with database
+ concepts then you want to proceed with part on server
+ administration, which contains information about how to set up
+ the database server, database users, and authentication.
+ </para>
+ </listitem>
+
+ <listitem>
+ <para>
+ Usually, you will want to modify your computer so that it will
+ automatically start the database server whenever it boots. Some
+ suggestions for this are in the documentation.
+ </para>
+ </listitem>
+
+ <listitem>
+ <para>
+ Run the regression tests against the installed server (using
+ <command>make installcheck</command>). If you didn't run the
+ tests before installation, you should definitely do it now. This
+ is also explained in the documentation.
+ </para>
+ </listitem>
+
+ <listitem>
+ <para>
+ By default, <productname>PostgreSQL</productname> is configured to run on
+ minimal hardware. This allows it to start up with almost any
+ hardware configuration. The default configuration is, however,
+ not designed for optimum performance. To achieve optimum
+ performance, several server parameters must be adjusted, the two
+ most common being <varname>shared_buffers</varname> and
+ <varname>work_mem</varname>.
+ Other parameters mentioned in the documentation also affect
+ performance.
+ </para>
+ </listitem>
+ </itemizedlist>
+ </para>
+ </sect1>
+
+ <xi:include href="postgres.xml" xpointer="supported-platforms" xmlns:xi="http://www.w3.org/2001/XInclude"/>
+ <xi:include href="postgres.xml" xpointer="installation-platform-notes" xmlns:xi="http://www.w3.org/2001/XInclude"/>
+</article>
diff --git a/doc/src/sgml/standalone-profile.xsl b/doc/src/sgml/standalone-profile.xsl
new file mode 100644
index 0000000000..ff464c1654
--- /dev/null
+++ b/doc/src/sgml/standalone-profile.xsl
@@ -0,0 +1,81 @@
+<?xml version='1.0'?>
+<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
+ version="1.0">
+
+<!--
+This is a preprocessing layer to convert the installation instructions into a
+variant without links and references to the main documentation.
+
+- To omit something in the stand-alone INSTALL file, give the element a
+ condition="standalone-ignore" attribute.
+
+- If there is no element that exactly covers what you want to change, wrap it
+ in a <phrase> element, which otherwise does nothing.
+
+- Otherwise, write a custom rule below.
+-->
+
+<xsl:output
+ doctype-public="-//OASIS//DTD DocBook XML V4.2//EN"
+ doctype-system="http://www.oasis-open.org/docbook/xml/4.2/docbookx.dtd"/>
+
+<!-- copy everything by default -->
+
+<xsl:template match="@*|node()">
+ <xsl:copy>
+ <xsl:apply-templates select="@*|node()" />
+ </xsl:copy>
+</xsl:template>
+
+<!-- particular conversions -->
+
+<xsl:template match="*[@condition='standalone-ignore']">
+</xsl:template>
+
+<xsl:template match="phrase/text()['chapter']">
+ <xsl:text>document</xsl:text>
+</xsl:template>
+
+<xsl:template match="phrase[@id='install-ldap-links']">
+ <xsl:text>the documentation about client authentication and libpq</xsl:text>
+</xsl:template>
+
+<xsl:template match="xref[@linkend='docguide-toolsets']">
+ <xsl:text>the main documentation's appendix on documentation</xsl:text>
+</xsl:template>
+
+<xsl:template match="xref[@linkend='dynamic-trace']">
+ <xsl:text>the documentation</xsl:text>
+</xsl:template>
+
+<xsl:template match="xref[@linkend='install-windows']">
+ <xsl:text>the documentation</xsl:text>
+</xsl:template>
+
+<xsl:template match="xref[@linkend='pgcrypto']">
+ <xsl:text>pgcrypto</xsl:text>
+</xsl:template>
+
+<xsl:template match="xref[@linkend='plpython-python23']">
+ <xsl:text>the </xsl:text><application>PL/Python</application><xsl:text> documentation</xsl:text>
+</xsl:template>
+
+<xsl:template match="xref[@linkend='regress']">
+ <xsl:text>the file </xsl:text>
+ <filename>src/test/regress/README</filename>
+ <xsl:text> and the documentation</xsl:text>
+</xsl:template>
+
+<xsl:template match="xref[@linkend='upgrading']">
+ <xsl:text>the documentation</xsl:text>
+</xsl:template>
+
+<xsl:template match="xref[@linkend='uuid-ossp']">
+ <xsl:text>uuid-ossp</xsl:text>
+</xsl:template>
+
+<xsl:template match="xref[@linkend='xml2']">
+ <xsl:text>xml2</xsl:text>
+</xsl:template>
+
+</xsl:stylesheet>
--
2.11.0 (Apple Git-81)
^ permalink raw reply [nested|flat] 86+ messages in thread
* Re: Docbook 5.x
2016-04-20 14:30 Docbook 5.x Jürgen Purtz <[email protected]>
2016-05-03 19:34 ` Re: Docbook 5.x Alvaro Herrera <[email protected]>
2016-05-03 20:13 ` Re: Docbook 5.x Oleg Bartunov <[email protected]>
2016-05-04 00:44 ` Re: Docbook 5.x Peter Eisentraut <[email protected]>
2016-05-05 04:45 ` Re: Docbook 5.x Alexander Law <[email protected]>
2016-06-03 19:31 ` Re: Docbook 5.x Peter Eisentraut <[email protected]>
2016-06-04 14:28 ` Re: Docbook 5.x Alexander Law <[email protected]>
2016-06-06 12:28 ` Re: Docbook 5.x Peter Eisentraut <[email protected]>
2016-08-18 17:56 ` Re: Docbook 5.x Peter Eisentraut <[email protected]>
2016-08-19 13:14 ` Re: Docbook 5.x Alexander Law <[email protected]>
2016-08-22 18:06 ` Re: Docbook 5.x Peter Eisentraut <[email protected]>
2016-08-23 14:23 ` Re: Docbook 5.x Alexander Law <[email protected]>
2016-09-14 11:18 ` Re: Docbook 5.x Alexander Law <[email protected]>
2016-11-08 13:25 ` Re: Docbook 5.x Peter Eisentraut <[email protected]>
2016-11-09 10:00 ` Re: Docbook 5.x Alexander Law <[email protected]>
2016-11-16 11:30 ` Re: Docbook 5.x Alexander Law <[email protected]>
2017-02-28 08:55 ` Re: Docbook 5.x Alexander Law <[email protected]>
2017-09-06 15:54 ` Re: Docbook 5.x Peter Eisentraut <[email protected]>
2017-09-08 12:30 ` Re: Docbook 5.x Alexander Lakhin <[email protected]>
2017-09-15 14:32 ` Re: Docbook 5.x Peter Eisentraut <[email protected]>
@ 2017-09-15 18:54 ` Jürgen Purtz <[email protected]>
2017-09-18 13:57 ` Re: Docbook 5.x Peter Eisentraut <[email protected]>
2017-09-18 14:38 ` Re: Docbook 5.x Alexander Lakhin <[email protected]>
0 siblings, 2 replies; 86+ messages in thread
From: Jürgen Purtz @ 2017-09-15 18:54 UTC (permalink / raw)
To: Peter Eisentraut <[email protected]>; +Cc: pgsql-docs; Alexander Law <[email protected]>
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
^ permalink raw reply [nested|flat] 86+ messages in thread
* Re: Docbook 5.x
2016-04-20 14:30 Docbook 5.x Jürgen Purtz <[email protected]>
2016-05-03 19:34 ` Re: Docbook 5.x Alvaro Herrera <[email protected]>
2016-05-03 20:13 ` Re: Docbook 5.x Oleg Bartunov <[email protected]>
2016-05-04 00:44 ` Re: Docbook 5.x Peter Eisentraut <[email protected]>
2016-05-05 04:45 ` Re: Docbook 5.x Alexander Law <[email protected]>
2016-06-03 19:31 ` Re: Docbook 5.x Peter Eisentraut <[email protected]>
2016-06-04 14:28 ` Re: Docbook 5.x Alexander Law <[email protected]>
2016-06-06 12:28 ` Re: Docbook 5.x Peter Eisentraut <[email protected]>
2016-08-18 17:56 ` Re: Docbook 5.x Peter Eisentraut <[email protected]>
2016-08-19 13:14 ` Re: Docbook 5.x Alexander Law <[email protected]>
2016-08-22 18:06 ` Re: Docbook 5.x Peter Eisentraut <[email protected]>
2016-08-23 14:23 ` Re: Docbook 5.x Alexander Law <[email protected]>
2016-09-14 11:18 ` Re: Docbook 5.x Alexander Law <[email protected]>
2016-11-08 13:25 ` Re: Docbook 5.x Peter Eisentraut <[email protected]>
2016-11-09 10:00 ` Re: Docbook 5.x Alexander Law <[email protected]>
2016-11-16 11:30 ` Re: Docbook 5.x Alexander Law <[email protected]>
2017-02-28 08:55 ` Re: Docbook 5.x Alexander Law <[email protected]>
2017-09-06 15:54 ` Re: Docbook 5.x Peter Eisentraut <[email protected]>
2017-09-08 12:30 ` Re: Docbook 5.x Alexander Lakhin <[email protected]>
2017-09-15 14:32 ` Re: Docbook 5.x Peter Eisentraut <[email protected]>
2017-09-15 18:54 ` Re: Docbook 5.x Jürgen Purtz <[email protected]>
@ 2017-09-18 13:57 ` Peter Eisentraut <[email protected]>
1 sibling, 0 replies; 86+ messages in thread
From: Peter Eisentraut @ 2017-09-18 13:57 UTC (permalink / raw)
To: Jürgen Purtz <[email protected]>; +Cc: pgsql-docs; Alexander Law <[email protected]>
On 9/15/17 14:54, Jürgen Purtz wrote:
> 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,
> ...
That is what the standard DocBook profiling system does. But that has
the disadvantage of imposing a performance penalty on building the
documentation. Unless you have a way around that that I'm not seeing.
--
Peter Eisentraut http://www.2ndQuadrant.com/
PostgreSQL Development, 24x7 Support, Remote DBA, Training & Services
--
Sent via pgsql-docs mailing list ([email protected])
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-docs
^ permalink raw reply [nested|flat] 86+ messages in thread
* Re: Docbook 5.x
2016-04-20 14:30 Docbook 5.x Jürgen Purtz <[email protected]>
2016-05-03 19:34 ` Re: Docbook 5.x Alvaro Herrera <[email protected]>
2016-05-03 20:13 ` Re: Docbook 5.x Oleg Bartunov <[email protected]>
2016-05-04 00:44 ` Re: Docbook 5.x Peter Eisentraut <[email protected]>
2016-05-05 04:45 ` Re: Docbook 5.x Alexander Law <[email protected]>
2016-06-03 19:31 ` Re: Docbook 5.x Peter Eisentraut <[email protected]>
2016-06-04 14:28 ` Re: Docbook 5.x Alexander Law <[email protected]>
2016-06-06 12:28 ` Re: Docbook 5.x Peter Eisentraut <[email protected]>
2016-08-18 17:56 ` Re: Docbook 5.x Peter Eisentraut <[email protected]>
2016-08-19 13:14 ` Re: Docbook 5.x Alexander Law <[email protected]>
2016-08-22 18:06 ` Re: Docbook 5.x Peter Eisentraut <[email protected]>
2016-08-23 14:23 ` Re: Docbook 5.x Alexander Law <[email protected]>
2016-09-14 11:18 ` Re: Docbook 5.x Alexander Law <[email protected]>
2016-11-08 13:25 ` Re: Docbook 5.x Peter Eisentraut <[email protected]>
2016-11-09 10:00 ` Re: Docbook 5.x Alexander Law <[email protected]>
2016-11-16 11:30 ` Re: Docbook 5.x Alexander Law <[email protected]>
2017-02-28 08:55 ` Re: Docbook 5.x Alexander Law <[email protected]>
2017-09-06 15:54 ` Re: Docbook 5.x Peter Eisentraut <[email protected]>
2017-09-08 12:30 ` Re: Docbook 5.x Alexander Lakhin <[email protected]>
2017-09-15 14:32 ` Re: Docbook 5.x Peter Eisentraut <[email protected]>
2017-09-15 18:54 ` Re: Docbook 5.x Jürgen Purtz <[email protected]>
@ 2017-09-18 14:38 ` Alexander Lakhin <[email protected]>
2017-09-19 20:05 ` Re: Docbook 5.x Peter Eisentraut <[email protected]>
1 sibling, 1 reply; 86+ messages in thread
From: Alexander Lakhin @ 2017-09-18 14:38 UTC (permalink / raw)
To: Jürgen Purtz <[email protected]>; Peter Eisentraut <[email protected]>; +Cc: 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
^ permalink raw reply [nested|flat] 86+ messages in thread
* Re: Docbook 5.x
2016-04-20 14:30 Docbook 5.x Jürgen Purtz <[email protected]>
2016-05-03 19:34 ` Re: Docbook 5.x Alvaro Herrera <[email protected]>
2016-05-03 20:13 ` Re: Docbook 5.x Oleg Bartunov <[email protected]>
2016-05-04 00:44 ` Re: Docbook 5.x Peter Eisentraut <[email protected]>
2016-05-05 04:45 ` Re: Docbook 5.x Alexander Law <[email protected]>
2016-06-03 19:31 ` Re: Docbook 5.x Peter Eisentraut <[email protected]>
2016-06-04 14:28 ` Re: Docbook 5.x Alexander Law <[email protected]>
2016-06-06 12:28 ` Re: Docbook 5.x Peter Eisentraut <[email protected]>
2016-08-18 17:56 ` Re: Docbook 5.x Peter Eisentraut <[email protected]>
2016-08-19 13:14 ` Re: Docbook 5.x Alexander Law <[email protected]>
2016-08-22 18:06 ` Re: Docbook 5.x Peter Eisentraut <[email protected]>
2016-08-23 14:23 ` Re: Docbook 5.x Alexander Law <[email protected]>
2016-09-14 11:18 ` Re: Docbook 5.x Alexander Law <[email protected]>
2016-11-08 13:25 ` Re: Docbook 5.x Peter Eisentraut <[email protected]>
2016-11-09 10:00 ` Re: Docbook 5.x Alexander Law <[email protected]>
2016-11-16 11:30 ` Re: Docbook 5.x Alexander Law <[email protected]>
2017-02-28 08:55 ` Re: Docbook 5.x Alexander Law <[email protected]>
2017-09-06 15:54 ` Re: Docbook 5.x Peter Eisentraut <[email protected]>
2017-09-08 12:30 ` Re: Docbook 5.x Alexander Lakhin <[email protected]>
2017-09-15 14:32 ` Re: Docbook 5.x Peter Eisentraut <[email protected]>
2017-09-15 18:54 ` Re: Docbook 5.x Jürgen Purtz <[email protected]>
2017-09-18 14:38 ` Re: Docbook 5.x Alexander Lakhin <[email protected]>
@ 2017-09-19 20:05 ` Peter Eisentraut <[email protected]>
2017-09-20 13:00 ` Re: Docbook 5.x Alexander Lakhin <[email protected]>
0 siblings, 1 reply; 86+ messages in thread
From: Peter Eisentraut @ 2017-09-19 20:05 UTC (permalink / raw)
To: Alexander Lakhin <[email protected]>; Jürgen Purtz <[email protected]>; +Cc: pgsql-docs
On 9/18/17 10:38, Alexander Lakhin wrote:
> 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?
Yeah, that's about what I see.
> 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).
It's only for the INSTALL file and won't get used anywhere else, so I
think it's OK to have a bit of an ad-hoc system.
> 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)
I hadn't even looked at that yet, but that kind of supports my point.
Injecting the profiling layer everywhere is going to be annoying.
--
Peter Eisentraut http://www.2ndQuadrant.com/
PostgreSQL Development, 24x7 Support, Remote DBA, Training & Services
--
Sent via pgsql-docs mailing list ([email protected])
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-docs
^ permalink raw reply [nested|flat] 86+ messages in thread
* Re: Docbook 5.x
2016-04-20 14:30 Docbook 5.x Jürgen Purtz <[email protected]>
2016-05-03 19:34 ` Re: Docbook 5.x Alvaro Herrera <[email protected]>
2016-05-03 20:13 ` Re: Docbook 5.x Oleg Bartunov <[email protected]>
2016-05-04 00:44 ` Re: Docbook 5.x Peter Eisentraut <[email protected]>
2016-05-05 04:45 ` Re: Docbook 5.x Alexander Law <[email protected]>
2016-06-03 19:31 ` Re: Docbook 5.x Peter Eisentraut <[email protected]>
2016-06-04 14:28 ` Re: Docbook 5.x Alexander Law <[email protected]>
2016-06-06 12:28 ` Re: Docbook 5.x Peter Eisentraut <[email protected]>
2016-08-18 17:56 ` Re: Docbook 5.x Peter Eisentraut <[email protected]>
2016-08-19 13:14 ` Re: Docbook 5.x Alexander Law <[email protected]>
2016-08-22 18:06 ` Re: Docbook 5.x Peter Eisentraut <[email protected]>
2016-08-23 14:23 ` Re: Docbook 5.x Alexander Law <[email protected]>
2016-09-14 11:18 ` Re: Docbook 5.x Alexander Law <[email protected]>
2016-11-08 13:25 ` Re: Docbook 5.x Peter Eisentraut <[email protected]>
2016-11-09 10:00 ` Re: Docbook 5.x Alexander Law <[email protected]>
2016-11-16 11:30 ` Re: Docbook 5.x Alexander Law <[email protected]>
2017-02-28 08:55 ` Re: Docbook 5.x Alexander Law <[email protected]>
2017-09-06 15:54 ` Re: Docbook 5.x Peter Eisentraut <[email protected]>
2017-09-08 12:30 ` Re: Docbook 5.x Alexander Lakhin <[email protected]>
2017-09-15 14:32 ` Re: Docbook 5.x Peter Eisentraut <[email protected]>
2017-09-15 18:54 ` Re: Docbook 5.x Jürgen Purtz <[email protected]>
2017-09-18 14:38 ` Re: Docbook 5.x Alexander Lakhin <[email protected]>
2017-09-19 20:05 ` Re: Docbook 5.x Peter Eisentraut <[email protected]>
@ 2017-09-20 13:00 ` Alexander Lakhin <[email protected]>
2017-09-27 15:38 ` Re: Docbook 5.x Peter Eisentraut <[email protected]>
0 siblings, 1 reply; 86+ messages in thread
From: Alexander Lakhin @ 2017-09-20 13:00 UTC (permalink / raw)
To: Peter Eisentraut <[email protected]>; Jürgen Purtz <[email protected]>; +Cc: pgsql-docs
Hello Peter,
19.09.2017 23:05, Peter Eisentraut wrote:
>> 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).
> It's only for the INSTALL file and won't get used anywhere else, so I
> think it's OK to have a bit of an ad-hoc system.
Well, then I would suggest to place all the extra content in the
installation-single.xsl file and to add all the alternate text to
installation.xml.
I would like to place such alternate text in an attribute
"standalonetext" or alike, but DocBook 4.x doesn't allow for extra
attributes, so we need to choose from:
http://tdg.docbook.org/tdg/4.5/ref-elements.html#common.attributes
So I decided to make alternative use of xreflabel attribute. (I believe
that we could find something more appropriate after migrating from
Docbook 4.2 to 5.x).)
Please see patches/xml/installation.patch in the attachment (or
installation.xml in doc/src/xml after ) for an example.
Makefile (in patches/xml/) is adjusted for the new approach too.
(Main output is slightly changed after switching from
"profile-chunk.xsl" to "chunk.xsl", I'll fix it later if we choose this
way.)
(Archive in the attachment is packed twice to avoid the automatic patch
checking...)
Best regards,
Alexander
--
Sent via pgsql-docs mailing list ([email protected])
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-docs
Attachments:
[application/x-bzip] pg-doc.check+.tar.bz2 (23.9K, 2-pg-doc.check+.tar.bz2)
download
^ permalink raw reply [nested|flat] 86+ messages in thread
* Re: Docbook 5.x
2016-04-20 14:30 Docbook 5.x Jürgen Purtz <[email protected]>
2016-05-03 19:34 ` Re: Docbook 5.x Alvaro Herrera <[email protected]>
2016-05-03 20:13 ` Re: Docbook 5.x Oleg Bartunov <[email protected]>
2016-05-04 00:44 ` Re: Docbook 5.x Peter Eisentraut <[email protected]>
2016-05-05 04:45 ` Re: Docbook 5.x Alexander Law <[email protected]>
2016-06-03 19:31 ` Re: Docbook 5.x Peter Eisentraut <[email protected]>
2016-06-04 14:28 ` Re: Docbook 5.x Alexander Law <[email protected]>
2016-06-06 12:28 ` Re: Docbook 5.x Peter Eisentraut <[email protected]>
2016-08-18 17:56 ` Re: Docbook 5.x Peter Eisentraut <[email protected]>
2016-08-19 13:14 ` Re: Docbook 5.x Alexander Law <[email protected]>
2016-08-22 18:06 ` Re: Docbook 5.x Peter Eisentraut <[email protected]>
2016-08-23 14:23 ` Re: Docbook 5.x Alexander Law <[email protected]>
2016-09-14 11:18 ` Re: Docbook 5.x Alexander Law <[email protected]>
2016-11-08 13:25 ` Re: Docbook 5.x Peter Eisentraut <[email protected]>
2016-11-09 10:00 ` Re: Docbook 5.x Alexander Law <[email protected]>
2016-11-16 11:30 ` Re: Docbook 5.x Alexander Law <[email protected]>
2017-02-28 08:55 ` Re: Docbook 5.x Alexander Law <[email protected]>
2017-09-06 15:54 ` Re: Docbook 5.x Peter Eisentraut <[email protected]>
2017-09-08 12:30 ` Re: Docbook 5.x Alexander Lakhin <[email protected]>
2017-09-15 14:32 ` Re: Docbook 5.x Peter Eisentraut <[email protected]>
2017-09-15 18:54 ` Re: Docbook 5.x Jürgen Purtz <[email protected]>
2017-09-18 14:38 ` Re: Docbook 5.x Alexander Lakhin <[email protected]>
2017-09-19 20:05 ` Re: Docbook 5.x Peter Eisentraut <[email protected]>
2017-09-20 13:00 ` Re: Docbook 5.x Alexander Lakhin <[email protected]>
@ 2017-09-27 15:38 ` Peter Eisentraut <[email protected]>
2017-09-27 16:11 ` Re: Docbook 5.x Alexander Lakhin <[email protected]>
0 siblings, 1 reply; 86+ messages in thread
From: Peter Eisentraut @ 2017-09-27 15:38 UTC (permalink / raw)
To: Alexander Lakhin <[email protected]>; Jürgen Purtz <[email protected]>; +Cc: pgsql-docs
On 9/20/17 09:00, Alexander Lakhin wrote:
> I would like to place such alternate text in an attribute
> "standalonetext" or alike, but DocBook 4.x doesn't allow for extra
> attributes, so we need to choose from:
> http://tdg.docbook.org/tdg/4.5/ref-elements.html#common.attributes
> So I decided to make alternative use of xreflabel attribute. (I believe
> that we could find something more appropriate after migrating from
> Docbook 4.2 to 5.x).)
Yeah, but that's a bit of a hack isn't it? I also don't see anything in
DocBook 5 that indicates to me that we could get rid of that hack then.
In the interest of moving things along, I have committed my patch and
will continue working on the rest of the patch set.
Improvements are welcome and can be submitted separately, but I think
it's hardly worth it because this stuff changes so rarely.
--
Peter Eisentraut http://www.2ndQuadrant.com/
PostgreSQL Development, 24x7 Support, Remote DBA, Training & Services
--
Sent via pgsql-docs mailing list ([email protected])
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-docs
^ permalink raw reply [nested|flat] 86+ messages in thread
* Re: Docbook 5.x
2016-04-20 14:30 Docbook 5.x Jürgen Purtz <[email protected]>
2016-05-03 19:34 ` Re: Docbook 5.x Alvaro Herrera <[email protected]>
2016-05-03 20:13 ` Re: Docbook 5.x Oleg Bartunov <[email protected]>
2016-05-04 00:44 ` Re: Docbook 5.x Peter Eisentraut <[email protected]>
2016-05-05 04:45 ` Re: Docbook 5.x Alexander Law <[email protected]>
2016-06-03 19:31 ` Re: Docbook 5.x Peter Eisentraut <[email protected]>
2016-06-04 14:28 ` Re: Docbook 5.x Alexander Law <[email protected]>
2016-06-06 12:28 ` Re: Docbook 5.x Peter Eisentraut <[email protected]>
2016-08-18 17:56 ` Re: Docbook 5.x Peter Eisentraut <[email protected]>
2016-08-19 13:14 ` Re: Docbook 5.x Alexander Law <[email protected]>
2016-08-22 18:06 ` Re: Docbook 5.x Peter Eisentraut <[email protected]>
2016-08-23 14:23 ` Re: Docbook 5.x Alexander Law <[email protected]>
2016-09-14 11:18 ` Re: Docbook 5.x Alexander Law <[email protected]>
2016-11-08 13:25 ` Re: Docbook 5.x Peter Eisentraut <[email protected]>
2016-11-09 10:00 ` Re: Docbook 5.x Alexander Law <[email protected]>
2016-11-16 11:30 ` Re: Docbook 5.x Alexander Law <[email protected]>
2017-02-28 08:55 ` Re: Docbook 5.x Alexander Law <[email protected]>
2017-09-06 15:54 ` Re: Docbook 5.x Peter Eisentraut <[email protected]>
2017-09-08 12:30 ` Re: Docbook 5.x Alexander Lakhin <[email protected]>
2017-09-15 14:32 ` Re: Docbook 5.x Peter Eisentraut <[email protected]>
2017-09-15 18:54 ` Re: Docbook 5.x Jürgen Purtz <[email protected]>
2017-09-18 14:38 ` Re: Docbook 5.x Alexander Lakhin <[email protected]>
2017-09-19 20:05 ` Re: Docbook 5.x Peter Eisentraut <[email protected]>
2017-09-20 13:00 ` Re: Docbook 5.x Alexander Lakhin <[email protected]>
2017-09-27 15:38 ` Re: Docbook 5.x Peter Eisentraut <[email protected]>
@ 2017-09-27 16:11 ` Alexander Lakhin <[email protected]>
2017-09-27 19:51 ` Re: Docbook 5.x Alexander Lakhin <[email protected]>
0 siblings, 1 reply; 86+ messages in thread
From: Alexander Lakhin @ 2017-09-27 16:11 UTC (permalink / raw)
To: Peter Eisentraut <[email protected]>; Jürgen Purtz <[email protected]>; +Cc: pgsql-docs
Hello,
27.09.2017 18:38, Peter Eisentraut wrote:
> On 9/20/17 09:00, Alexander Lakhin wrote:
>> I would like to place such alternate text in an attribute
>> "standalonetext" or alike, but DocBook 4.x doesn't allow for extra
>> attributes, so we need to choose from:
>> http://tdg.docbook.org/tdg/4.5/ref-elements.html#common.attributes
>> So I decided to make alternative use of xreflabel attribute. (I believe
>> that we could find something more appropriate after migrating from
>> Docbook 4.2 to 5.x).)
> Yeah, but that's a bit of a hack isn't it? I also don't see anything in
> DocBook 5 that indicates to me that we could get rid of that hack then.
I found a more appropriate way for using an extra attribute:
http://www.sagehill.net/docbookxsl/AddProfileAtt.htm
I've tested it with "standalone" attribute and it works (for Docbook 4.2).
May be it will decrease hackiness level of the solution?
If it's not too late I could prepare a new patchset today.
> In the interest of moving things along, I have committed my patch and
> will continue working on the rest of the patch set.
>
> Improvements are welcome and can be submitted separately, but I think
> it's hardly worth it because this stuff changes so rarely.
But with such approach we should translate that .xsl too and it seems
rather strange, isn't it?
------
Alexander Lakhin
Postgres Professional: http://www.postgrespro.com
The Russian Postgres Company
--
Sent via pgsql-docs mailing list ([email protected])
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-docs
^ permalink raw reply [nested|flat] 86+ messages in thread
* Re: Docbook 5.x
2016-04-20 14:30 Docbook 5.x Jürgen Purtz <[email protected]>
2016-05-03 19:34 ` Re: Docbook 5.x Alvaro Herrera <[email protected]>
2016-05-03 20:13 ` Re: Docbook 5.x Oleg Bartunov <[email protected]>
2016-05-04 00:44 ` Re: Docbook 5.x Peter Eisentraut <[email protected]>
2016-05-05 04:45 ` Re: Docbook 5.x Alexander Law <[email protected]>
2016-06-03 19:31 ` Re: Docbook 5.x Peter Eisentraut <[email protected]>
2016-06-04 14:28 ` Re: Docbook 5.x Alexander Law <[email protected]>
2016-06-06 12:28 ` Re: Docbook 5.x Peter Eisentraut <[email protected]>
2016-08-18 17:56 ` Re: Docbook 5.x Peter Eisentraut <[email protected]>
2016-08-19 13:14 ` Re: Docbook 5.x Alexander Law <[email protected]>
2016-08-22 18:06 ` Re: Docbook 5.x Peter Eisentraut <[email protected]>
2016-08-23 14:23 ` Re: Docbook 5.x Alexander Law <[email protected]>
2016-09-14 11:18 ` Re: Docbook 5.x Alexander Law <[email protected]>
2016-11-08 13:25 ` Re: Docbook 5.x Peter Eisentraut <[email protected]>
2016-11-09 10:00 ` Re: Docbook 5.x Alexander Law <[email protected]>
2016-11-16 11:30 ` Re: Docbook 5.x Alexander Law <[email protected]>
2017-02-28 08:55 ` Re: Docbook 5.x Alexander Law <[email protected]>
2017-09-06 15:54 ` Re: Docbook 5.x Peter Eisentraut <[email protected]>
2017-09-08 12:30 ` Re: Docbook 5.x Alexander Lakhin <[email protected]>
2017-09-15 14:32 ` Re: Docbook 5.x Peter Eisentraut <[email protected]>
2017-09-15 18:54 ` Re: Docbook 5.x Jürgen Purtz <[email protected]>
2017-09-18 14:38 ` Re: Docbook 5.x Alexander Lakhin <[email protected]>
2017-09-19 20:05 ` Re: Docbook 5.x Peter Eisentraut <[email protected]>
2017-09-20 13:00 ` Re: Docbook 5.x Alexander Lakhin <[email protected]>
2017-09-27 15:38 ` Re: Docbook 5.x Peter Eisentraut <[email protected]>
2017-09-27 16:11 ` Re: Docbook 5.x Alexander Lakhin <[email protected]>
@ 2017-09-27 19:51 ` Alexander Lakhin <[email protected]>
2017-11-16 06:00 ` Re: Docbook 5.x Alexander Lakhin <[email protected]>
2017-11-23 14:53 ` Re: [DOCS] Docbook 5.x Peter Eisentraut <[email protected]>
0 siblings, 2 replies; 86+ messages in thread
From: Alexander Lakhin @ 2017-09-27 19:51 UTC (permalink / raw)
To: Peter Eisentraut <[email protected]>; Jürgen Purtz <[email protected]>; +Cc: pgsql-docs
27.09.2017 19:11, Alexander Lakhin wrote:
>> In the interest of moving things along, I have committed my patch and
>> will continue working on the rest of the patch set.
>>
>> Improvements are welcome and can be submitted separately, but I think
>> it's hardly worth it because this stuff changes so rarely.
> But with such approach we should translate that .xsl too and it seems
> rather strange, isn't it?
Improved patch attached.
--
Sent via pgsql-docs mailing list ([email protected])
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-docs
Attachments:
[application/x-bzip] pg-doc.check+.tar.bz2 (24.0K, 2-pg-doc.check+.tar.bz2)
download
^ permalink raw reply [nested|flat] 86+ messages in thread
* Re: Docbook 5.x
2016-04-20 14:30 Docbook 5.x Jürgen Purtz <[email protected]>
2016-05-03 19:34 ` Re: Docbook 5.x Alvaro Herrera <[email protected]>
2016-05-03 20:13 ` Re: Docbook 5.x Oleg Bartunov <[email protected]>
2016-05-04 00:44 ` Re: Docbook 5.x Peter Eisentraut <[email protected]>
2016-05-05 04:45 ` Re: Docbook 5.x Alexander Law <[email protected]>
2016-06-03 19:31 ` Re: Docbook 5.x Peter Eisentraut <[email protected]>
2016-06-04 14:28 ` Re: Docbook 5.x Alexander Law <[email protected]>
2016-06-06 12:28 ` Re: Docbook 5.x Peter Eisentraut <[email protected]>
2016-08-18 17:56 ` Re: Docbook 5.x Peter Eisentraut <[email protected]>
2016-08-19 13:14 ` Re: Docbook 5.x Alexander Law <[email protected]>
2016-08-22 18:06 ` Re: Docbook 5.x Peter Eisentraut <[email protected]>
2016-08-23 14:23 ` Re: Docbook 5.x Alexander Law <[email protected]>
2016-09-14 11:18 ` Re: Docbook 5.x Alexander Law <[email protected]>
2016-11-08 13:25 ` Re: Docbook 5.x Peter Eisentraut <[email protected]>
2016-11-09 10:00 ` Re: Docbook 5.x Alexander Law <[email protected]>
2016-11-16 11:30 ` Re: Docbook 5.x Alexander Law <[email protected]>
2017-02-28 08:55 ` Re: Docbook 5.x Alexander Law <[email protected]>
2017-09-06 15:54 ` Re: Docbook 5.x Peter Eisentraut <[email protected]>
2017-09-08 12:30 ` Re: Docbook 5.x Alexander Lakhin <[email protected]>
2017-09-15 14:32 ` Re: Docbook 5.x Peter Eisentraut <[email protected]>
2017-09-15 18:54 ` Re: Docbook 5.x Jürgen Purtz <[email protected]>
2017-09-18 14:38 ` Re: Docbook 5.x Alexander Lakhin <[email protected]>
2017-09-19 20:05 ` Re: Docbook 5.x Peter Eisentraut <[email protected]>
2017-09-20 13:00 ` Re: Docbook 5.x Alexander Lakhin <[email protected]>
2017-09-27 15:38 ` Re: Docbook 5.x Peter Eisentraut <[email protected]>
2017-09-27 16:11 ` Re: Docbook 5.x Alexander Lakhin <[email protected]>
2017-09-27 19:51 ` Re: Docbook 5.x Alexander Lakhin <[email protected]>
@ 2017-11-16 06:00 ` Alexander Lakhin <[email protected]>
2017-11-18 17:24 ` Re: Docbook 5.x Peter Eisentraut <[email protected]>
1 sibling, 1 reply; 86+ messages in thread
From: Alexander Lakhin @ 2017-11-16 06:00 UTC (permalink / raw)
To: Peter Eisentraut <[email protected]>; Jürgen Purtz <[email protected]>; +Cc: pgsql-docs
Hello Peter,
16.11.2017 00:06, Peter Eisentraut wrote:
> Here is the final patch set for the conversion.
Great!
I have some questions.
1. Can you share the exact scripts you use to generate 0002?
(We transform the documentation to xml since 9.6 on-fly so it would be
nice to adjust our scripts for previous versions too.)
2. Will you rename *.sgml to *.xml and move src/sgml to src/xml?
3. And I still think that hard-coding references and replacements in the
standalone-profile is not good. Are you going to apply less hackish
approach?
(See
https://www.postgresql.org/message-id/b4fd6932-8d44-3210-48ab-bbc393bf9a23%40gmail.com
, patches/xml/installation.patch and patches/xml/installation-single.xsl)
4. BTW, when making postgres-A4.pdf, I get
[WARN] FOUserAgent - Destination: Unresolved ID reference
"ecpg-type-timestamp-date" found.
It can be fixed by moving the id from the title tag to sect4:
- <sect4>
- <title id="ecpg-type-timestamp-date">timestamp, date</title>
+ <sect4 id="ecpg-type-timestamp-date">
+ <title>timestamp, date</title>
I wonder, what were the reasons to set id for the title tag?
Best regards,
------
Alexander Lakhin
Postgres Professional: http://www.postgrespro.com
The Russian Postgres Company
^ permalink raw reply [nested|flat] 86+ messages in thread
* Re: Docbook 5.x
2016-04-20 14:30 Docbook 5.x Jürgen Purtz <[email protected]>
2016-05-03 19:34 ` Re: Docbook 5.x Alvaro Herrera <[email protected]>
2016-05-03 20:13 ` Re: Docbook 5.x Oleg Bartunov <[email protected]>
2016-05-04 00:44 ` Re: Docbook 5.x Peter Eisentraut <[email protected]>
2016-05-05 04:45 ` Re: Docbook 5.x Alexander Law <[email protected]>
2016-06-03 19:31 ` Re: Docbook 5.x Peter Eisentraut <[email protected]>
2016-06-04 14:28 ` Re: Docbook 5.x Alexander Law <[email protected]>
2016-06-06 12:28 ` Re: Docbook 5.x Peter Eisentraut <[email protected]>
2016-08-18 17:56 ` Re: Docbook 5.x Peter Eisentraut <[email protected]>
2016-08-19 13:14 ` Re: Docbook 5.x Alexander Law <[email protected]>
2016-08-22 18:06 ` Re: Docbook 5.x Peter Eisentraut <[email protected]>
2016-08-23 14:23 ` Re: Docbook 5.x Alexander Law <[email protected]>
2016-09-14 11:18 ` Re: Docbook 5.x Alexander Law <[email protected]>
2016-11-08 13:25 ` Re: Docbook 5.x Peter Eisentraut <[email protected]>
2016-11-09 10:00 ` Re: Docbook 5.x Alexander Law <[email protected]>
2016-11-16 11:30 ` Re: Docbook 5.x Alexander Law <[email protected]>
2017-02-28 08:55 ` Re: Docbook 5.x Alexander Law <[email protected]>
2017-09-06 15:54 ` Re: Docbook 5.x Peter Eisentraut <[email protected]>
2017-09-08 12:30 ` Re: Docbook 5.x Alexander Lakhin <[email protected]>
2017-09-15 14:32 ` Re: Docbook 5.x Peter Eisentraut <[email protected]>
2017-09-15 18:54 ` Re: Docbook 5.x Jürgen Purtz <[email protected]>
2017-09-18 14:38 ` Re: Docbook 5.x Alexander Lakhin <[email protected]>
2017-09-19 20:05 ` Re: Docbook 5.x Peter Eisentraut <[email protected]>
2017-09-20 13:00 ` Re: Docbook 5.x Alexander Lakhin <[email protected]>
2017-09-27 15:38 ` Re: Docbook 5.x Peter Eisentraut <[email protected]>
2017-09-27 16:11 ` Re: Docbook 5.x Alexander Lakhin <[email protected]>
2017-09-27 19:51 ` Re: Docbook 5.x Alexander Lakhin <[email protected]>
2017-11-16 06:00 ` Re: Docbook 5.x Alexander Lakhin <[email protected]>
@ 2017-11-18 17:24 ` Peter Eisentraut <[email protected]>
0 siblings, 0 replies; 86+ messages in thread
From: Peter Eisentraut @ 2017-11-18 17:24 UTC (permalink / raw)
To: Alexander Lakhin <[email protected]>; Jürgen Purtz <[email protected]>; +Cc: pgsql-docs
On 11/16/17 01:00, Alexander Lakhin wrote:
> 1. Can you share the exact scripts you use to generate 0002?
I used the script you (or Jürgen) provided.
> 2. Will you rename *.sgml to *.xml and move src/sgml to src/xml?
Not right now, but we should have that discussion at some point over the
next few months.
> 3. And I still think that hard-coding references and replacements in the
> standalone-profile is not good. Are you going to apply less hackish
> approach?
> (See
> https://www.postgresql.org/message-id/b4fd6932-8d44-3210-48ab-bbc393bf9a23%40gmail.com
> , patches/xml/installation.patch and patches/xml/installation-single.xsl)
The patches you send me are very confusing. If you can send me a
separate patch of what you have in mind and why and so on, we can
consider it separately, but right now I don't have much interest in
revisiting this. What is committed works well, stays out of the way,
and causes no problems AFAICT.
> 4. BTW, when making postgres-A4.pdf, I get
> [WARN] FOUserAgent - Destination: Unresolved ID reference
> "ecpg-type-timestamp-date" found.
> It can be fixed by moving the id from the title tag to sect4:
> - <sect4>
> - <title id="ecpg-type-timestamp-date">timestamp, date</title>
> + <sect4 id="ecpg-type-timestamp-date">
> + <title>timestamp, date</title>
> I wonder, what were the reasons to set id for the title tag?
In some cases the ids on the title tags were necessary for the DSSSL
stylesheets. They can be removed now with some care. I have some
partial patches for that.
These particular warnings seem harmless. I have found the following
reference:
<https://lists.oasis-open.org/archives/docbook-apps/201510/msg00052.html;
But I see the same warnings in the PG10 build, so this does not appear
to be a regression from the XML conversion.
--
Peter Eisentraut http://www.2ndQuadrant.com/
PostgreSQL Development, 24x7 Support, Remote DBA, Training & Services
--
Sent via pgsql-docs mailing list ([email protected])
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-docs
^ permalink raw reply [nested|flat] 86+ messages in thread
* Re: [DOCS] Docbook 5.x
2016-04-20 14:30 Docbook 5.x Jürgen Purtz <[email protected]>
2016-05-03 19:34 ` Re: Docbook 5.x Alvaro Herrera <[email protected]>
2016-05-03 20:13 ` Re: Docbook 5.x Oleg Bartunov <[email protected]>
2016-05-04 00:44 ` Re: Docbook 5.x Peter Eisentraut <[email protected]>
2016-05-05 04:45 ` Re: Docbook 5.x Alexander Law <[email protected]>
2016-06-03 19:31 ` Re: Docbook 5.x Peter Eisentraut <[email protected]>
2016-06-04 14:28 ` Re: Docbook 5.x Alexander Law <[email protected]>
2016-06-06 12:28 ` Re: Docbook 5.x Peter Eisentraut <[email protected]>
2016-08-18 17:56 ` Re: Docbook 5.x Peter Eisentraut <[email protected]>
2016-08-19 13:14 ` Re: Docbook 5.x Alexander Law <[email protected]>
2016-08-22 18:06 ` Re: Docbook 5.x Peter Eisentraut <[email protected]>
2016-08-23 14:23 ` Re: Docbook 5.x Alexander Law <[email protected]>
2016-09-14 11:18 ` Re: Docbook 5.x Alexander Law <[email protected]>
2016-11-08 13:25 ` Re: Docbook 5.x Peter Eisentraut <[email protected]>
2016-11-09 10:00 ` Re: Docbook 5.x Alexander Law <[email protected]>
2016-11-16 11:30 ` Re: Docbook 5.x Alexander Law <[email protected]>
2017-02-28 08:55 ` Re: Docbook 5.x Alexander Law <[email protected]>
2017-09-06 15:54 ` Re: Docbook 5.x Peter Eisentraut <[email protected]>
2017-09-08 12:30 ` Re: Docbook 5.x Alexander Lakhin <[email protected]>
2017-09-15 14:32 ` Re: Docbook 5.x Peter Eisentraut <[email protected]>
2017-09-15 18:54 ` Re: Docbook 5.x Jürgen Purtz <[email protected]>
2017-09-18 14:38 ` Re: Docbook 5.x Alexander Lakhin <[email protected]>
2017-09-19 20:05 ` Re: Docbook 5.x Peter Eisentraut <[email protected]>
2017-09-20 13:00 ` Re: Docbook 5.x Alexander Lakhin <[email protected]>
2017-09-27 15:38 ` Re: Docbook 5.x Peter Eisentraut <[email protected]>
2017-09-27 16:11 ` Re: Docbook 5.x Alexander Lakhin <[email protected]>
2017-09-27 19:51 ` Re: Docbook 5.x Alexander Lakhin <[email protected]>
@ 2017-11-23 14:53 ` Peter Eisentraut <[email protected]>
2017-11-25 05:50 ` Re: [DOCS] Docbook 5.x Alexander Lakhin <[email protected]>
1 sibling, 1 reply; 86+ messages in thread
From: Peter Eisentraut @ 2017-11-23 14:53 UTC (permalink / raw)
To: Alexander Lakhin <[email protected]>; Jürgen Purtz <[email protected]>; +Cc: pgsql-docs
On 11/15/17 16:06, Peter Eisentraut wrote:
> Here is the final patch set for the conversion.
I have committed this.
--
Peter Eisentraut http://www.2ndQuadrant.com/
PostgreSQL Development, 24x7 Support, Remote DBA, Training & Services
^ permalink raw reply [nested|flat] 86+ messages in thread
* Re: [DOCS] Docbook 5.x
2016-04-20 14:30 Docbook 5.x Jürgen Purtz <[email protected]>
2016-05-03 19:34 ` Re: Docbook 5.x Alvaro Herrera <[email protected]>
2016-05-03 20:13 ` Re: Docbook 5.x Oleg Bartunov <[email protected]>
2016-05-04 00:44 ` Re: Docbook 5.x Peter Eisentraut <[email protected]>
2016-05-05 04:45 ` Re: Docbook 5.x Alexander Law <[email protected]>
2016-06-03 19:31 ` Re: Docbook 5.x Peter Eisentraut <[email protected]>
2016-06-04 14:28 ` Re: Docbook 5.x Alexander Law <[email protected]>
2016-06-06 12:28 ` Re: Docbook 5.x Peter Eisentraut <[email protected]>
2016-08-18 17:56 ` Re: Docbook 5.x Peter Eisentraut <[email protected]>
2016-08-19 13:14 ` Re: Docbook 5.x Alexander Law <[email protected]>
2016-08-22 18:06 ` Re: Docbook 5.x Peter Eisentraut <[email protected]>
2016-08-23 14:23 ` Re: Docbook 5.x Alexander Law <[email protected]>
2016-09-14 11:18 ` Re: Docbook 5.x Alexander Law <[email protected]>
2016-11-08 13:25 ` Re: Docbook 5.x Peter Eisentraut <[email protected]>
2016-11-09 10:00 ` Re: Docbook 5.x Alexander Law <[email protected]>
2016-11-16 11:30 ` Re: Docbook 5.x Alexander Law <[email protected]>
2017-02-28 08:55 ` Re: Docbook 5.x Alexander Law <[email protected]>
2017-09-06 15:54 ` Re: Docbook 5.x Peter Eisentraut <[email protected]>
2017-09-08 12:30 ` Re: Docbook 5.x Alexander Lakhin <[email protected]>
2017-09-15 14:32 ` Re: Docbook 5.x Peter Eisentraut <[email protected]>
2017-09-15 18:54 ` Re: Docbook 5.x Jürgen Purtz <[email protected]>
2017-09-18 14:38 ` Re: Docbook 5.x Alexander Lakhin <[email protected]>
2017-09-19 20:05 ` Re: Docbook 5.x Peter Eisentraut <[email protected]>
2017-09-20 13:00 ` Re: Docbook 5.x Alexander Lakhin <[email protected]>
2017-09-27 15:38 ` Re: Docbook 5.x Peter Eisentraut <[email protected]>
2017-09-27 16:11 ` Re: Docbook 5.x Alexander Lakhin <[email protected]>
2017-09-27 19:51 ` Re: Docbook 5.x Alexander Lakhin <[email protected]>
2017-11-23 14:53 ` Re: [DOCS] Docbook 5.x Peter Eisentraut <[email protected]>
@ 2017-11-25 05:50 ` Alexander Lakhin <[email protected]>
2017-11-28 16:02 ` Re: [DOCS] Docbook 5.x Peter Eisentraut <[email protected]>
0 siblings, 1 reply; 86+ messages in thread
From: Alexander Lakhin @ 2017-11-25 05:50 UTC (permalink / raw)
To: Peter Eisentraut <[email protected]>; Jürgen Purtz <[email protected]>; +Cc: pgsql-docs; Tom Lane <[email protected]>
Hello,
23.11.2017 17:53, Peter Eisentraut wrote:
> On 11/15/17 16:06, Peter Eisentraut wrote:
>> Here is the final patch set for the conversion.
> I have committed this.
Great! Thank you for your work!
And in light of possible need to convert to xml older branches too,
maybe we should simplify INSTALL now.
Please, consider applying the attached patch. It produces the same
INSTALL and is much better in the following aspects.
1. All the INSTALL content is placed in two files (installation.sgml and
installation-single.xsl) instead of three (installation.sgml,
standalone-install.xml, standalone-profile.xsl).
2. There are no unreadable and untranslatable (in context) constructions
such as
<xsl:template match="xref[@linkend='plpython-python23']">
<xsl:text>the
</xsl:text><application>PL/Python</application><xsl:text>
documentation</xsl:text>
</xsl:template>
(Sometimes translators need to replace larger fragments.)
3. It uses only XSLT (which we use already), no xi:include.
4. It doesn't generate complete postgres.sgml to process only the
installation section.
I understand that it will take some time to review it, but I think it's
justified by the portability and supportability reasons.
Best regards,
------
Alexander Lakhin
Postgres Professional: http://www.postgrespro.com
The Russian Postgres Company
Attachments:
[text/x-patch] installation.patch (27.7K, 3-installation.patch)
download | inline diff:
diff --git a/doc/src/sgml/Makefile b/doc/src/sgml/Makefile
index f122b41..0cf3afe 100644
--- a/doc/src/sgml/Makefile
+++ b/doc/src/sgml/Makefile
@@ -111,13 +111,8 @@ LYNX = lynx
INSTALL: % : %.html
$(PERL) -p -e 's,<h(1|2) class="title",<h\1 align=center,g' $< | LC_ALL=en_US.ISO8859-1 $(LYNX) -force_html -dump -nolist -stdin | $(ICONV) -f latin1 -t us-ascii//TRANSLIT > $@
-INSTALL.html: %.html : stylesheet-text.xsl %.xml
- $(XMLLINT) --noout --valid $*.xml
- $(XSLTPROC) $(XSLTPROCFLAGS) $(XSLTPROC_HTML_FLAGS) $^ >$@
-
-INSTALL.xml: standalone-profile.xsl standalone-install.xml postgres.sgml $(ALLSGML)
- $(XSLTPROC) $(XMLINCLUDE) $(XSLTPROCFLAGS) --xinclude $(wordlist 1,2,$^) >$@
-
+INSTALL.html: installation.sgml installation-single.xsl stylesheet-text.xsl
+ sed -e "s/&version;/$(VERSION)/" $< | $(XSLTPROC) $(XSLTPROCFLAGS) $(word 2,$^) - | $(XSLTPROC) $(XSLTPROCFLAGS) $(XSLTPROC_HTML_FLAGS) $(word 3,$^) - >$@
##
## HTML
diff --git a/doc/src/sgml/installation-single.xsl b/doc/src/sgml/installation-single.xsl
new file mode 100644
index 0000000..d8f45b5
--- /dev/null
+++ b/doc/src/sgml/installation-single.xsl
@@ -0,0 +1,202 @@
+<?xml version='1.0'?>
+<!DOCTYPE xsl:stylesheet [
+<!ENTITY % version SYSTEM "version.sgml">
+%version;
+]>
+
+<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
+ version="1.0">
+
+<!--
+This is a preprocessing layer to convert the installation instructions into a
+variant without links and references to the main documentation.
+
+- To include some section from installation.sgml,
+ use the <xsl:apply-templates select="//*[@id='{section-id}']"> construction.
+
+
+- To omit or replace something in the stand-alone INSTALL file,
+ give the element (maybe wrap a plain text in <phrase>)
+ in installation.sgml a standalonetext="..." attribute.
+
+-->
+
+<xsl:output
+ doctype-public="-//OASIS//DTD DocBook XML V4.2//EN"
+ doctype-system="http://www.oasis-open.org/docbook/xml/4.2/docbookx.dtd"/>
+
+<xsl:template match="@*|node()">
+ <xsl:copy>
+ <xsl:apply-templates select="@*|node()" />
+ </xsl:copy>
+</xsl:template>
+
+<xsl:template match="/">
+
+<article id="installation">
+ <title><productname>PostgreSQL</productname> Installation from Source Code</title>
+
+ <para>
+ This document describes the installation of
+ <productname>PostgreSQL</productname> using this source code distribution.
+ </para>
+
+ <xsl:apply-templates select="//*[@id='install-short']"/>
+ <xsl:apply-templates select="//*[@id='install-requirements']"/>
+ <xsl:apply-templates select="//*[@id='install-procedure']"/>
+ <xsl:apply-templates select="//*[@id='install-post']"/>
+
+ <sect1 id="install-getting-started">
+ <title>Getting Started</title>
+
+ <para>
+ The following is a quick summary of how to get <productname>PostgreSQL</productname> up and
+ running once installed. The main documentation contains more information.
+ </para>
+
+ <procedure>
+ <step>
+ <para>
+ Create a user account for the <productname>PostgreSQL</productname>
+ server. This is the user the server will run as. For production
+ use you should create a separate, unprivileged account
+ (<quote>postgres</quote> is commonly used). If you do not have root
+ access or just want to play around, your own user account is
+ enough, but running the server as root is a security risk and
+ will not work.
+<screen><userinput>adduser postgres</userinput></screen>
+ </para>
+ </step>
+
+ <step>
+ <para>
+ Create a database installation with the <command>initdb</command>
+ command. To run <command>initdb</command> you must be logged in to your
+ <productname>PostgreSQL</productname> server account. It will not work as
+ root.
+<screen>root# <userinput>mkdir /usr/local/pgsql/data</userinput>
+root# <userinput>chown postgres /usr/local/pgsql/data</userinput>
+root# <userinput>su - postgres</userinput>
+postgres$ <userinput>/usr/local/pgsql/bin/initdb -D /usr/local/pgsql/data</userinput></screen>
+ </para>
+
+ <para>
+ The <option>-D</option> option specifies the location where the data
+ will be stored. You can use any path you want, it does not have
+ to be under the installation directory. Just make sure that the
+ server account can write to the directory (or create it, if it
+ doesn't already exist) before starting <command>initdb</command>, as
+ illustrated here.
+ </para>
+ </step>
+
+ <step>
+ <para>
+ At this point, if you did not use the <command>initdb</command> <literal>-A</literal>
+ option, you might want to modify <filename>pg_hba.conf</filename> to control
+ local access to the server before you start it. The default is to
+ trust all local users.
+ </para>
+ </step>
+
+ <step>
+ <para>
+ The previous <command>initdb</command> step should have told you how to
+ start up the database server. Do so now. The command should look
+ something like:
+<programlisting>/usr/local/pgsql/bin/postgres -D /usr/local/pgsql/data</programlisting>
+ This will start the server in the foreground. To put the server
+ in the background use something like:
+<programlisting>nohup /usr/local/pgsql/bin/postgres -D /usr/local/pgsql/data \
+ </dev/null >>server.log 2>&1 </dev/null &</programlisting>
+ </para>
+
+ <para>
+ To stop a server running in the background you can type:
+<programlisting>kill `cat /usr/local/pgsql/data/postmaster.pid`</programlisting>
+ </para>
+ </step>
+
+ <step>
+ <para>
+ Create a database:
+<screen><userinput>createdb testdb</userinput></screen>
+ Then enter:
+<screen><userinput>psql testdb</userinput></screen>
+ to connect to that database. At the prompt you can enter SQL
+ commands and start experimenting.
+ </para>
+ </step>
+ </procedure>
+ </sect1>
+
+ <sect1 id="install-whatnow">
+ <title>What Now?</title>
+
+ <para>
+ <itemizedlist>
+ <listitem>
+ <para>
+ The <productname>PostgreSQL</productname> distribution contains a
+ comprehensive documentation set, which you should read sometime.
+ After installation, the documentation can be accessed by
+ pointing your browser to
+ <filename>/usr/local/pgsql/doc/html/index.html</filename>, unless you
+ changed the installation directories.
+ </para>
+
+ <para>
+ The first few chapters of the main documentation are the Tutorial,
+ which should be your first reading if you are completely new to
+ <acronym>SQL</acronym> databases. If you are familiar with database
+ concepts then you want to proceed with part on server
+ administration, which contains information about how to set up
+ the database server, database users, and authentication.
+ </para>
+ </listitem>
+
+ <listitem>
+ <para>
+ Usually, you will want to modify your computer so that it will
+ automatically start the database server whenever it boots. Some
+ suggestions for this are in the documentation.
+ </para>
+ </listitem>
+
+ <listitem>
+ <para>
+ Run the regression tests against the installed server (using
+ <command>make installcheck</command>). If you didn't run the
+ tests before installation, you should definitely do it now. This
+ is also explained in the documentation.
+ </para>
+ </listitem>
+
+ <listitem>
+ <para>
+ By default, <productname>PostgreSQL</productname> is configured to run on
+ minimal hardware. This allows it to start up with almost any
+ hardware configuration. The default configuration is, however,
+ not designed for optimum performance. To achieve optimum
+ performance, several server parameters must be adjusted, the two
+ most common being <varname>shared_buffers</varname> and
+ <varname>work_mem</varname>.
+ Other parameters mentioned in the documentation also affect
+ performance.
+ </para>
+ </listitem>
+ </itemizedlist>
+ </para>
+ </sect1>
+
+ <xsl:apply-templates select="//*[@id='supported-platforms']"/>
+ <xsl:apply-templates select="//*[@id='installation-platform-notes']"/>
+
+</article>
+</xsl:template>
+
+<xsl:template match="*[@standalonetext]">
+ <xsl:value-of select="@standalonetext" />
+</xsl:template>
+
+</xsl:stylesheet>
diff --git a/doc/src/sgml/installation.sgml b/doc/src/sgml/installation.sgml
index a922819..1ddf105 100644
--- a/doc/src/sgml/installation.sgml
+++ b/doc/src/sgml/installation.sgml
@@ -4,22 +4,24 @@
The standalone version has some portions that are different from the version
that is integrated into the full documentation set, in particular as regards
links, so that INSTALL.html can be created without links to the main
-documentation. See standalone-profile.xsl for details.
+documentation. See installation-single.xsl for details.
-->
<chapter id="installation">
- <title>Installation from Source Code</title>
+ <title><phrase standalonetext="PostgreSQL"></phrase>
+ Installation from Source Code</title>
<indexterm zone="installation">
<primary>installation</primary>
</indexterm>
<para>
- This chapter describes the installation of
+ This <phrase standalonetext="document">chapter</phrase> describes the installation of
<productname>PostgreSQL</productname> using the source code
distribution. (If you are installing a pre-packaged distribution,
- such as an RPM or Debian package, ignore this chapter
+ such as an RPM or Debian package, ignore this
+ <phrase standalonetext="document">chapter</phrase>
and read the packager's instructions instead.)
</para>
@@ -42,7 +44,7 @@ su - postgres
/usr/local/pgsql/bin/psql test
</synopsis>
The long version is the rest of this
- <phrase>chapter</phrase>.
+ <phrase standalonetext="document">chapter</phrase>.
</para>
</sect1>
@@ -193,7 +195,7 @@ su - postgres
required version is <productname>Python</productname> 2.4.
<productname>Python 3</productname> is supported if it's
version 3.1 or later; but see
- <xref linkend="plpython-python23"/>
+ <xref standalonetext="the PL/Python documentation" linkend="plpython-python23"/>
when using Python 3.
</para>
@@ -262,7 +264,8 @@ su - postgres
<para>
To build the <productname>PostgreSQL</productname> documentation,
there is a separate set of requirements; see
- <xref linkend="docguide-toolsets"/>.
+ <xref standalonetext="the main documentation's appendix on documentation"
+ linkend="docguide-toolsets"/>.
</para>
</listitem>
</itemizedlist>
@@ -835,8 +838,8 @@ su - postgres
<para>
Build with <acronym>LDAP</acronym><indexterm><primary>LDAP</primary></indexterm>
support for authentication and connection parameter lookup (see
- <phrase id="install-ldap-links"><xref linkend="libpq-ldap"/> and
- <xref linkend="auth-ldap"/></phrase> for more information). On Unix,
+ <phrase standalonetext="the documentation about client authentication and libpq">
+ <xref linkend="libpq-ldap"/> and <xref linkend="auth-ldap"/></phrase> for more information). On Unix,
this requires the <productname>OpenLDAP</productname> package to be
installed. On Windows, the default <productname>WinLDAP</productname>
library is used. <filename>configure</filename> will check for the required
@@ -855,7 +858,7 @@ su - postgres
for <application>systemd</application><indexterm><primary>systemd</primary></indexterm>
service notifications. This improves integration if the server binary
is started under <application>systemd</application> but has no impact
- otherwise<phrase condition="standalone-ignore">; see <xref linkend="server-start"/> for more
+ otherwise<phrase standalonetext="">; see <xref linkend="server-start"/> for more
information</phrase>. <application>libsystemd</application> and the
associated header files need to be installed to be able to use this
option.
@@ -901,7 +904,7 @@ su - postgres
<term><option>--with-uuid=<replaceable>LIBRARY</replaceable></option></term>
<listitem>
<para>
- Build the <xref linkend="uuid-ossp"/> module
+ Build the <xref standalonetext="uuid-ossp" linkend="uuid-ossp"/> module
(which provides functions to generate UUIDs), using the specified
UUID library.<indexterm><primary>UUID</primary></indexterm>
<replaceable>LIBRARY</replaceable> must be one of:
@@ -968,7 +971,7 @@ su - postgres
<listitem>
<para>
Use libxslt when building the
- <xref linkend="xml2"/>
+ <xref standalonetext="xml2" linkend="xml2"/>
module. <application>xml2</application> relies on this library
to perform XSL transformations of XML.
</para>
@@ -1084,7 +1087,7 @@ su - postgres
has no support for strong random numbers on the platform.
A source of random numbers is needed for some authentication
protocols, as well as some routines in the
- <xref linkend="pgcrypto"/>
+ <xref standalonetext="pgcrypto" linkend="pgcrypto"/>
module. <option>--disable-strong-random</option> disables functionality that
requires cryptographically strong random numbers, and substitutes
a weak pseudo-random-number-generator for the generation of
@@ -1188,7 +1191,7 @@ su - postgres
code coverage testing instrumentation. When run, they
generate files in the build directory with code coverage
metrics.
- <phrase condition="standalone-ignore">See <xref linkend="regress-coverage"/>
+ <phrase standalonetext="">See <xref linkend="regress-coverage"/>
for more information.</phrase> This option is for use only with GCC
and when doing development work.
</para>
@@ -1249,7 +1252,7 @@ su - postgres
</indexterm>
Compiles <productname>PostgreSQL</productname> with support for the
dynamic tracing tool DTrace.
- <phrase condition="standalone-ignore">See <xref linkend="dynamic-trace"/>
+ <phrase standalonetext="">See <xref linkend="dynamic-trace"/>
for more information.</phrase>
</para>
@@ -1285,7 +1288,7 @@ su - postgres
<para>
Enable tests using the Perl TAP tools. This requires a Perl
installation and the Perl module <literal>IPC::Run</literal>.
- <phrase condition="standalone-ignore">See <xref linkend="regress-tap"/> for more information.</phrase>
+ <phrase standalonetext="">See <xref linkend="regress-tap"/> for more information.</phrase>
</para>
</listitem>
</varlistentry>
@@ -1442,7 +1445,7 @@ su - postgres
whether Python 2 or 3 is specified here (or otherwise
implicitly chosen) determines which variant of the PL/Python
language becomes available. See
- <xref linkend="plpython-python23"/>
+ <xref standalonetext="the PL/Python documentation" linkend="plpython-python23"/>
for more information.
</para>
</listitem>
@@ -1569,7 +1572,8 @@ PostgreSQL, contrib, and documentation successfully made. Ready to install.
<userinput>make check</userinput>
</screen>
(This won't work as root; do it as an unprivileged user.)
- See <xref linkend="regress"/> for
+ <phrase standalonetext="See the file "src/test/regress/README" and the documentation for">
+ <xref linkend="regress"/> contains</phrase>
detailed information about interpreting the test results. You can
repeat this test at any later time by issuing the same command.
</para>
@@ -1581,7 +1585,7 @@ PostgreSQL, contrib, and documentation successfully made. Ready to install.
<note>
<para>
If you are upgrading an existing system be sure to read
- <xref linkend="upgrading"/>,
+ <xref standalonetext="the documentation" linkend="upgrading"/>,
which has instructions about upgrading a
cluster.
</para>
@@ -1895,9 +1899,9 @@ export MANPATH
This section documents additional platform-specific issues
regarding the installation and setup of PostgreSQL. Be sure to
read the installation instructions, and in
- particular <xref linkend="install-requirements"/> as well. Also,
- check <xref linkend="regress"/> regarding the
- interpretation of regression test results.
+ particular <xref linkend="install-requirements"/> as well. Also, check
+ <xref standalonetext="the file "src/test/regress/README" and the documentation" linkend="regress"/>
+ regarding the interpretation of regression test results.
</para>
<para>
@@ -2247,7 +2251,7 @@ ERROR: could not load library "/opt/dbs/pgsql/lib/plperl.so": Bad address
<para>
PostgreSQL can be built using Cygwin, a Linux-like environment for
Windows, but that method is inferior to the native Windows build
- <phrase condition="standalone-ignore">(see <xref linkend="install-windows"/>)</phrase> and
+ <phrase standalonetext="">(see <xref linkend="install-windows"/>)</phrase> and
running a server under Cygwin is no longer recommended.
</para>
@@ -2441,7 +2445,7 @@ PHSS_30849 s700_800 u2comp/be/plugin library Patch
Microsoft's <productname>Visual C++</productname> compiler suite.
The MinGW build variant uses the normal build system described in
this chapter; the Visual C++ build works completely differently
- and is described in <xref linkend="install-windows"/>.
+ and is described in <xref standalonetext="the documentation" linkend="install-windows"/>.
It is a fully native build and uses no additional software like
MinGW. A ready-made installer is available on the main
PostgreSQL web site.
@@ -2602,8 +2606,9 @@ LIBOBJS = snprintf.o
<title>Using DTrace for Tracing PostgreSQL</title>
<para>
- Yes, using DTrace is possible. See <xref linkend="dynamic-trace"/> for
- further information.
+ Yes, using DTrace is possible. See
+ <xref standalonetext="the documentation" linkend="dynamic-trace"/>
+ for further information.
</para>
<para>
diff --git a/doc/src/sgml/postgres.sgml b/doc/src/sgml/postgres.sgml
index 041afdb..8ae4754 100644
--- a/doc/src/sgml/postgres.sgml
+++ b/doc/src/sgml/postgres.sgml
@@ -11,6 +11,7 @@
<!ENTITY reference SYSTEM "reference.sgml">
+<!ENTITY % local.effectivity.attrib "standalonetext CDATA #IMPLIED">
]>
<book id="postgres">
diff --git a/doc/src/sgml/standalone-install.xml b/doc/src/sgml/standalone-install.xml
deleted file mode 100644
index 62582ef..0000000
--- a/doc/src/sgml/standalone-install.xml
+++ /dev/null
@@ -1,167 +0,0 @@
-<?xml version="1.0"?>
-<!DOCTYPE article PUBLIC "-//OASIS//DTD DocBook XML V4.2//EN" "http://www.oasis-open.org/docbook/xml/4.2/docbookx.dtd">
-<!--
-This file contains the stand-alone installation instructions that end up in
-the INSTALL file. This document stitches together parts of the installation
-instructions in the main documentation with some material that only appears
-in the stand-alone version.
--->
-<article id="installation">
- <title><productname>PostgreSQL</productname> Installation from Source Code</title>
-
- <para>
- This document describes the installation of
- <productname>PostgreSQL</productname> using this source code distribution.
- </para>
-
- <xi:include href="postgres.sgml" xpointer="install-short" xmlns:xi="http://www.w3.org/2001/XInclude"/>
- <xi:include href="postgres.sgml" xpointer="install-requirements" xmlns:xi="http://www.w3.org/2001/XInclude"/>
- <xi:include href="postgres.sgml" xpointer="install-procedure" xmlns:xi="http://www.w3.org/2001/XInclude"/>
- <xi:include href="postgres.sgml" xpointer="install-post" xmlns:xi="http://www.w3.org/2001/XInclude"/>
-
- <sect1 id="install-getting-started">
- <title>Getting Started</title>
-
- <para>
- The following is a quick summary of how to get <productname>PostgreSQL</productname> up and
- running once installed. The main documentation contains more information.
- </para>
-
- <procedure>
- <step>
- <para>
- Create a user account for the <productname>PostgreSQL</productname>
- server. This is the user the server will run as. For production
- use you should create a separate, unprivileged account
- (<quote>postgres</quote> is commonly used). If you do not have root
- access or just want to play around, your own user account is
- enough, but running the server as root is a security risk and
- will not work.
-<screen><userinput>adduser postgres</userinput></screen>
- </para>
- </step>
-
- <step>
- <para>
- Create a database installation with the <command>initdb</command>
- command. To run <command>initdb</command> you must be logged in to your
- <productname>PostgreSQL</productname> server account. It will not work as
- root.
-<screen>root# <userinput>mkdir /usr/local/pgsql/data</userinput>
-root# <userinput>chown postgres /usr/local/pgsql/data</userinput>
-root# <userinput>su - postgres</userinput>
-postgres$ <userinput>/usr/local/pgsql/bin/initdb -D /usr/local/pgsql/data</userinput></screen>
- </para>
-
- <para>
- The <option>-D</option> option specifies the location where the data
- will be stored. You can use any path you want, it does not have
- to be under the installation directory. Just make sure that the
- server account can write to the directory (or create it, if it
- doesn't already exist) before starting <command>initdb</command>, as
- illustrated here.
- </para>
- </step>
-
- <step>
- <para>
- At this point, if you did not use the <command>initdb</command> <literal>-A</literal>
- option, you might want to modify <filename>pg_hba.conf</filename> to control
- local access to the server before you start it. The default is to
- trust all local users.
- </para>
- </step>
-
- <step>
- <para>
- The previous <command>initdb</command> step should have told you how to
- start up the database server. Do so now. The command should look
- something like:
-<programlisting>/usr/local/pgsql/bin/postgres -D /usr/local/pgsql/data</programlisting>
- This will start the server in the foreground. To put the server
- in the background use something like:
-<programlisting>nohup /usr/local/pgsql/bin/postgres -D /usr/local/pgsql/data \
- </dev/null >>server.log 2>&1 </dev/null &</programlisting>
- </para>
-
- <para>
- To stop a server running in the background you can type:
-<programlisting>kill `cat /usr/local/pgsql/data/postmaster.pid`</programlisting>
- </para>
- </step>
-
- <step>
- <para>
- Create a database:
-<screen><userinput>createdb testdb</userinput></screen>
- Then enter:
-<screen><userinput>psql testdb</userinput></screen>
- to connect to that database. At the prompt you can enter SQL
- commands and start experimenting.
- </para>
- </step>
- </procedure>
- </sect1>
-
- <sect1 id="install-whatnow">
- <title>What Now?</title>
-
- <para>
- <itemizedlist>
- <listitem>
- <para>
- The <productname>PostgreSQL</productname> distribution contains a
- comprehensive documentation set, which you should read sometime.
- After installation, the documentation can be accessed by
- pointing your browser to
- <filename>/usr/local/pgsql/doc/html/index.html</filename>, unless you
- changed the installation directories.
- </para>
-
- <para>
- The first few chapters of the main documentation are the Tutorial,
- which should be your first reading if you are completely new to
- <acronym>SQL</acronym> databases. If you are familiar with database
- concepts then you want to proceed with part on server
- administration, which contains information about how to set up
- the database server, database users, and authentication.
- </para>
- </listitem>
-
- <listitem>
- <para>
- Usually, you will want to modify your computer so that it will
- automatically start the database server whenever it boots. Some
- suggestions for this are in the documentation.
- </para>
- </listitem>
-
- <listitem>
- <para>
- Run the regression tests against the installed server (using
- <command>make installcheck</command>). If you didn't run the
- tests before installation, you should definitely do it now. This
- is also explained in the documentation.
- </para>
- </listitem>
-
- <listitem>
- <para>
- By default, <productname>PostgreSQL</productname> is configured to run on
- minimal hardware. This allows it to start up with almost any
- hardware configuration. The default configuration is, however,
- not designed for optimum performance. To achieve optimum
- performance, several server parameters must be adjusted, the two
- most common being <varname>shared_buffers</varname> and
- <varname>work_mem</varname>.
- Other parameters mentioned in the documentation also affect
- performance.
- </para>
- </listitem>
- </itemizedlist>
- </para>
- </sect1>
-
- <xi:include href="postgres.sgml" xpointer="supported-platforms" xmlns:xi="http://www.w3.org/2001/XInclude"/>
- <xi:include href="postgres.sgml" xpointer="installation-platform-notes" xmlns:xi="http://www.w3.org/2001/XInclude"/>
-</article>
diff --git a/doc/src/sgml/standalone-profile.xsl b/doc/src/sgml/standalone-profile.xsl
deleted file mode 100644
index ff464c1..0000000
--- a/doc/src/sgml/standalone-profile.xsl
+++ /dev/null
@@ -1,81 +0,0 @@
-<?xml version='1.0'?>
-<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
- version="1.0">
-
-<!--
-This is a preprocessing layer to convert the installation instructions into a
-variant without links and references to the main documentation.
-
-- To omit something in the stand-alone INSTALL file, give the element a
- condition="standalone-ignore" attribute.
-
-- If there is no element that exactly covers what you want to change, wrap it
- in a <phrase> element, which otherwise does nothing.
-
-- Otherwise, write a custom rule below.
--->
-
-<xsl:output
- doctype-public="-//OASIS//DTD DocBook XML V4.2//EN"
- doctype-system="http://www.oasis-open.org/docbook/xml/4.2/docbookx.dtd"/>
-
-<!-- copy everything by default -->
-
-<xsl:template match="@*|node()">
- <xsl:copy>
- <xsl:apply-templates select="@*|node()" />
- </xsl:copy>
-</xsl:template>
-
-<!-- particular conversions -->
-
-<xsl:template match="*[@condition='standalone-ignore']">
-</xsl:template>
-
-<xsl:template match="phrase/text()['chapter']">
- <xsl:text>document</xsl:text>
-</xsl:template>
-
-<xsl:template match="phrase[@id='install-ldap-links']">
- <xsl:text>the documentation about client authentication and libpq</xsl:text>
-</xsl:template>
-
-<xsl:template match="xref[@linkend='docguide-toolsets']">
- <xsl:text>the main documentation's appendix on documentation</xsl:text>
-</xsl:template>
-
-<xsl:template match="xref[@linkend='dynamic-trace']">
- <xsl:text>the documentation</xsl:text>
-</xsl:template>
-
-<xsl:template match="xref[@linkend='install-windows']">
- <xsl:text>the documentation</xsl:text>
-</xsl:template>
-
-<xsl:template match="xref[@linkend='pgcrypto']">
- <xsl:text>pgcrypto</xsl:text>
-</xsl:template>
-
-<xsl:template match="xref[@linkend='plpython-python23']">
- <xsl:text>the </xsl:text><application>PL/Python</application><xsl:text> documentation</xsl:text>
-</xsl:template>
-
-<xsl:template match="xref[@linkend='regress']">
- <xsl:text>the file </xsl:text>
- <filename>src/test/regress/README</filename>
- <xsl:text> and the documentation</xsl:text>
-</xsl:template>
-
-<xsl:template match="xref[@linkend='upgrading']">
- <xsl:text>the documentation</xsl:text>
-</xsl:template>
-
-<xsl:template match="xref[@linkend='uuid-ossp']">
- <xsl:text>uuid-ossp</xsl:text>
-</xsl:template>
-
-<xsl:template match="xref[@linkend='xml2']">
- <xsl:text>xml2</xsl:text>
-</xsl:template>
-
-</xsl:stylesheet>
^ permalink raw reply [nested|flat] 86+ messages in thread
* Re: [DOCS] Docbook 5.x
2016-04-20 14:30 Docbook 5.x Jürgen Purtz <[email protected]>
2016-05-03 19:34 ` Re: Docbook 5.x Alvaro Herrera <[email protected]>
2016-05-03 20:13 ` Re: Docbook 5.x Oleg Bartunov <[email protected]>
2016-05-04 00:44 ` Re: Docbook 5.x Peter Eisentraut <[email protected]>
2016-05-05 04:45 ` Re: Docbook 5.x Alexander Law <[email protected]>
2016-06-03 19:31 ` Re: Docbook 5.x Peter Eisentraut <[email protected]>
2016-06-04 14:28 ` Re: Docbook 5.x Alexander Law <[email protected]>
2016-06-06 12:28 ` Re: Docbook 5.x Peter Eisentraut <[email protected]>
2016-08-18 17:56 ` Re: Docbook 5.x Peter Eisentraut <[email protected]>
2016-08-19 13:14 ` Re: Docbook 5.x Alexander Law <[email protected]>
2016-08-22 18:06 ` Re: Docbook 5.x Peter Eisentraut <[email protected]>
2016-08-23 14:23 ` Re: Docbook 5.x Alexander Law <[email protected]>
2016-09-14 11:18 ` Re: Docbook 5.x Alexander Law <[email protected]>
2016-11-08 13:25 ` Re: Docbook 5.x Peter Eisentraut <[email protected]>
2016-11-09 10:00 ` Re: Docbook 5.x Alexander Law <[email protected]>
2016-11-16 11:30 ` Re: Docbook 5.x Alexander Law <[email protected]>
2017-02-28 08:55 ` Re: Docbook 5.x Alexander Law <[email protected]>
2017-09-06 15:54 ` Re: Docbook 5.x Peter Eisentraut <[email protected]>
2017-09-08 12:30 ` Re: Docbook 5.x Alexander Lakhin <[email protected]>
2017-09-15 14:32 ` Re: Docbook 5.x Peter Eisentraut <[email protected]>
2017-09-15 18:54 ` Re: Docbook 5.x Jürgen Purtz <[email protected]>
2017-09-18 14:38 ` Re: Docbook 5.x Alexander Lakhin <[email protected]>
2017-09-19 20:05 ` Re: Docbook 5.x Peter Eisentraut <[email protected]>
2017-09-20 13:00 ` Re: Docbook 5.x Alexander Lakhin <[email protected]>
2017-09-27 15:38 ` Re: Docbook 5.x Peter Eisentraut <[email protected]>
2017-09-27 16:11 ` Re: Docbook 5.x Alexander Lakhin <[email protected]>
2017-09-27 19:51 ` Re: Docbook 5.x Alexander Lakhin <[email protected]>
2017-11-23 14:53 ` Re: [DOCS] Docbook 5.x Peter Eisentraut <[email protected]>
2017-11-25 05:50 ` Re: [DOCS] Docbook 5.x Alexander Lakhin <[email protected]>
@ 2017-11-28 16:02 ` Peter Eisentraut <[email protected]>
2017-11-28 16:55 ` Re: [DOCS] Docbook 5.x Alexander Lakhin <[email protected]>
0 siblings, 1 reply; 86+ messages in thread
From: Peter Eisentraut @ 2017-11-28 16:02 UTC (permalink / raw)
To: Alexander Lakhin <[email protected]>; Jürgen Purtz <[email protected]>; +Cc: pgsql-docs; Tom Lane <[email protected]>
On 11/25/17 00:50, Alexander Lakhin wrote:
> Please, consider applying the attached patch. It produces the same
> INSTALL and is much better in the following aspects.
>
> 1. All the INSTALL content is placed in two files (installation.sgml and
> installation-single.xsl) instead of three (installation.sgml,
> standalone-install.xml, standalone-profile.xsl).
> 2. There are no unreadable and untranslatable (in context) constructions
> such as
> <xsl:template match="xref[@linkend='plpython-python23']">
> <xsl:text>the
> </xsl:text><application>PL/Python</application><xsl:text>
> documentation</xsl:text>
> </xsl:template>
> (Sometimes translators need to replace larger fragments.)
> 3. It uses only XSLT (which we use already), no xi:include.
> 4. It doesn't generate complete postgres.sgml to process only the
> installation section.
What is the standalonetext attribute? I don't see that in the DTD.
Wouldn't that fail validation?
Also, the makefile fragments need to be written differently. You can't
use pipes; that would not catch any errors.
--
Peter Eisentraut http://www.2ndQuadrant.com/
PostgreSQL Development, 24x7 Support, Remote DBA, Training & Services
^ permalink raw reply [nested|flat] 86+ messages in thread
* Re: [DOCS] Docbook 5.x
2016-04-20 14:30 Docbook 5.x Jürgen Purtz <[email protected]>
2016-05-03 19:34 ` Re: Docbook 5.x Alvaro Herrera <[email protected]>
2016-05-03 20:13 ` Re: Docbook 5.x Oleg Bartunov <[email protected]>
2016-05-04 00:44 ` Re: Docbook 5.x Peter Eisentraut <[email protected]>
2016-05-05 04:45 ` Re: Docbook 5.x Alexander Law <[email protected]>
2016-06-03 19:31 ` Re: Docbook 5.x Peter Eisentraut <[email protected]>
2016-06-04 14:28 ` Re: Docbook 5.x Alexander Law <[email protected]>
2016-06-06 12:28 ` Re: Docbook 5.x Peter Eisentraut <[email protected]>
2016-08-18 17:56 ` Re: Docbook 5.x Peter Eisentraut <[email protected]>
2016-08-19 13:14 ` Re: Docbook 5.x Alexander Law <[email protected]>
2016-08-22 18:06 ` Re: Docbook 5.x Peter Eisentraut <[email protected]>
2016-08-23 14:23 ` Re: Docbook 5.x Alexander Law <[email protected]>
2016-09-14 11:18 ` Re: Docbook 5.x Alexander Law <[email protected]>
2016-11-08 13:25 ` Re: Docbook 5.x Peter Eisentraut <[email protected]>
2016-11-09 10:00 ` Re: Docbook 5.x Alexander Law <[email protected]>
2016-11-16 11:30 ` Re: Docbook 5.x Alexander Law <[email protected]>
2017-02-28 08:55 ` Re: Docbook 5.x Alexander Law <[email protected]>
2017-09-06 15:54 ` Re: Docbook 5.x Peter Eisentraut <[email protected]>
2017-09-08 12:30 ` Re: Docbook 5.x Alexander Lakhin <[email protected]>
2017-09-15 14:32 ` Re: Docbook 5.x Peter Eisentraut <[email protected]>
2017-09-15 18:54 ` Re: Docbook 5.x Jürgen Purtz <[email protected]>
2017-09-18 14:38 ` Re: Docbook 5.x Alexander Lakhin <[email protected]>
2017-09-19 20:05 ` Re: Docbook 5.x Peter Eisentraut <[email protected]>
2017-09-20 13:00 ` Re: Docbook 5.x Alexander Lakhin <[email protected]>
2017-09-27 15:38 ` Re: Docbook 5.x Peter Eisentraut <[email protected]>
2017-09-27 16:11 ` Re: Docbook 5.x Alexander Lakhin <[email protected]>
2017-09-27 19:51 ` Re: Docbook 5.x Alexander Lakhin <[email protected]>
2017-11-23 14:53 ` Re: [DOCS] Docbook 5.x Peter Eisentraut <[email protected]>
2017-11-25 05:50 ` Re: [DOCS] Docbook 5.x Alexander Lakhin <[email protected]>
2017-11-28 16:02 ` Re: [DOCS] Docbook 5.x Peter Eisentraut <[email protected]>
@ 2017-11-28 16:55 ` Alexander Lakhin <[email protected]>
0 siblings, 0 replies; 86+ messages in thread
From: Alexander Lakhin @ 2017-11-28 16:55 UTC (permalink / raw)
To: Peter Eisentraut <[email protected]>; Jürgen Purtz <[email protected]>; +Cc: pgsql-docs; Tom Lane <[email protected]>
Hello Peter,
28.11.2017 19:02, Peter Eisentraut wrote:
>
> What is the standalonetext attribute? I don't see that in the DTD.
> Wouldn't that fail validation?
I've added it to postgres.sgml as allowed by DocBook standard:
http://www.sagehill.net/docbookxsl/AddProfileAtt.html
+<!ENTITY % local.effectivity.attrib "standalonetext CDATA #IMPLIED">
> Also, the makefile fragments need to be written differently. You can't
> use pipes; that would not catch any errors.
I believe, that the last xsltproc will fail in case of error in previous
command(s) as it will not get valid xml. For example, if sed failed with
error, I get:
-:1: parser error : Document is empty
Best regards,
------
Alexander Lakhin
Postgres Professional: http://www.postgrespro.com
The Russian Postgres Company
^ permalink raw reply [nested|flat] 86+ messages in thread
* Re: Docbook 5.x
2016-04-20 14:30 Docbook 5.x Jürgen Purtz <[email protected]>
2016-05-03 19:34 ` Re: Docbook 5.x Alvaro Herrera <[email protected]>
2016-05-03 20:13 ` Re: Docbook 5.x Oleg Bartunov <[email protected]>
@ 2016-05-04 14:44 ` Jürgen Purtz <[email protected]>
2016-05-04 14:51 ` Re: Docbook 5.x Tom Lane <[email protected]>
2016-05-04 15:08 ` Re: Docbook 5.x Alexander Law <[email protected]>
2016-05-04 15:18 ` Re: Docbook 5.x Alvaro Herrera <[email protected]>
1 sibling, 3 replies; 86+ messages in thread
From: Jürgen Purtz @ 2016-05-04 14:44 UTC (permalink / raw)
To: pgsql-docs
Hello,
I measured following elapsed times on an Intel i5 processor:
1. generate all HTML files with dsl script (make html): 0:48 min.
2. generate all HTML files with xslt script (make xslthtml): 16:01 min.
3. generate all HTML files with xslt script in the new environment
(pure Docbook5): 4:07 min.
4. Generating different things via dsl scripts in the new environment
may be possible. But the changelog of the Docbook5 dsl scripts
shows, that the last modification occurred in 2004 - this way is a
dead end.
There is one principle and a lot of minor differences between 2 and 3.
Solution 2 is based on an xml-file and xslt scripts which are based on
Docbook4. The basic difference to 3 is, that in 3 everything is Docbook5
compliant: there are only Docbook5 xml- and xslt-files (as my workflow
is: db4 --> xml --> db5 -- (db5 xslt) --> html). The minor differences
concerns the fact, that actually there are errors in my xml files and
that I made only a few parameterisation to the Docbook5 standard xslt
files - no optimization at all.
I used following tools: perl, xmllint and xsltproc. osx and OpenJade are
obsolete in the new environment (so far, there is much more work to do).
Jürgen Purtz
On 03.05.2016 22:13, Oleg Bartunov wrote:
>
>
> On Tue, May 3, 2016 at 10:34 PM, Alvaro Herrera
> <[email protected] <mailto:[email protected]>> wrote:
>
> Jürgen Purtz wrote:
> > Hi,
> > actually we use DocBook V4.2 for the PostgreSQL manuals. I
> suggest an
> > upgrade to DocBook 5.x. This sounds simple, but it will be a
> long process
> > with many sub-tasks.
>
> Yes, agreed. The killer objection placed last time was that it took
> something like 10x longer to generate the HTML using the XML-based
> toolchain than the SGML-based ones. If this is not fixed, let's
> forget
> about this whole thing until it is. So, would you time the process
> using both toolchains and report back?
>
>
> As it stated in
> http://www.postgresql.org/message-id/[email protected]
> the xml performance may be greatly improved. Alexander, what is
> current state of art of your patch ? How slow is xml in compare to sgml ?
>
>
>
> --
> Álvaro Herrera http://www.2ndQuadrant.com/
> PostgreSQL Development, 24x7 Support, Remote DBA, Training & Services
>
>
> --
> Sent via pgsql-docs mailing list ([email protected]
> <mailto:[email protected]>)
> To make changes to your subscription:
> http://www.postgresql.org/mailpref/pgsql-docs
>
>
^ permalink raw reply [nested|flat] 86+ messages in thread
* Re: Docbook 5.x
2016-04-20 14:30 Docbook 5.x Jürgen Purtz <[email protected]>
2016-05-03 19:34 ` Re: Docbook 5.x Alvaro Herrera <[email protected]>
2016-05-03 20:13 ` Re: Docbook 5.x Oleg Bartunov <[email protected]>
2016-05-04 14:44 ` Re: Docbook 5.x Jürgen Purtz <[email protected]>
@ 2016-05-04 14:51 ` Tom Lane <[email protected]>
2016-05-04 15:30 ` Re: Docbook 5.x Jürgen Purtz <[email protected]>
2 siblings, 1 reply; 86+ messages in thread
From: Tom Lane @ 2016-05-04 14:51 UTC (permalink / raw)
To: Jürgen Purtz <[email protected]>; +Cc: pgsql-docs
=?UTF-8?Q?J=c3=bcrgen_Purtz?= <[email protected]> writes:
> I measured following elapsed times on an Intel i5 processor:
> 1. generate all HTML files with dsl script (make html): 0:48 min.
> 2. generate all HTML files with xslt script (make xslthtml): 16:01 min.
> 3. generate all HTML files with xslt script in the new environment
> (pure Docbook5): 4:07 min.
> 4. Generating different things via dsl scripts in the new environment
> may be possible. But the changelog of the Docbook5 dsl scripts
> shows, that the last modification occurred in 2004 - this way is a
> dead end.
Ouch. What about output to PDF? While we don't care as much about
that as HTML for day-to-day use, it has to be feasible (ie, not hours).
regards, tom lane
--
Sent via pgsql-docs mailing list ([email protected])
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-docs
^ permalink raw reply [nested|flat] 86+ messages in thread
* Re: Docbook 5.x
2016-04-20 14:30 Docbook 5.x Jürgen Purtz <[email protected]>
2016-05-03 19:34 ` Re: Docbook 5.x Alvaro Herrera <[email protected]>
2016-05-03 20:13 ` Re: Docbook 5.x Oleg Bartunov <[email protected]>
2016-05-04 14:44 ` Re: Docbook 5.x Jürgen Purtz <[email protected]>
2016-05-04 14:51 ` Re: Docbook 5.x Tom Lane <[email protected]>
@ 2016-05-04 15:30 ` Jürgen Purtz <[email protected]>
2016-05-12 19:46 ` Re: Docbook 5.x Jürgen Purtz <[email protected]>
0 siblings, 1 reply; 86+ messages in thread
From: Jürgen Purtz @ 2016-05-04 15:30 UTC (permalink / raw)
To: pgsql-docs
On 04.05.2016 16:51, Tom Lane wrote:
> Ouch. What about output to PDF? While we don't care as much about
> that as HTML for day-to-day use, it has to be feasible (ie, not hours).
>
> regards, tom lane
Actually I made tests using fop on single files (the converted sgml
files). This works within seconds and in my very first mail from
2016-04-20 I added the results for the 'advanced.xml' file. When I try
to convert the complete 'postgres_all.xml' file, fop crashes after some
minutes. As fop is a Java application, it is possible that the assigned
main memory is short (-Xms -Xmx, ...) - or it comes from some other Java
specific issues. I will work on this in the next days.
Jürgen Purtz
--
Sent via pgsql-docs mailing list ([email protected])
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-docs
^ permalink raw reply [nested|flat] 86+ messages in thread
* Re: Docbook 5.x
2016-04-20 14:30 Docbook 5.x Jürgen Purtz <[email protected]>
2016-05-03 19:34 ` Re: Docbook 5.x Alvaro Herrera <[email protected]>
2016-05-03 20:13 ` Re: Docbook 5.x Oleg Bartunov <[email protected]>
2016-05-04 14:44 ` Re: Docbook 5.x Jürgen Purtz <[email protected]>
2016-05-04 14:51 ` Re: Docbook 5.x Tom Lane <[email protected]>
2016-05-04 15:30 ` Re: Docbook 5.x Jürgen Purtz <[email protected]>
@ 2016-05-12 19:46 ` Jürgen Purtz <[email protected]>
2016-05-12 19:59 ` Re: Docbook 5.x Alvaro Herrera <[email protected]>
0 siblings, 1 reply; 86+ messages in thread
From: Jürgen Purtz @ 2016-05-12 19:46 UTC (permalink / raw)
To: pgsql-docs
Hi,
after some manual interventions (which must become part of an algorithm)
it's possible to created the complete PDF file for the db4 production
chain: *.sgml -- (perl) --> *.xml and after that step: postgres.xml --
(evaluate XInclude with xmllint) --> postgres_all.xml -- (xsltproc using
standard db4 stylesheet) --> postgres_all.fo -- (fop) -->
postgres_all.pdf. The fo/pdf generation takes about 1 minute.
Actually the layout of the resulting pdf file differs from the original
one as I used only standard scripts without any adoption to the
PostgreSQL styles. Additionally I'm missing some of the links.
Jürgen Purtz
On 04.05.2016 17:30, Jürgen Purtz wrote:
> On 04.05.2016 16:51, Tom Lane wrote:
>> Ouch. What about output to PDF? While we don't care as much about
>> that as HTML for day-to-day use, it has to be feasible (ie, not hours).
>>
>> regards, tom lane
>
> Actually I made tests using fop on single files (the converted sgml
> files). This works within seconds and in my very first mail from
> 2016-04-20 I added the results for the 'advanced.xml' file. When I try
> to convert the complete 'postgres_all.xml' file, fop crashes after
> some minutes. As fop is a Java application, it is possible that the
> assigned main memory is short (-Xms -Xmx, ...) - or it comes from some
> other Java specific issues. I will work on this in the next days.
>
> Jürgen Purtz
>
--
Sent via pgsql-docs mailing list ([email protected])
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-docs
^ permalink raw reply [nested|flat] 86+ messages in thread
* Re: Docbook 5.x
2016-04-20 14:30 Docbook 5.x Jürgen Purtz <[email protected]>
2016-05-03 19:34 ` Re: Docbook 5.x Alvaro Herrera <[email protected]>
2016-05-03 20:13 ` Re: Docbook 5.x Oleg Bartunov <[email protected]>
2016-05-04 14:44 ` Re: Docbook 5.x Jürgen Purtz <[email protected]>
2016-05-04 14:51 ` Re: Docbook 5.x Tom Lane <[email protected]>
2016-05-04 15:30 ` Re: Docbook 5.x Jürgen Purtz <[email protected]>
2016-05-12 19:46 ` Re: Docbook 5.x Jürgen Purtz <[email protected]>
@ 2016-05-12 19:59 ` Alvaro Herrera <[email protected]>
0 siblings, 0 replies; 86+ messages in thread
From: Alvaro Herrera @ 2016-05-12 19:59 UTC (permalink / raw)
To: Jürgen Purtz <[email protected]>; +Cc: pgsql-docs
Jürgen Purtz wrote:
> after some manual interventions (which must become part of an algorithm)
> it's possible to created the complete PDF file for the db4 production chain:
> *.sgml -- (perl) --> *.xml and after that step: postgres.xml -- (evaluate
> XInclude with xmllint) --> postgres_all.xml -- (xsltproc using standard db4
> stylesheet) --> postgres_all.fo -- (fop) --> postgres_all.pdf. The fo/pdf
> generation takes about 1 minute.
Uh? So generating the PDF is much quicker than generating the HTML?
That's strange, but if true, then I'm happy about it.
> Actually the layout of the resulting pdf file differs from the original one
> as I used only standard scripts without any adoption to the PostgreSQL
> styles.
Surely this can be sorted out.
> Additionally I'm missing some of the links.
Not sure what you mean here.
Did you figure a way to generate the INSTALL file?
--
Álvaro Herrera http://www.2ndQuadrant.com/
PostgreSQL Development, 24x7 Support, Remote DBA, Training & Services
--
Sent via pgsql-docs mailing list ([email protected])
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-docs
^ permalink raw reply [nested|flat] 86+ messages in thread
* Re: Docbook 5.x
2016-04-20 14:30 Docbook 5.x Jürgen Purtz <[email protected]>
2016-05-03 19:34 ` Re: Docbook 5.x Alvaro Herrera <[email protected]>
2016-05-03 20:13 ` Re: Docbook 5.x Oleg Bartunov <[email protected]>
2016-05-04 14:44 ` Re: Docbook 5.x Jürgen Purtz <[email protected]>
@ 2016-05-04 15:08 ` Alexander Law <[email protected]>
2016-05-04 15:21 ` Re: Docbook 5.x Alvaro Herrera <[email protected]>
2016-05-04 16:52 ` Re: Docbook 5.x Jürgen Purtz <[email protected]>
2016-05-05 01:09 ` Re: Docbook 5.x Peter Eisentraut <[email protected]>
2 siblings, 3 replies; 86+ messages in thread
From: Alexander Law @ 2016-05-04 15:08 UTC (permalink / raw)
To: Jürgen Purtz <[email protected]>; pgsql-docs
Hello Jürgen,
As was stated in the aforementioned thread, solution 2 can be much (8x)
faster with some xslt optimizations, but I think now we should outline
some roadmap before we start to prepare patches and so.
Maybe we should convert to XML with DocBook4 at first step?
Then, once we get everything stabilized, we can upgrade to DocBook5.
Shouldn't we decompose the conversion procedure, so we could perform
fully automatic conversion without any manual changes, and then fix
non-valid situations, you described before?
And one more question - Is conversion to DocBook5 your final goal? Or
maybe you have any further plans regarding documentation, such as
translating it to Deutsch?
Best regards,
Alexander
04.05.2016 17:44, Jürgen Purtz пишет:
> Hello,
>
> I measured following elapsed times on an Intel i5 processor:
>
> 1. generate all HTML files with dsl script (make html): 0:48 min.
> 2. generate all HTML files with xslt script (make xslthtml): 16:01 min.
> 3. generate all HTML files with xslt script in the new environment
> (pure Docbook5): 4:07 min.
> 4. Generating different things via dsl scripts in the new environment
> may be possible. But the changelog of the Docbook5 dsl scripts
> shows, that the last modification occurred in 2004 - this way is a
> dead end.
>
> There is one principle and a lot of minor differences between 2 and 3.
> Solution 2 is based on an xml-file and xslt scripts which are based on
> Docbook4. The basic difference to 3 is, that in 3 everything is
> Docbook5 compliant: there are only Docbook5 xml- and xslt-files (as my
> workflow is: db4 --> xml --> db5 -- (db5 xslt) --> html). The minor
> differences concerns the fact, that actually there are errors in my
> xml files and that I made only a few parameterisation to the Docbook5
> standard xslt files - no optimization at all.
>
> I used following tools: perl, xmllint and xsltproc. osx and OpenJade
> are obsolete in the new environment (so far, there is much more work
> to do).
>
> Jürgen Purtz
>
>
>
> On 03.05.2016 22:13, Oleg Bartunov wrote:
>>
>>
>> On Tue, May 3, 2016 at 10:34 PM, Alvaro Herrera
>> <[email protected]> wrote:
>>
>> Jürgen Purtz wrote:
>> > Hi,
>> > actually we use DocBook V4.2 for the PostgreSQL manuals. I
>> suggest an
>> > upgrade to DocBook 5.x. This sounds simple, but it will be a
>> long process
>> > with many sub-tasks.
>>
>> Yes, agreed. The killer objection placed last time was that it took
>> something like 10x longer to generate the HTML using the XML-based
>> toolchain than the SGML-based ones. If this is not fixed, let's
>> forget
>> about this whole thing until it is. So, would you time the process
>> using both toolchains and report back?
>>
>>
>> As it stated in
>> http://www.postgresql.org/message-id/[email protected]
>> the xml performance may be greatly improved. Alexander, what is
>> current state of art of your patch ? How slow is xml in compare to sgml ?
>>
>>
>>
>> --
>> Álvaro Herrera http://www.2ndQuadrant.com/
>> PostgreSQL Development, 24x7 Support, Remote DBA, Training & Services
>>
>>
>> --
>> Sent via pgsql-docs mailing list ([email protected])
>> To make changes to your subscription:
>> http://www.postgresql.org/mailpref/pgsql-docs
>>
>>
>
^ permalink raw reply [nested|flat] 86+ messages in thread
* Re: Docbook 5.x
2016-04-20 14:30 Docbook 5.x Jürgen Purtz <[email protected]>
2016-05-03 19:34 ` Re: Docbook 5.x Alvaro Herrera <[email protected]>
2016-05-03 20:13 ` Re: Docbook 5.x Oleg Bartunov <[email protected]>
2016-05-04 14:44 ` Re: Docbook 5.x Jürgen Purtz <[email protected]>
2016-05-04 15:08 ` Re: Docbook 5.x Alexander Law <[email protected]>
@ 2016-05-04 15:21 ` Alvaro Herrera <[email protected]>
2016-05-04 15:34 ` Re: Docbook 5.x Alexander Law <[email protected]>
2 siblings, 1 reply; 86+ messages in thread
From: Alvaro Herrera @ 2016-05-04 15:21 UTC (permalink / raw)
To: Alexander Law <[email protected]>; +Cc: Jürgen Purtz <[email protected]>; pgsql-docs
Alexander Law wrote:
> Hello Jürgen,
>
> As was stated in the aforementioned thread, solution 2 can be much (8x)
> faster with some xslt optimizations, but I think now we should outline some
> roadmap before we start to prepare patches and so.
Can the Docbook5 build be sped up with similar hacks?
If the stylesheet tweaks you did are universally useful, why not
contribute them back to upstream Docbook?
> Maybe we should convert to XML with DocBook4 at first step?
> Then, once we get everything stabilized, we can upgrade to DocBook5.
Not sure there's much point in having an intermediate step in the
repository that makes the doc build so much slower. I'd rather go to
Docbook5 straight away.
> Shouldn't we decompose the conversion procedure, so we could perform fully
> automatic conversion without any manual changes, and then fix non-valid
> situations, you described before?
I don't think so -- this means leaving a state in the repo in which the
docs don't actually build.
--
Álvaro Herrera http://www.2ndQuadrant.com/
PostgreSQL Development, 24x7 Support, Remote DBA, Training & Services
--
Sent via pgsql-docs mailing list ([email protected])
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-docs
^ permalink raw reply [nested|flat] 86+ messages in thread
* Re: Docbook 5.x
2016-04-20 14:30 Docbook 5.x Jürgen Purtz <[email protected]>
2016-05-03 19:34 ` Re: Docbook 5.x Alvaro Herrera <[email protected]>
2016-05-03 20:13 ` Re: Docbook 5.x Oleg Bartunov <[email protected]>
2016-05-04 14:44 ` Re: Docbook 5.x Jürgen Purtz <[email protected]>
2016-05-04 15:08 ` Re: Docbook 5.x Alexander Law <[email protected]>
2016-05-04 15:21 ` Re: Docbook 5.x Alvaro Herrera <[email protected]>
@ 2016-05-04 15:34 ` Alexander Law <[email protected]>
0 siblings, 0 replies; 86+ messages in thread
From: Alexander Law @ 2016-05-04 15:34 UTC (permalink / raw)
To: Alvaro Herrera <[email protected]>; +Cc: Jürgen Purtz <[email protected]>; pgsql-docs
Hello Alvaro,
04.05.2016 18:21, Alvaro Herrera wrote:
> Alexander Law wrote:
>> Hello Jürgen,
>>
>> As was stated in the aforementioned thread, solution 2 can be much (8x)
>> faster with some xslt optimizations, but I think now we should outline some
>> roadmap before we start to prepare patches and so.
> Can the Docbook5 build be sped up with similar hacks?
>
> If the stylesheet tweaks you did are universally useful, why not
> contribute them back to upstream Docbook?
I can't guarantee that these tweaks with work for all the DocBook
documents, though I've made sure that the result is the same for the
postgresql doc html's (as I stated in
http://www.postgresql.org/message-id/[email protected]).
>
>> Maybe we should convert to XML with DocBook4 at first step?
>> Then, once we get everything stabilized, we can upgrade to DocBook5.
> Not sure there's much point in having an intermediate step in the
> repository that makes the doc build so much slower. I'd rather go to
> Docbook5 straight away.
>
>> Shouldn't we decompose the conversion procedure, so we could perform fully
>> automatic conversion without any manual changes, and then fix non-valid
>> situations, you described before?
> I don't think so -- this means leaving a state in the repo in which the
> docs don't actually build.
>
I mean we could build the docs just as we do it now (as DocBook4). So we
can continue to use existing toolchain (and Makefile as it can generate
html and pdf from XML), just change a format for now.
--
Sent via pgsql-docs mailing list ([email protected])
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-docs
^ permalink raw reply [nested|flat] 86+ messages in thread
* Re: Docbook 5.x
2016-04-20 14:30 Docbook 5.x Jürgen Purtz <[email protected]>
2016-05-03 19:34 ` Re: Docbook 5.x Alvaro Herrera <[email protected]>
2016-05-03 20:13 ` Re: Docbook 5.x Oleg Bartunov <[email protected]>
2016-05-04 14:44 ` Re: Docbook 5.x Jürgen Purtz <[email protected]>
2016-05-04 15:08 ` Re: Docbook 5.x Alexander Law <[email protected]>
@ 2016-05-04 16:52 ` Jürgen Purtz <[email protected]>
2016-05-04 17:12 ` Re: Docbook 5.x Alvaro Herrera <[email protected]>
2016-05-04 18:00 ` Re: Docbook 5.x Alexander Law <[email protected]>
2 siblings, 2 replies; 86+ messages in thread
From: Jürgen Purtz @ 2016-05-04 16:52 UTC (permalink / raw)
To: pgsql-docs
On 04.05.2016 17:08, Alexander Law wrote:
> As was stated in the aforementioned thread, solution 2 can be much
> (8x) faster with some xslt optimizations, but I think now we should
> outline some roadmap before we start to prepare patches and so.
> Maybe we should convert to XML with DocBook4 at first step?
> Then, once we get everything stabilized, we can upgrade to DocBook5.
> Shouldn't we decompose the conversion procedure, so we could perform
> fully automatic conversion without any manual changes, and then fix
> non-valid situations, you described before?
Hello Alexander,
I havn't seen your xslt optimization so far. What have you done? Where
can I find the optimized script or a description?
"Divide and conquer" is a good strategy and people use it in many cases.
As you have stated, there are two major steps: from db4-sgml to db4-xml
and from there to db5-xml. In parallel to the second one we shall
migrate from dsl scripts to db5-xslt scripts. Your idea to go step by
step and stabilise at the intermediate level is good in general. But in
this case it may be unnecessary. The first step is very small. It
consists mainly of the elimination of shorttags and empty elements. This
is a pure formal act without risk. If we would stop at this point,
people are forced to switch their environment, eg .emacs from db4-sgml
to db4-xml - and after the second step to db5-xml. This is possible -
but the twice changing will bring (possibly) more confusion than
advantages. The real challenge is the second step as it implies some
manual modifications (entities, non-valid markup in sense of db5-schema)
and a switch to a different output chain. Maybe we can live for a while
with some files, which are not valid against db5-schema - as far as the
output chain produces correct results.
Jürgen Purtz
--
Sent via pgsql-docs mailing list ([email protected])
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-docs
^ permalink raw reply [nested|flat] 86+ messages in thread
* Re: Docbook 5.x
2016-04-20 14:30 Docbook 5.x Jürgen Purtz <[email protected]>
2016-05-03 19:34 ` Re: Docbook 5.x Alvaro Herrera <[email protected]>
2016-05-03 20:13 ` Re: Docbook 5.x Oleg Bartunov <[email protected]>
2016-05-04 14:44 ` Re: Docbook 5.x Jürgen Purtz <[email protected]>
2016-05-04 15:08 ` Re: Docbook 5.x Alexander Law <[email protected]>
2016-05-04 16:52 ` Re: Docbook 5.x Jürgen Purtz <[email protected]>
@ 2016-05-04 17:12 ` Alvaro Herrera <[email protected]>
2016-05-04 18:06 ` Re: Docbook 5.x Jürgen Purtz <[email protected]>
1 sibling, 1 reply; 86+ messages in thread
From: Alvaro Herrera @ 2016-05-04 17:12 UTC (permalink / raw)
To: Jürgen Purtz <[email protected]>; +Cc: pgsql-docs
Jürgen Purtz wrote:
> The real challenge is the second
> step as it implies some manual modifications (entities, non-valid markup in
> sense of db5-schema) and a switch to a different output chain. Maybe we can
> live for a while with some files, which are not valid against db5-schema -
> as far as the output chain produces correct results.
Speaking of entities, I noticed you changed some entities such as
— to __mdash__ and such. That's not acceptable. What is
Docbook5's accepted way to enter such characters?
--
Álvaro Herrera http://www.2ndQuadrant.com/
PostgreSQL Development, 24x7 Support, Remote DBA, Training & Services
--
Sent via pgsql-docs mailing list ([email protected])
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-docs
^ permalink raw reply [nested|flat] 86+ messages in thread
* Re: Docbook 5.x
2016-04-20 14:30 Docbook 5.x Jürgen Purtz <[email protected]>
2016-05-03 19:34 ` Re: Docbook 5.x Alvaro Herrera <[email protected]>
2016-05-03 20:13 ` Re: Docbook 5.x Oleg Bartunov <[email protected]>
2016-05-04 14:44 ` Re: Docbook 5.x Jürgen Purtz <[email protected]>
2016-05-04 15:08 ` Re: Docbook 5.x Alexander Law <[email protected]>
2016-05-04 16:52 ` Re: Docbook 5.x Jürgen Purtz <[email protected]>
2016-05-04 17:12 ` Re: Docbook 5.x Alvaro Herrera <[email protected]>
@ 2016-05-04 18:06 ` Jürgen Purtz <[email protected]>
2016-05-04 18:20 ` Re: Docbook 5.x Alvaro Herrera <[email protected]>
0 siblings, 1 reply; 86+ messages in thread
From: Jürgen Purtz @ 2016-05-04 18:06 UTC (permalink / raw)
To: pgsql-docs
Hello Alvaro,
yes, character entities respectively their values must be kept (what you
have seen is an intermediate state). We will use utf-8, so every
possible Unicode code point can be used directly. But we use not only
character entities, there are also parameter entities and external
entities. The external entities will be replaced by xi:XInclude. At last
there are 4 parameter entities, to whom I actually have no solution:
%standalone-ignore; %standalone-include; %include-index;
%include-xslt-index; . But they should not be a show-stopper.
Jürgen Purtz
On 04.05.2016 19:12, Alvaro Herrera wrote:
> Jürgen Purtz wrote:
>
>> The real challenge is the second
>> step as it implies some manual modifications (entities, non-valid markup in
>> sense of db5-schema) and a switch to a different output chain. Maybe we can
>> live for a while with some files, which are not valid against db5-schema -
>> as far as the output chain produces correct results.
> Speaking of entities, I noticed you changed some entities such as
> — to __mdash__ and such. That's not acceptable. What is
> Docbook5's accepted way to enter such characters?
>
--
Sent via pgsql-docs mailing list ([email protected])
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-docs
^ permalink raw reply [nested|flat] 86+ messages in thread
* Re: Docbook 5.x
2016-04-20 14:30 Docbook 5.x Jürgen Purtz <[email protected]>
2016-05-03 19:34 ` Re: Docbook 5.x Alvaro Herrera <[email protected]>
2016-05-03 20:13 ` Re: Docbook 5.x Oleg Bartunov <[email protected]>
2016-05-04 14:44 ` Re: Docbook 5.x Jürgen Purtz <[email protected]>
2016-05-04 15:08 ` Re: Docbook 5.x Alexander Law <[email protected]>
2016-05-04 16:52 ` Re: Docbook 5.x Jürgen Purtz <[email protected]>
2016-05-04 17:12 ` Re: Docbook 5.x Alvaro Herrera <[email protected]>
2016-05-04 18:06 ` Re: Docbook 5.x Jürgen Purtz <[email protected]>
@ 2016-05-04 18:20 ` Alvaro Herrera <[email protected]>
0 siblings, 0 replies; 86+ messages in thread
From: Alvaro Herrera @ 2016-05-04 18:20 UTC (permalink / raw)
To: Jürgen Purtz <[email protected]>; +Cc: pgsql-docs
Jürgen Purtz wrote:
> Hello Alvaro,
>
> yes, character entities respectively their values must be kept (what you
> have seen is an intermediate state). We will use utf-8, so every possible
> Unicode code point can be used directly. But we use not only character
> entities, there are also parameter entities and external entities. The
> external entities will be replaced by xi:XInclude.
OK. Currently we have no non-ASCII chars in our source code, so this
would be without precedent, but I think all modern tools should cope.
The only pain point may be Tom Lane's mail client, which is unique in
still using us-ascii encoding.
> At last there are 4 parameter entities, to whom I actually have no
> solution: %standalone-ignore; %standalone-include; %include-index;
> %include-xslt-index; . But they should not be a show-stopper.
Hmm? I think we use these entities to generate text files that are
distributed in the tarball. How would we generate these files in the
Docbook5 XML world?
--
Álvaro Herrera http://www.2ndQuadrant.com/
PostgreSQL Development, 24x7 Support, Remote DBA, Training & Services
--
Sent via pgsql-docs mailing list ([email protected])
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-docs
^ permalink raw reply [nested|flat] 86+ messages in thread
* Re: Docbook 5.x
2016-04-20 14:30 Docbook 5.x Jürgen Purtz <[email protected]>
2016-05-03 19:34 ` Re: Docbook 5.x Alvaro Herrera <[email protected]>
2016-05-03 20:13 ` Re: Docbook 5.x Oleg Bartunov <[email protected]>
2016-05-04 14:44 ` Re: Docbook 5.x Jürgen Purtz <[email protected]>
2016-05-04 15:08 ` Re: Docbook 5.x Alexander Law <[email protected]>
2016-05-04 16:52 ` Re: Docbook 5.x Jürgen Purtz <[email protected]>
@ 2016-05-04 18:00 ` Alexander Law <[email protected]>
1 sibling, 0 replies; 86+ messages in thread
From: Alexander Law @ 2016-05-04 18:00 UTC (permalink / raw)
To: Jürgen Purtz <[email protected]>; pgsql-docs
04.05.2016 19:52, Jürgen Purtz пишет:
> On 04.05.2016 17:08, Alexander Law wrote:
>> As was stated in the aforementioned thread, solution 2 can be much
>> (8x) faster with some xslt optimizations, but I think now we should
>> outline some roadmap before we start to prepare patches and so.
>> Maybe we should convert to XML with DocBook4 at first step?
>> Then, once we get everything stabilized, we can upgrade to DocBook5.
>> Shouldn't we decompose the conversion procedure, so we could perform
>> fully automatic conversion without any manual changes, and then fix
>> non-valid situations, you described before?
>
> Hello Alexander,
>
> I havn't seen your xslt optimization so far. What have you done? Where
> can I find the optimized script or a description?
It was attached to the message:
http://www.postgresql.org/message-id/[email protected]
> "Divide and conquer" is a good strategy and people use it in many
> cases. As you have stated, there are two major steps: from db4-sgml to
> db4-xml and from there to db5-xml. In parallel to the second one we
> shall migrate from dsl scripts to db5-xslt scripts. Your idea to go
> step by step and stabilise at the intermediate level is good in
> general. But in this case it may be unnecessary. The first step is
> very small. It consists mainly of the elimination of shorttags and
> empty elements. This is a pure formal act without risk. If we would
> stop at this point, people are forced to switch their environment, eg
> .emacs from db4-sgml to db4-xml - and after the second step to
> db5-xml. This is possible - but the twice changing will bring
> (possibly) more confusion than advantages. The real challenge is the
> second step as it implies some manual modifications (entities,
> non-valid markup in sense of db5-schema) and a switch to a different
> output chain. Maybe we can live for a while with some files, which are
> not valid against db5-schema - as far as the output chain produces
> correct results.
By first step I mean SGML->XML conversion (while staying with DocBook4).
It's not small, IMHO, as it involves all the doc/sgml contents replacing
(with doc/xml or alike) and updating makefile (replacing 'html' target
with 'xslthtml' and so on).
Though it can (and should) be performed as one commit with using one
conversion script.
The advantage of "baby steps" for me is an opportunity to play safe.
In fact it's the question of balance between amount of redundant work
and manageability of the conversion.
IMO, amount of redundant work is not so large as:
1) we should convert and sgml->xml anyway
2) we can use existing makefile's targets
3) we should update documentation on documentation ([1], [2]) anyway.
[1] http://www.postgresql.org/docs/9.5/interactive/docguide-build.html
[2] http://www.postgresql.org/docs/9.5/interactive/docguide-authoring.html
Alexander Lakhin
--
Sent via pgsql-docs mailing list ([email protected])
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-docs
^ permalink raw reply [nested|flat] 86+ messages in thread
* Re: Docbook 5.x
2016-04-20 14:30 Docbook 5.x Jürgen Purtz <[email protected]>
2016-05-03 19:34 ` Re: Docbook 5.x Alvaro Herrera <[email protected]>
2016-05-03 20:13 ` Re: Docbook 5.x Oleg Bartunov <[email protected]>
2016-05-04 14:44 ` Re: Docbook 5.x Jürgen Purtz <[email protected]>
2016-05-04 15:08 ` Re: Docbook 5.x Alexander Law <[email protected]>
@ 2016-05-05 01:09 ` Peter Eisentraut <[email protected]>
2016-05-05 04:55 ` Re: Docbook 5.x Alexander Law <[email protected]>
2016-05-13 07:38 ` Re: Docbook 5.x Jürgen Purtz <[email protected]>
2016-06-19 20:22 ` Re: Docbook 5.x Jürgen Purtz <[email protected]>
2016-07-02 10:14 ` Re: Docbook 5.x Jürgen Purtz <[email protected]>
2 siblings, 4 replies; 86+ messages in thread
From: Peter Eisentraut @ 2016-05-05 01:09 UTC (permalink / raw)
To: Alexander Law <[email protected]>; Jürgen Purtz <[email protected]>; pgsql-docs
On 5/4/16 11:08 AM, Alexander Law wrote:
> As was stated in the aforementioned thread, solution 2 can be much (8x)
> faster with some xslt optimizations, but I think now we should outline
> some roadmap before we start to prepare patches and so.
> Maybe we should convert to XML with DocBook4 at first step?
> Then, once we get everything stabilized, we can upgrade to DocBook5.
> Shouldn't we decompose the conversion procedure, so we could perform
> fully automatic conversion without any manual changes, and then fix
> non-valid situations, you described before?
I think the process should be something like this:
- Apply your XSLT performance patch. The patch should be submitted to
the next commit fest.
- Wait a while to make sure everyone is happy with the performance.
Keep tweaking if necessary.
- Port all DSSSL customizations to XSLT. Manually evaluate output for
quality.
- Switch to XSLT build for official HTML documentation. [milestone 1]
- Convert sources to XML. (There could be substeps here.) [milestone 2]
- Then consider upgrading to DocBook 5. [milestone 3]
--
Peter Eisentraut http://www.2ndQuadrant.com/
PostgreSQL Development, 24x7 Support, Remote DBA, Training & Services
--
Sent via pgsql-docs mailing list ([email protected])
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-docs
^ permalink raw reply [nested|flat] 86+ messages in thread
* Re: Docbook 5.x
2016-04-20 14:30 Docbook 5.x Jürgen Purtz <[email protected]>
2016-05-03 19:34 ` Re: Docbook 5.x Alvaro Herrera <[email protected]>
2016-05-03 20:13 ` Re: Docbook 5.x Oleg Bartunov <[email protected]>
2016-05-04 14:44 ` Re: Docbook 5.x Jürgen Purtz <[email protected]>
2016-05-04 15:08 ` Re: Docbook 5.x Alexander Law <[email protected]>
2016-05-05 01:09 ` Re: Docbook 5.x Peter Eisentraut <[email protected]>
@ 2016-05-05 04:55 ` Alexander Law <[email protected]>
3 siblings, 0 replies; 86+ messages in thread
From: Alexander Law @ 2016-05-05 04:55 UTC (permalink / raw)
To: Peter Eisentraut <[email protected]>; Jürgen Purtz <[email protected]>; pgsql-docs
Hello Peter,
I fully support your plan and going to move this way.
Best regards,
Alexander
05.05.2016 04:09, Peter Eisentraut пишет:
> On 5/4/16 11:08 AM, Alexander Law wrote:
>> As was stated in the aforementioned thread, solution 2 can be much (8x)
>> faster with some xslt optimizations, but I think now we should outline
>> some roadmap before we start to prepare patches and so.
>> Maybe we should convert to XML with DocBook4 at first step?
>> Then, once we get everything stabilized, we can upgrade to DocBook5.
>> Shouldn't we decompose the conversion procedure, so we could perform
>> fully automatic conversion without any manual changes, and then fix
>> non-valid situations, you described before?
>
> I think the process should be something like this:
>
> - Apply your XSLT performance patch. The patch should be submitted to
> the next commit fest.
>
> - Wait a while to make sure everyone is happy with the performance.
> Keep tweaking if necessary.
>
> - Port all DSSSL customizations to XSLT. Manually evaluate output for
> quality.
>
> - Switch to XSLT build for official HTML documentation. [milestone 1]
>
> - Convert sources to XML. (There could be substeps here.) [milestone 2]
>
> - Then consider upgrading to DocBook 5. [milestone 3]
>
--
Sent via pgsql-docs mailing list ([email protected])
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-docs
^ permalink raw reply [nested|flat] 86+ messages in thread
* Re: Docbook 5.x
2016-04-20 14:30 Docbook 5.x Jürgen Purtz <[email protected]>
2016-05-03 19:34 ` Re: Docbook 5.x Alvaro Herrera <[email protected]>
2016-05-03 20:13 ` Re: Docbook 5.x Oleg Bartunov <[email protected]>
2016-05-04 14:44 ` Re: Docbook 5.x Jürgen Purtz <[email protected]>
2016-05-04 15:08 ` Re: Docbook 5.x Alexander Law <[email protected]>
2016-05-05 01:09 ` Re: Docbook 5.x Peter Eisentraut <[email protected]>
@ 2016-05-13 07:38 ` Jürgen Purtz <[email protected]>
2016-05-13 18:01 ` Re: Docbook 5.x Peter Eisentraut <[email protected]>
3 siblings, 1 reply; 86+ messages in thread
From: Jürgen Purtz @ 2016-05-13 07:38 UTC (permalink / raw)
To: pgsql-docs
Is everybody happy with the performance patch?
Is anybody working on the DSSSL --> XSLT conversion? We should avoid
parallel work.
Jürgen Purtz
On 05.05.2016 03:09, Peter Eisentraut wrote:
> On 5/4/16 11:08 AM, Alexander Law wrote:
>> As was stated in the aforementioned thread, solution 2 can be much (8x)
>> faster with some xslt optimizations, but I think now we should outline
>> some roadmap before we start to prepare patches and so.
>> Maybe we should convert to XML with DocBook4 at first step?
>> Then, once we get everything stabilized, we can upgrade to DocBook5.
>> Shouldn't we decompose the conversion procedure, so we could perform
>> fully automatic conversion without any manual changes, and then fix
>> non-valid situations, you described before?
>
> I think the process should be something like this:
>
> - Apply your XSLT performance patch. The patch should be submitted to
> the next commit fest.
>
> - Wait a while to make sure everyone is happy with the performance.
> Keep tweaking if necessary.
>
> - Port all DSSSL customizations to XSLT. Manually evaluate output for
> quality.
>
> - Switch to XSLT build for official HTML documentation. [milestone 1]
>
> - Convert sources to XML. (There could be substeps here.) [milestone 2]
>
> - Then consider upgrading to DocBook 5. [milestone 3]
>
--
Sent via pgsql-docs mailing list ([email protected])
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-docs
^ permalink raw reply [nested|flat] 86+ messages in thread
* Re: Docbook 5.x
2016-04-20 14:30 Docbook 5.x Jürgen Purtz <[email protected]>
2016-05-03 19:34 ` Re: Docbook 5.x Alvaro Herrera <[email protected]>
2016-05-03 20:13 ` Re: Docbook 5.x Oleg Bartunov <[email protected]>
2016-05-04 14:44 ` Re: Docbook 5.x Jürgen Purtz <[email protected]>
2016-05-04 15:08 ` Re: Docbook 5.x Alexander Law <[email protected]>
2016-05-05 01:09 ` Re: Docbook 5.x Peter Eisentraut <[email protected]>
2016-05-13 07:38 ` Re: Docbook 5.x Jürgen Purtz <[email protected]>
@ 2016-05-13 18:01 ` Peter Eisentraut <[email protected]>
2016-05-14 06:34 ` Re: Docbook 5.x Alexander Law <[email protected]>
2016-05-22 19:48 ` Re: Docbook 5.x Jürgen Purtz <[email protected]>
0 siblings, 2 replies; 86+ messages in thread
From: Peter Eisentraut @ 2016-05-13 18:01 UTC (permalink / raw)
To: Jürgen Purtz <[email protected]>; pgsql-docs
On 5/13/16 3:38 AM, Jürgen Purtz wrote:
> Is everybody happy with the performance patch?
> Is anybody working on the DSSSL --> XSLT conversion? We should avoid
> parallel work.
The performance patch is in the next commit fest for review.
The DSSSL -> XSLT conversion basically just needs someone to go through
the existing code and output and identify necessary improvements.
Most people right now are working on getting the current release out, so
I don't expect much to happen here for a while.
--
Peter Eisentraut http://www.2ndQuadrant.com/
PostgreSQL Development, 24x7 Support, Remote DBA, Training & Services
--
Sent via pgsql-docs mailing list ([email protected])
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-docs
^ permalink raw reply [nested|flat] 86+ messages in thread
* Re: Docbook 5.x
2016-04-20 14:30 Docbook 5.x Jürgen Purtz <[email protected]>
2016-05-03 19:34 ` Re: Docbook 5.x Alvaro Herrera <[email protected]>
2016-05-03 20:13 ` Re: Docbook 5.x Oleg Bartunov <[email protected]>
2016-05-04 14:44 ` Re: Docbook 5.x Jürgen Purtz <[email protected]>
2016-05-04 15:08 ` Re: Docbook 5.x Alexander Law <[email protected]>
2016-05-05 01:09 ` Re: Docbook 5.x Peter Eisentraut <[email protected]>
2016-05-13 07:38 ` Re: Docbook 5.x Jürgen Purtz <[email protected]>
2016-05-13 18:01 ` Re: Docbook 5.x Peter Eisentraut <[email protected]>
@ 2016-05-14 06:34 ` Alexander Law <[email protected]>
1 sibling, 0 replies; 86+ messages in thread
From: Alexander Law @ 2016-05-14 06:34 UTC (permalink / raw)
To: Jürgen Purtz <[email protected]>; +Cc: Peter Eisentraut <[email protected]>; pgsql-docs
Hello Jürgen,
We started to work on the conversion:
http://www.postgresql.org/message-id/[email protected]
And now we (at PostgresPro) are going to continue this work.
I think we should do it together to avoid redundant work.
Best regards,
Alexander
13.05.2016 21:01, Peter Eisentraut пишет:
> On 5/13/16 3:38 AM, Jürgen Purtz wrote:
>> Is everybody happy with the performance patch?
>> Is anybody working on the DSSSL --> XSLT conversion? We should avoid
>> parallel work.
>
> The performance patch is in the next commit fest for review.
>
> The DSSSL -> XSLT conversion basically just needs someone to go
> through the existing code and output and identify necessary improvements.
>
> Most people right now are working on getting the current release out,
> so I don't expect much to happen here for a while.
>
--
Sent via pgsql-docs mailing list ([email protected])
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-docs
^ permalink raw reply [nested|flat] 86+ messages in thread
* Re: Docbook 5.x
2016-04-20 14:30 Docbook 5.x Jürgen Purtz <[email protected]>
2016-05-03 19:34 ` Re: Docbook 5.x Alvaro Herrera <[email protected]>
2016-05-03 20:13 ` Re: Docbook 5.x Oleg Bartunov <[email protected]>
2016-05-04 14:44 ` Re: Docbook 5.x Jürgen Purtz <[email protected]>
2016-05-04 15:08 ` Re: Docbook 5.x Alexander Law <[email protected]>
2016-05-05 01:09 ` Re: Docbook 5.x Peter Eisentraut <[email protected]>
2016-05-13 07:38 ` Re: Docbook 5.x Jürgen Purtz <[email protected]>
2016-05-13 18:01 ` Re: Docbook 5.x Peter Eisentraut <[email protected]>
@ 2016-05-22 19:48 ` Jürgen Purtz <[email protected]>
2016-05-31 17:46 ` Re: Docbook 5.x Peter Eisentraut <[email protected]>
1 sibling, 1 reply; 86+ messages in thread
From: Jürgen Purtz @ 2016-05-22 19:48 UTC (permalink / raw)
To: pgsql-docs
We maintain two css files: docs.css (for online, complex) and
stylesheet.css (local, simple). Why do we need stylesheet.css? Because
of the references to some png-files in docs.css? Because of Lynx? For of
easier comparisons?
Kind regards, Jürgen Purtz
On 13.05.2016 20:01, Peter Eisentraut wrote:
> On 5/13/16 3:38 AM, Jürgen Purtz wrote:
>> Is everybody happy with the performance patch?
>> Is anybody working on the DSSSL --> XSLT conversion? We should avoid
>> parallel work.
>
> The performance patch is in the next commit fest for review.
>
> The DSSSL -> XSLT conversion basically just needs someone to go
> through the existing code and output and identify necessary improvements.
>
> Most people right now are working on getting the current release out,
> so I don't expect much to happen here for a while.
>
--
Sent via pgsql-docs mailing list ([email protected])
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-docs
^ permalink raw reply [nested|flat] 86+ messages in thread
* Re: Docbook 5.x
2016-04-20 14:30 Docbook 5.x Jürgen Purtz <[email protected]>
2016-05-03 19:34 ` Re: Docbook 5.x Alvaro Herrera <[email protected]>
2016-05-03 20:13 ` Re: Docbook 5.x Oleg Bartunov <[email protected]>
2016-05-04 14:44 ` Re: Docbook 5.x Jürgen Purtz <[email protected]>
2016-05-04 15:08 ` Re: Docbook 5.x Alexander Law <[email protected]>
2016-05-05 01:09 ` Re: Docbook 5.x Peter Eisentraut <[email protected]>
2016-05-13 07:38 ` Re: Docbook 5.x Jürgen Purtz <[email protected]>
2016-05-13 18:01 ` Re: Docbook 5.x Peter Eisentraut <[email protected]>
2016-05-22 19:48 ` Re: Docbook 5.x Jürgen Purtz <[email protected]>
@ 2016-05-31 17:46 ` Peter Eisentraut <[email protected]>
0 siblings, 0 replies; 86+ messages in thread
From: Peter Eisentraut @ 2016-05-31 17:46 UTC (permalink / raw)
To: Jürgen Purtz <[email protected]>; pgsql-docs
On 5/22/16 3:48 PM, Jürgen Purtz wrote:
> We maintain two css files: docs.css (for online, complex) and
> stylesheet.css (local, simple). Why do we need stylesheet.css?
So you can read the documentation locally without referencing online files.
--
Peter Eisentraut http://www.2ndQuadrant.com/
PostgreSQL Development, 24x7 Support, Remote DBA, Training & Services
--
Sent via pgsql-docs mailing list ([email protected])
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-docs
^ permalink raw reply [nested|flat] 86+ messages in thread
* Re: Docbook 5.x
2016-04-20 14:30 Docbook 5.x Jürgen Purtz <[email protected]>
2016-05-03 19:34 ` Re: Docbook 5.x Alvaro Herrera <[email protected]>
2016-05-03 20:13 ` Re: Docbook 5.x Oleg Bartunov <[email protected]>
2016-05-04 14:44 ` Re: Docbook 5.x Jürgen Purtz <[email protected]>
2016-05-04 15:08 ` Re: Docbook 5.x Alexander Law <[email protected]>
2016-05-05 01:09 ` Re: Docbook 5.x Peter Eisentraut <[email protected]>
@ 2016-06-19 20:22 ` Jürgen Purtz <[email protected]>
2016-06-27 13:21 ` Re: Docbook 5.x Alexander Law <[email protected]>
3 siblings, 1 reply; 86+ messages in thread
From: Jürgen Purtz @ 2016-06-19 20:22 UTC (permalink / raw)
To: pgsql-docs
On 05.05.2016 03:09, Peter Eisentraut wrote:
> I think the process should be something like this:
>
> - Apply your XSLT performance patch. The patch should be submitted to
> the next commit fest.
>
> - Wait a while to make sure everyone is happy with the performance.
> Keep tweaking if necessary.
>
> - Port all DSSSL customizations to XSLT. Manually evaluate output for
> quality.
>
> - Switch to XSLT build for official HTML documentation. [milestone 1]
>
> - Convert sources to XML. (There could be substeps here.) [milestone 2]
>
> - Then consider upgrading to DocBook 5. [milestone 3]
Alexander and I continue to work on this path. In the meanwhile we have
reached a state where xml files are well formed and valid against
docbook 4 dtd - each single file as well as the big postgres_all.xml
file. Thanks to Alexander's performance patch all XSLT processes run
very fast (the slowest is fo+pdf with 6:30 min).
On this basis I actually work on the HTML generation. But in opposite to
the previous steps (where we create identical copies of the sgml files)
the new css file is very different from the old one. This results from
the following:
* The XSLT process generates other HTML elements and other classes in
comparison to the dsssl process.
* XML files are case sensitive. All object names (id, ulink, linkend,
zone, ...) are now lower case.
* Sometimes the order of elements changed.
* As the previous css file was constructed (some years ago) from three
different css files, he contains redundant and sometimes
contradictory information. I did a complete review.
To get a feedback from the community I have published the resulting
postgres_all.html and its pgdoc_online.css file. Please refer to
https://github.com/JuergenPurtz/pgdoc_db5/blob/master/postgresql-9.5.3/doc/src/db4_xml/postgres_all....
respective pgdoc_online.css to get the files. Please compare the html
file with pages you are familiar with. And remember: the look-and-feel
is similar, but far from identical.
Jürgen Purtz
^ permalink raw reply [nested|flat] 86+ messages in thread
* Re: Docbook 5.x
2016-04-20 14:30 Docbook 5.x Jürgen Purtz <[email protected]>
2016-05-03 19:34 ` Re: Docbook 5.x Alvaro Herrera <[email protected]>
2016-05-03 20:13 ` Re: Docbook 5.x Oleg Bartunov <[email protected]>
2016-05-04 14:44 ` Re: Docbook 5.x Jürgen Purtz <[email protected]>
2016-05-04 15:08 ` Re: Docbook 5.x Alexander Law <[email protected]>
2016-05-05 01:09 ` Re: Docbook 5.x Peter Eisentraut <[email protected]>
2016-06-19 20:22 ` Re: Docbook 5.x Jürgen Purtz <[email protected]>
@ 2016-06-27 13:21 ` Alexander Law <[email protected]>
0 siblings, 0 replies; 86+ messages in thread
From: Alexander Law @ 2016-06-27 13:21 UTC (permalink / raw)
To: Jürgen Purtz <[email protected]>; pgsql-docs; Peter Eisentraut <[email protected]>
Hello,
I have some progress with the "Port all DSSSL customizations to XSLT"
step. I still think that we should avoid manual comparison of old and
new outputs when we can align them and have all differences observable,
countable and manageable.
I had developed XSLT's that allows us to do it. Please look at the patch
(with all the XSLT's) and the comparison script attached.
(There are a several dozens of changes in XSLTs and some in the script.
Some differences still remain but they are observable and can be
eliminated too)
Btw, can I hope to get some feedback on my previous letter regarding
error fixes
(https://www.postgresql.org/message-id/5736C475.3030405%40gmail.com)?
Best regards,
Alexander
19.06.2016 23:22, Jürgen Purtz пишет:
>
> On 05.05.2016 03:09, Peter Eisentraut wrote:
>> I think the process should be something like this:
>>
>> - Apply your XSLT performance patch. The patch should be submitted
>> to the next commit fest.
>>
>> - Wait a while to make sure everyone is happy with the performance.
>> Keep tweaking if necessary.
>>
>> - Port all DSSSL customizations to XSLT. Manually evaluate output
>> for quality.
>>
>> - Switch to XSLT build for official HTML documentation. [milestone 1]
>>
>> - Convert sources to XML. (There could be substeps here.) [milestone 2]
>>
>> - Then consider upgrading to DocBook 5. [milestone 3]
>
> Alexander and I continue to work on this path. In the meanwhile we
> have reached a state where xml files are well formed and valid against
> docbook 4 dtd - each single file as well as the big postgres_all.xml
> file. Thanks to Alexander's performance patch all XSLT processes run
> very fast (the slowest is fo+pdf with 6:30 min).
>
> On this basis I actually work on the HTML generation. But in opposite
> to the previous steps (where we create identical copies of the sgml
> files) the new css file is very different from the old one. This
> results from the following:
>
> * The XSLT process generates other HTML elements and other classes
> in comparison to the dsssl process.
> * XML files are case sensitive. All object names (id, ulink,
> linkend, zone, ...) are now lower case.
> * Sometimes the order of elements changed.
> * As the previous css file was constructed (some years ago) from
> three different css files, he contains redundant and sometimes
> contradictory information. I did a complete review.
>
> To get a feedback from the community I have published the resulting
> postgres_all.html and its pgdoc_online.css file. Please refer to
> https://github.com/JuergenPurtz/pgdoc_db5/blob/master/postgresql-9.5.3/doc/src/db4_xml/postgres_all....
> respective pgdoc_online.css to get the files. Please compare the html
> file with pages you are familiar with. And remember: the look-and-feel
> is similar, but far from identical.
>
> Jürgen Purtz
>
--
Sent via pgsql-docs mailing list ([email protected])
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-docs
Attachments:
[application/x-shellscript] compare_dsssl_xslt.sh (3.8K, 3-compare_dsssl_xslt.sh)
download
[text/x-patch] xhtml-like-dsssl.patch (67.1K, 4-xhtml-like-dsssl.patch)
download | inline diff:
diff --git a/doc/src/sgml/stylesheet-common.xsl b/doc/src/sgml/stylesheet-common.xsl
index de36376..adc82c1 100644
--- a/doc/src/sgml/stylesheet-common.xsl
+++ b/doc/src/sgml/stylesheet-common.xsl
@@ -7,6 +7,7 @@
all output formats (HTML, HTML Help, XSL-FO, etc.).
-->
+<xsl:include href="stylesheet-speedup-common.xsl" />
<!-- Parameters -->
diff --git a/doc/src/sgml/stylesheet-speedup-common.xsl b/doc/src/sgml/stylesheet-speedup-common.xsl
new file mode 100644
index 0000000..007fdf6
--- /dev/null
+++ b/doc/src/sgml/stylesheet-speedup-common.xsl
@@ -0,0 +1,94 @@
+<?xml version="1.0" encoding="utf-8"?>
+<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
+ version='1.0'>
+
+<!-- Performance-optimized versions of some upstream templates from common/
+ directory -->
+
+<!-- from common/labels.xsl -->
+
+<xsl:template match="chapter" mode="label.markup">
+ <xsl:choose>
+ <xsl:when test="@label">
+ <xsl:value-of select="@label"/>
+ </xsl:when>
+ <xsl:when test="string($chapter.autolabel) != 0">
+ <xsl:if test="$component.label.includes.part.label != 0 and
+ ancestor::part">
+ <xsl:variable name="part.label">
+ <xsl:apply-templates select="ancestor::part"
+ mode="label.markup"/>
+ </xsl:variable>
+ <xsl:if test="$part.label != ''">
+ <xsl:value-of select="$part.label"/>
+ <xsl:apply-templates select="ancestor::part"
+ mode="intralabel.punctuation">
+ <xsl:with-param name="object" select="."/>
+ </xsl:apply-templates>
+ </xsl:if>
+ </xsl:if>
+ <xsl:variable name="format">
+ <xsl:call-template name="autolabel.format">
+ <xsl:with-param name="format" select="$chapter.autolabel"/>
+ </xsl:call-template>
+ </xsl:variable>
+ <xsl:choose>
+ <xsl:when test="$label.from.part != 0 and ancestor::part">
+ <xsl:number from="part" count="chapter" format="{$format}" level="any"/>
+ </xsl:when>
+ <xsl:otherwise>
+ <!-- Optimization for pgsql-docs: When counting to get label for
+ this chapter, preceding chapters can only be our siblings or
+ children of a preceding part, so only count those instead of
+ scanning the entire node tree. -->
+ <!-- <xsl:number from="book" count="chapter" format="{$format}" level="any"/> -->
+ <xsl:number value="count(../preceding-sibling::part/chapter) + count(preceding-sibling::chapter) + 1" format="{$format}"/>
+ </xsl:otherwise>
+ </xsl:choose>
+ </xsl:when>
+ </xsl:choose>
+</xsl:template>
+
+<xsl:template match="appendix" mode="label.markup">
+ <xsl:choose>
+ <xsl:when test="@label">
+ <xsl:value-of select="@label"/>
+ </xsl:when>
+ <xsl:when test="string($appendix.autolabel) != 0">
+ <xsl:if test="$component.label.includes.part.label != 0 and
+ ancestor::part">
+ <xsl:variable name="part.label">
+ <xsl:apply-templates select="ancestor::part"
+ mode="label.markup"/>
+ </xsl:variable>
+ <xsl:if test="$part.label != ''">
+ <xsl:value-of select="$part.label"/>
+ <xsl:apply-templates select="ancestor::part"
+ mode="intralabel.punctuation">
+ <xsl:with-param name="object" select="."/>
+ </xsl:apply-templates>
+ </xsl:if>
+ </xsl:if>
+ <xsl:variable name="format">
+ <xsl:call-template name="autolabel.format">
+ <xsl:with-param name="format" select="$appendix.autolabel"/>
+ </xsl:call-template>
+ </xsl:variable>
+ <xsl:choose>
+ <xsl:when test="$label.from.part != 0 and ancestor::part">
+ <xsl:number from="part" count="appendix" format="{$format}" level="any"/>
+ </xsl:when>
+ <xsl:otherwise>
+ <!-- Optimization for pgsql-docs: When counting to get label for
+ this appendix, preceding appendixes can only be our siblings or
+ children of a preceding part, so only count those instead of
+ scanning the entire node tree. -->
+ <!-- <xsl:number from="book|article" count="appendix" format="{$format}" level="any"/> -->
+ <xsl:number value="count(../preceding-sibling::part/appendix) + count(preceding-sibling::appendix) + 1" format="{$format}"/>
+ </xsl:otherwise>
+ </xsl:choose>
+ </xsl:when>
+ </xsl:choose>
+</xsl:template>
+
+</xsl:stylesheet>
diff --git a/doc/src/sgml/stylesheet-speedup-xhtml.xsl b/doc/src/sgml/stylesheet-speedup-xhtml.xsl
new file mode 100644
index 0000000..c91741d
--- /dev/null
+++ b/doc/src/sgml/stylesheet-speedup-xhtml.xsl
@@ -0,0 +1,293 @@
+<?xml version="1.0" encoding="utf-8"?>
+<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
+ xmlns="http://www.w3.org/1999/xhtml"
+ version='1.0'>
+
+<!-- Performance-optimized versions of some upstream templates from xhtml/
+ directory -->
+
+<!-- from xhtml/autoidx.xsl -->
+
+<xsl:template match="indexterm" mode="reference">
+ <xsl:param name="scope" select="."/>
+ <xsl:param name="role" select="''"/>
+ <xsl:param name="type" select="''"/>
+ <xsl:param name="position"/>
+ <xsl:param name="separator" select="''"/>
+
+ <xsl:variable name="term.separator">
+ <xsl:call-template name="index.separator">
+ <xsl:with-param name="key" select="'index.term.separator'"/>
+ </xsl:call-template>
+ </xsl:variable>
+
+ <xsl:variable name="number.separator">
+ <xsl:call-template name="index.separator">
+ <xsl:with-param name="key" select="'index.number.separator'"/>
+ </xsl:call-template>
+ </xsl:variable>
+
+ <xsl:variable name="range.separator">
+ <xsl:call-template name="index.separator">
+ <xsl:with-param name="key" select="'index.range.separator'"/>
+ </xsl:call-template>
+ </xsl:variable>
+
+ <xsl:choose>
+ <xsl:when test="$separator != ''">
+ <xsl:value-of select="$separator"/>
+ </xsl:when>
+ <xsl:when test="$position = 1">
+ <xsl:value-of select="$term.separator"/>
+ </xsl:when>
+ <xsl:otherwise>
+ <xsl:value-of select="$number.separator"/>
+ </xsl:otherwise>
+ </xsl:choose>
+
+ <xsl:choose>
+ <xsl:when test="@zone and string(@zone)">
+ <xsl:call-template name="reference">
+ <xsl:with-param name="zones" select="normalize-space(@zone)"/>
+ <xsl:with-param name="position" select="position()"/>
+ <xsl:with-param name="scope" select="$scope"/>
+ <xsl:with-param name="role" select="$role"/>
+ <xsl:with-param name="type" select="$type"/>
+ </xsl:call-template>
+ </xsl:when>
+ <xsl:otherwise>
+ <a>
+ <xsl:apply-templates select="." mode="class.attribute"/>
+ <xsl:variable name="title">
+ <xsl:choose>
+ <xsl:when test="$index.prefer.titleabbrev != 0">
+ <xsl:apply-templates select="(ancestor-or-self::set|ancestor-or-self::book|ancestor-or-self::part|ancestor-or-self::reference|ancestor-or-self::partintro|ancestor-or-self::chapter|ancestor-or-self::appendix|ancestor-or-self::preface|ancestor-or-self::article|ancestor-or-self::section|ancestor-or-self::sect1|ancestor-or-self::sect2|ancestor-or-self::sect3|ancestor-or-self::sect4|ancestor-or-self::sect5|ancestor-or-self::refentry|ancestor-or-self::refsect1|ancestor-or-self::refsect2|ancestor-or-self::refsect3|ancestor-or-self::simplesect|ancestor-or-self::bibliography|ancestor-or-self::glossary|ancestor-or-self::index|ancestor-or-self::webpage|ancestor-or-self::topic)[last()]" mode="titleabbrev.markup"/>
+ </xsl:when>
+ <xsl:otherwise>
+ <xsl:apply-templates select="(ancestor-or-self::set|ancestor-or-self::book|ancestor-or-self::part|ancestor-or-self::reference|ancestor-or-self::partintro|ancestor-or-self::chapter|ancestor-or-self::appendix|ancestor-or-self::preface|ancestor-or-self::article|ancestor-or-self::section|ancestor-or-self::sect1|ancestor-or-self::sect2|ancestor-or-self::sect3|ancestor-or-self::sect4|ancestor-or-self::sect5|ancestor-or-self::refentry|ancestor-or-self::refsect1|ancestor-or-self::refsect2|ancestor-or-self::refsect3|ancestor-or-self::simplesect|ancestor-or-self::bibliography|ancestor-or-self::glossary|ancestor-or-self::index|ancestor-or-self::webpage|ancestor-or-self::topic)[last()]" mode="title.markup"/>
+ </xsl:otherwise>
+ </xsl:choose>
+ </xsl:variable>
+
+ <xsl:attribute name="href">
+ <xsl:choose>
+ <xsl:when test="$index.links.to.section = 1">
+ <xsl:call-template name="href.target">
+ <xsl:with-param name="object" select="(ancestor-or-self::set|ancestor-or-self::book|ancestor-or-self::part|ancestor-or-self::reference|ancestor-or-self::partintro|ancestor-or-self::chapter|ancestor-or-self::appendix|ancestor-or-self::preface|ancestor-or-self::article|ancestor-or-self::section|ancestor-or-self::sect1|ancestor-or-self::sect2|ancestor-or-self::sect3|ancestor-or-self::sect4|ancestor-or-self::sect5|ancestor-or-self::refentry|ancestor-or-self::refsect1|ancestor-or-self::refsect2|ancestor-or-self::refsect3|ancestor-or-self::simplesect|ancestor-or-self::bibliography|ancestor-or-self::glossary|ancestor-or-self::index|ancestor-or-self::webpage|ancestor-or-self::topic)[last()]"/>
+ <!-- Optimization for pgsql-docs: We only have an index as a
+ child of book, so look that up directly instead of
+ scanning the entire node tree. Also, don't look for
+ setindex. -->
+ <!-- <xsl:with-param name="context" select="(//index[count(ancestor::node()|$scope) = count(ancestor::node()) and ($role = @role or $type = @type or (string-length($role) = 0 and string-length($type) = 0))] | //setindex[count(ancestor::node()|$scope) = count(ancestor::node()) and ($role = @role or $type = @type or (string-length($role) = 0 and string-length($type) = 0))])[1]"/> -->
+ <xsl:with-param name="context" select="(/book/index[count(ancestor::node()|$scope) = count(ancestor::node()) and ($role = @role or $type = @type or (string-length($role) = 0 and string-length($type) = 0))])[1]"/>
+ </xsl:call-template>
+ </xsl:when>
+ <xsl:otherwise>
+ <xsl:call-template name="href.target">
+ <xsl:with-param name="object" select="."/>
+ <xsl:with-param name="context" select="(//index[count(ancestor::node()|$scope) = count(ancestor::node()) and ($role = @role or $type = @type or (string-length($role) = 0 and string-length($type) = 0))] | //setindex[count(ancestor::node()|$scope) = count(ancestor::node()) and ($role = @role or $type = @type or (string-length($role) = 0 and string-length($type) = 0))])[1]"/>
+ </xsl:call-template>
+ </xsl:otherwise>
+ </xsl:choose>
+
+ </xsl:attribute>
+
+ <xsl:value-of select="$title"/> <!-- text only -->
+ </a>
+
+ <xsl:variable name="id" select="(@id|@xml:id)[1]"/>
+ <xsl:if test="key('endofrange', $id)[count(ancestor::node()|$scope) = count(ancestor::node()) and ($role = @role or $type = @type or (string-length($role) = 0 and string-length($type) = 0))]">
+ <xsl:apply-templates select="key('endofrange', $id)[count(ancestor::node()|$scope) = count(ancestor::node()) and ($role = @role or $type = @type or (string-length($role) = 0 and string-length($type) = 0))][last()]" mode="reference">
+ <xsl:with-param name="position" select="position()"/>
+ <xsl:with-param name="scope" select="$scope"/>
+ <xsl:with-param name="role" select="$role"/>
+ <xsl:with-param name="type" select="$type"/>
+ <xsl:with-param name="separator" select="$range.separator"/>
+ </xsl:apply-templates>
+ </xsl:if>
+ </xsl:otherwise>
+ </xsl:choose>
+</xsl:template>
+
+<xsl:template name="reference">
+ <xsl:param name="scope" select="."/>
+ <xsl:param name="role" select="''"/>
+ <xsl:param name="type" select="''"/>
+ <xsl:param name="zones"/>
+
+ <xsl:choose>
+ <xsl:when test="contains($zones, ' ')">
+ <xsl:variable name="zone" select="substring-before($zones, ' ')"/>
+ <xsl:variable name="target" select="key('sections', $zone)"/>
+
+ <a>
+ <xsl:apply-templates select="." mode="class.attribute"/>
+ <xsl:call-template name="id.attribute"/>
+ <xsl:attribute name="href">
+ <xsl:call-template name="href.target">
+ <xsl:with-param name="object" select="$target[1]"/>
+ <xsl:with-param name="context" select="//index[count(ancestor::node()|$scope) = count(ancestor::node()) and ($role = @role or $type = @type or (string-length($role) = 0 and string-length($type) = 0))][1]"/>
+ </xsl:call-template>
+ </xsl:attribute>
+ <xsl:apply-templates select="$target[1]" mode="index-title-content"/>
+ </a>
+ <xsl:text>, </xsl:text>
+ <xsl:call-template name="reference">
+ <xsl:with-param name="zones" select="substring-after($zones, ' ')"/>
+ <xsl:with-param name="position" select="position()"/>
+ <xsl:with-param name="scope" select="$scope"/>
+ <xsl:with-param name="role" select="$role"/>
+ <xsl:with-param name="type" select="$type"/>
+ </xsl:call-template>
+ </xsl:when>
+ <xsl:otherwise>
+ <xsl:variable name="zone" select="$zones"/>
+ <xsl:variable name="target" select="key('sections', $zone)"/>
+
+ <a>
+ <xsl:apply-templates select="." mode="class.attribute"/>
+ <xsl:call-template name="id.attribute"/>
+ <xsl:attribute name="href">
+ <xsl:call-template name="href.target">
+ <xsl:with-param name="object" select="$target[1]"/>
+ <!-- Optimization for pgsql-docs: Only look for index under book
+ instead of searching the whole node tree. -->
+ <!-- <xsl:with-param name="context" select="//index[count(ancestor::node()|$scope) = count(ancestor::node()) and ($role = @role or $type = @type or (string-length($role) = 0 and string-length($type) = 0))][1]"/> -->
+ <xsl:with-param name="context" select="/book/index[count(ancestor::node()|$scope) = count(ancestor::node()) and ($role = @role or $type = @type or (string-length($role) = 0 and string-length($type) = 0))][1]"/>
+ </xsl:call-template>
+ </xsl:attribute>
+ <xsl:apply-templates select="$target[1]" mode="index-title-content"/>
+ </a>
+ </xsl:otherwise>
+ </xsl:choose>
+</xsl:template>
+
+
+<!-- from xhtml/chunk-common.xsl -->
+
+<xsl:template name="chunk-all-sections">
+ <xsl:param name="content">
+ <xsl:apply-imports/>
+ </xsl:param>
+
+ <!-- Optimization for pgsql-docs: Since we set a fixed $chunk.section.depth,
+ we can do away with a bunch of complicated XPath searches for the
+ previous and next sections at various levels. -->
+
+ <xsl:if test="$chunk.section.depth != 1">
+ <xsl:message terminate="yes">
+ <xsl:text>Error: If you change $chunk.section.depth, then you must update the performance-optimized chunk-all-sections-template.</xsl:text>
+ </xsl:message>
+ </xsl:if>
+
+ <xsl:variable name="prev"
+ select="(preceding::book[1]
+ |preceding::preface[1]
+ |preceding::chapter[1]
+ |preceding::appendix[1]
+ |preceding::part[1]
+ |preceding::reference[1]
+ |preceding::refentry[1]
+ |preceding::colophon[1]
+ |preceding::article[1]
+ |preceding::topic[1]
+ |preceding::bibliography[parent::article or parent::book or parent::part][1]
+ |preceding::glossary[parent::article or parent::book or parent::part][1]
+ |preceding::index[$generate.index != 0]
+ [parent::article or parent::book or parent::part][1]
+ |preceding::setindex[$generate.index != 0][1]
+ |ancestor::set
+ |ancestor::book[1]
+ |ancestor::preface[1]
+ |ancestor::chapter[1]
+ |ancestor::appendix[1]
+ |ancestor::part[1]
+ |ancestor::reference[1]
+ |ancestor::article[1]
+ |ancestor::topic[1]
+ |preceding::sect1[1]
+ |ancestor::sect1[1])[last()]"/>
+
+ <xsl:variable name="next"
+ select="(following::book[1]
+ |following::preface[1]
+ |following::chapter[1]
+ |following::appendix[1]
+ |following::part[1]
+ |following::reference[1]
+ |following::refentry[1]
+ |following::colophon[1]
+ |following::bibliography[parent::article or parent::book or parent::part][1]
+ |following::glossary[parent::article or parent::book or parent::part][1]
+ |following::index[$generate.index != 0]
+ [parent::article or parent::book][1]
+ |following::article[1]
+ |following::topic[1]
+ |following::setindex[$generate.index != 0][1]
+ |descendant::book[1]
+ |descendant::preface[1]
+ |descendant::chapter[1]
+ |descendant::appendix[1]
+ |descendant::article[1]
+ |descendant::topic[1]
+ |descendant::bibliography[parent::article or parent::book][1]
+ |descendant::glossary[parent::article or parent::book or parent::part][1]
+ |descendant::index[$generate.index != 0]
+ [parent::article or parent::book][1]
+ |descendant::colophon[1]
+ |descendant::setindex[$generate.index != 0][1]
+ |descendant::part[1]
+ |descendant::reference[1]
+ |descendant::refentry[1]
+ |following::sect1[1]
+ |descendant::sect1[1])[1]"/>
+
+ <xsl:call-template name="process-chunk">
+ <xsl:with-param name="prev" select="$prev"/>
+ <xsl:with-param name="next" select="$next"/>
+ <xsl:with-param name="content" select="$content"/>
+ </xsl:call-template>
+</xsl:template>
+
+<xsl:template name="xxhtml.head">
+ <xsl:param name="prev" select="/foo"/>
+ <xsl:param name="next" select="/foo"/>
+
+ <!-- Optimization for pgsql-docs: Cut out a bunch of things we don't need
+ here, including an expensive //legalnotice search. -->
+
+ <head>
+ <xsl:call-template name="system.head.content"/>
+ <xsl:call-template name="head.content"/>
+
+ <xsl:if test="$prev">
+ <link rel="prev">
+ <xsl:attribute name="href">
+ <xsl:call-template name="href.target">
+ <xsl:with-param name="object" select="$prev"/>
+ </xsl:call-template>
+ </xsl:attribute>
+ <xsl:attribute name="title">
+ <xsl:apply-templates select="$prev" mode="object.title.markup.textonly"/>
+ </xsl:attribute>
+ </link>
+ </xsl:if>
+
+ <xsl:if test="$next">
+ <link rel="next">
+ <xsl:attribute name="href">
+ <xsl:call-template name="href.target">
+ <xsl:with-param name="object" select="$next"/>
+ </xsl:call-template>
+ </xsl:attribute>
+ <xsl:attribute name="title">
+ <xsl:apply-templates select="$next" mode="object.title.markup.textonly"/>
+ </xsl:attribute>
+ </link>
+ </xsl:if>
+
+ <xsl:call-template name="user.head.content"/>
+ </head>
+</xsl:template>
+
+</xsl:stylesheet>
diff --git a/doc/src/sgml/stylesheet-xhtml-dsssl-like-imports.xsl b/doc/src/sgml/stylesheet-xhtml-dsssl-like-imports.xsl
new file mode 100644
index 0000000..9c63aeb
--- /dev/null
+++ b/doc/src/sgml/stylesheet-xhtml-dsssl-like-imports.xsl
@@ -0,0 +1,161 @@
+<?xml version="1.0" encoding="ASCII"?>
+<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xmlns="http://www.w3.org/1999/xhtml" version="1.0">
+
+<!-- ==================================================================== -->
+<!-- from component.xsl -->
+<!-- No chapter toc when there is only one sect1
+xplang.html:
+ Chapter 39. Procedural Languages
+ Table of Contents
+ [9]39.1. Installing Procedural Languages
+->
+ Chapter 39. Procedural Languages
+-->
+<xsl:template match="chapter">
+ <xsl:call-template name="id.warning"/>
+
+ <xsl:element name="{$div.element}" namespace="http://www.w3.org/1999/xhtml">
+ <xsl:call-template name="common.html.attributes">
+ <xsl:with-param name="inherit" select="1"/>
+ </xsl:call-template>
+ <xsl:call-template name="id.attribute">
+ <xsl:with-param name="conditional" select="0"/>
+ </xsl:call-template>
+
+ <xsl:call-template name="component.separator"/>
+ <xsl:call-template name="chapter.titlepage"/>
+
+ <xsl:variable name="toc.params">
+ <xsl:call-template name="find.path.params">
+ <xsl:with-param name="table" select="normalize-space($generate.toc)"/>
+ </xsl:call-template>
+ </xsl:variable>
+ <xsl:if test="contains($toc.params, 'toc') and count(sect1) > 1">
+ <xsl:call-template name="component.toc">
+ <xsl:with-param name="toc.title.p" select="contains($toc.params, 'title')"/>
+ </xsl:call-template>
+ <xsl:call-template name="component.toc.separator"/>
+ </xsl:if>
+ <xsl:apply-templates/>
+ <xsl:call-template name="process.footnotes"/>
+ </xsl:element>
+</xsl:template>
+
+<!-- from sections.xsl -->
+<!--
+spi-memory.html:
+ 44.3. Memory Management
+->
+ 44.3. Memory Management
+ Table of Contents
+ SPI_palloc — allocate memory in the upper executor context
+ SPI_repalloc — reallocate memory in the upper executor context
+-->
+<xsl:template match="sect1">
+ <xsl:call-template name="id.warning"/>
+
+ <xsl:element name="{$div.element}" namespace="http://www.w3.org/1999/xhtml">
+ <xsl:call-template name="common.html.attributes">
+ <xsl:with-param name="inherit" select="1"/>
+ </xsl:call-template>
+ <xsl:call-template name="id.attribute">
+ <xsl:with-param name="conditional" select="0"/>
+ </xsl:call-template>
+
+ <xsl:choose>
+ <xsl:when test="@renderas = 'sect2'">
+ <xsl:call-template name="sect2.titlepage"/>
+ </xsl:when>
+ <xsl:when test="@renderas = 'sect3'">
+ <xsl:call-template name="sect3.titlepage"/>
+ </xsl:when>
+ <xsl:when test="@renderas = 'sect4'">
+ <xsl:call-template name="sect4.titlepage"/>
+ </xsl:when>
+ <xsl:when test="@renderas = 'sect5'">
+ <xsl:call-template name="sect5.titlepage"/>
+ </xsl:when>
+ <xsl:otherwise>
+ <xsl:call-template name="sect1.titlepage"/>
+ </xsl:otherwise>
+ </xsl:choose>
+
+ <xsl:variable name="toc.params">
+ <xsl:call-template name="find.path.params">
+ <xsl:with-param name="table" select="normalize-space($generate.toc)"/>
+ </xsl:call-template>
+ </xsl:variable>
+
+ <xsl:if test="contains($toc.params, 'toc') and ($generate.section.toc.level >= 1 or count(refentry) > 0)">
+ <xsl:call-template name="section.toc">
+ <xsl:with-param name="toc.title.p" select="contains($toc.params, 'title')"/>
+ </xsl:call-template>
+ <xsl:call-template name="section.toc.separator"/>
+ </xsl:if>
+ <xsl:apply-templates/>
+ <xsl:call-template name="process.chunk.footnotes"/>
+ </xsl:element>
+</xsl:template>
+
+<!-- from xhtml/component.xsl -->
+<!--
+sourcerepo.html:
+
+Appendix I. The Source Code Repository
+ Table of Contents
+ [9]I.1. Getting The Source via Git
+->
+Appendix I. The Source Code Repository
+-->
+<xsl:template match="appendix">
+ <xsl:variable name="ischunk">
+ <xsl:call-template name="chunk"/>
+ </xsl:variable>
+
+ <xsl:call-template name="id.warning"/>
+
+ <xsl:element name="{$div.element}" namespace="http://www.w3.org/1999/xhtml">
+ <xsl:call-template name="common.html.attributes">
+ <xsl:with-param name="inherit" select="1"/>
+ </xsl:call-template>
+ <xsl:call-template name="id.attribute">
+ <xsl:with-param name="conditional" select="0"/>
+ </xsl:call-template>
+
+ <xsl:choose>
+ <xsl:when test="parent::article and $ischunk = 0">
+ <xsl:call-template name="section.heading">
+ <xsl:with-param name="level" select="1"/>
+ <xsl:with-param name="title">
+ <xsl:apply-templates select="." mode="object.title.markup"/>
+ </xsl:with-param>
+ </xsl:call-template>
+ </xsl:when>
+ <xsl:otherwise>
+ <xsl:call-template name="component.separator"/>
+ <xsl:call-template name="appendix.titlepage"/>
+ </xsl:otherwise>
+ </xsl:choose>
+
+ <xsl:variable name="toc.params">
+ <xsl:call-template name="find.path.params">
+ <xsl:with-param name="table" select="normalize-space($generate.toc)"/>
+ </xsl:call-template>
+ </xsl:variable>
+
+ <xsl:if test="contains($toc.params, 'toc') and count(sect1) > 1">
+ <xsl:call-template name="component.toc">
+ <xsl:with-param name="toc.title.p" select="contains($toc.params, 'title')"/>
+ </xsl:call-template>
+ <xsl:call-template name="component.toc.separator"/>
+ </xsl:if>
+
+ <xsl:apply-templates/>
+
+ <xsl:if test="not(parent::article) or $ischunk != 0">
+ <xsl:call-template name="process.footnotes"/>
+ </xsl:if>
+ </xsl:element>
+</xsl:template>
+
+</xsl:stylesheet>
diff --git a/doc/src/sgml/stylesheet-xhtml-dsssl-like.xsl b/doc/src/sgml/stylesheet-xhtml-dsssl-like.xsl
new file mode 100644
index 0000000..dbfcc2e
--- /dev/null
+++ b/doc/src/sgml/stylesheet-xhtml-dsssl-like.xsl
@@ -0,0 +1,1043 @@
+<?xml version="1.0" encoding="utf-8"?>
+<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
+ xmlns:l="http://docbook.sourceforge.net/xmlns/l10n/1.0"
+ version="1.0"
+ xmlns="http://www.w3.org/1999/xhtml"
+ exclude-result-prefixes="#default">
+<xsl:import href="stylesheet-xhtml-dsssl-like-imports.xsl" />
+
+<!-- from xhtml/chunk-common.xsl -->
+<!-- align header with dsssl -->
+<xsl:template name="header.navigation">
+ <xsl:param name="prev" select="/foo"/>
+ <xsl:param name="next" select="/foo"/>
+ <xsl:param name="nav.context"/>
+
+ <xsl:variable name="home" select="/*[1]"/>
+ <xsl:variable name="up" select="parent::*"/>
+
+ <xsl:variable name="row1" select="$navig.showtitles != 0"/>
+ <xsl:variable name="row2" select="count($prev) > 0 or (count($up) > 0 and generate-id($up) != generate-id($home) and $navig.showtitles != 0) or count($next) > 0"/>
+
+ <xsl:if test="$suppress.navigation = '0' and $suppress.header.navigation = '0' and not(self::book)">
+ <div class="navheader">
+ <xsl:if test="$row1 or $row2">
+ <table width="100%" summary="Navigation header">
+ <xsl:if test="$row1">
+ <tr>
+ <th colspan="4" align="center">
+ <a>
+ <xsl:attribute name="href">
+ <xsl:call-template name="href.target">
+ <xsl:with-param name="object" select="$home"/>
+ </xsl:call-template>
+ </xsl:attribute>
+ <xsl:apply-templates select="$home" mode="object.title.markup.textonly"/>
+ </a>
+ </th>
+ </tr>
+ </xsl:if>
+
+ <xsl:if test="$row2">
+ <tr>
+ <td width="10%" align="{$direction.align.start}">
+ <xsl:if test="count($prev)>0">
+ <a accesskey="p">
+ <xsl:attribute name="href">
+ <xsl:call-template name="href.target">
+ <xsl:with-param name="object" select="$prev"/>
+ </xsl:call-template>
+ </xsl:attribute>
+ <xsl:call-template name="navig.content">
+ <xsl:with-param name="direction" select="'prev'"/>
+ </xsl:call-template>
+ </a>
+ </xsl:if>
+ <xsl:text> </xsl:text>
+ </td>
+ <td width="10%" align="center">
+ <xsl:choose>
+ <xsl:when test="count($up)>0 and generate-id($up) != generate-id($home)">
+ <a accesskey="u">
+ <xsl:attribute name="href">
+ <xsl:call-template name="href.target">
+ <xsl:with-param name="object" select="$up"/>
+ </xsl:call-template>
+ </xsl:attribute>
+ <xsl:call-template name="navig.content">
+ <xsl:with-param name="direction" select="'up'"/>
+ </xsl:call-template>
+ </a>
+ </xsl:when>
+ <xsl:otherwise>
+ <a accesskey="h">
+ <xsl:attribute name="href">
+ <xsl:call-template name="href.target">
+ <xsl:with-param name="object" select="$home"/>
+ </xsl:call-template>
+ </xsl:attribute>
+ <xsl:call-template name="navig.content">
+ <xsl:with-param name="direction" select="'home'"/>
+ </xsl:call-template>
+ </a>
+<!--   -->
+ </xsl:otherwise>
+ </xsl:choose>
+ </td>
+ <th width="60%" align="center">
+ <xsl:choose>
+ <xsl:when test="count($up) > 0 and local-name($up) != 'part' and local-name($up) != 'sect1' and local-name($up) != 'reference' and generate-id($up) != generate-id($home) and $navig.showtitles != 0">
+ <xsl:apply-templates select="$up" mode="object.title.markup"/>
+ </xsl:when>
+ <xsl:otherwise> </xsl:otherwise>
+ </xsl:choose>
+ </th>
+ <td width="20%" align="{$direction.align.end}">
+ <xsl:text> </xsl:text>
+ <xsl:if test="count($next)>0">
+ <a accesskey="n">
+ <xsl:attribute name="href">
+ <xsl:call-template name="href.target">
+ <xsl:with-param name="object" select="$next"/>
+ </xsl:call-template>
+ </xsl:attribute>
+ <xsl:call-template name="navig.content">
+ <xsl:with-param name="direction" select="'next'"/>
+ </xsl:call-template>
+ </a>
+ </xsl:if>
+ </td>
+ </tr>
+ </xsl:if>
+ </table>
+ </xsl:if>
+ <xsl:if test="$header.rule != 0">
+ <hr/>
+ </xsl:if>
+ </div>
+ </xsl:if>
+</xsl:template>
+
+<!-- from xhtml/chunk-common.xsl -->
+<!-- align footer with dsssl -->
+<xsl:template name="footer.navigation">
+ <xsl:param name="prev" select="/foo"/>
+ <xsl:param name="next" select="/foo"/>
+ <xsl:param name="nav.context"/>
+
+ <xsl:variable name="home" select="/*[1]"/>
+ <xsl:variable name="up" select="parent::*"/>
+
+ <xsl:variable name="row1" select="count($prev) > 0 or count($up) > 0 or count($next) > 0"/>
+
+ <xsl:variable name="row2" select="($prev and $navig.showtitles != 0) or (generate-id($home) != generate-id(.) or $nav.context = 'toc') or ($chunk.tocs.and.lots != 0 and $nav.context != 'toc') or ($next and $navig.showtitles != 0)"/>
+
+ <xsl:if test="$suppress.navigation = '0' and $suppress.footer.navigation = '0'">
+ <div class="navfooter">
+ <xsl:if test="$footer.rule != 0">
+ <hr/>
+ </xsl:if>
+
+ <xsl:if test="$row1 or $row2">
+ <table width="100%" summary="Navigation footer">
+ <xsl:if test="$row1">
+ <tr>
+ <td width="40%" align="{$direction.align.start}">
+ <xsl:if test="count($prev)>0">
+ <a accesskey="p">
+ <xsl:attribute name="href">
+ <xsl:call-template name="href.target">
+ <xsl:with-param name="object" select="$prev"/>
+ </xsl:call-template>
+ </xsl:attribute>
+ <xsl:call-template name="navig.content">
+ <xsl:with-param name="direction" select="'prev'"/>
+ </xsl:call-template>
+ </a>
+ </xsl:if>
+ <xsl:text> </xsl:text>
+ </td>
+ <td width="20%" align="center">
+ <xsl:choose>
+ <xsl:when test="$home != . or $nav.context = 'toc'">
+ <a accesskey="h">
+ <xsl:attribute name="href">
+ <xsl:call-template name="href.target">
+ <xsl:with-param name="object" select="$home"/>
+ </xsl:call-template>
+ </xsl:attribute>
+ <xsl:call-template name="navig.content">
+ <xsl:with-param name="direction" select="'home'"/>
+ </xsl:call-template>
+ </a>
+ <xsl:if test="$chunk.tocs.and.lots != 0 and $nav.context != 'toc'">
+ <xsl:text> | </xsl:text>
+ </xsl:if>
+ </xsl:when>
+ <xsl:otherwise> </xsl:otherwise>
+ </xsl:choose>
+
+ <xsl:if test="$chunk.tocs.and.lots != 0 and $nav.context != 'toc'">
+ <a accesskey="t">
+ <xsl:attribute name="href">
+ <xsl:value-of select="$chunked.filename.prefix"/>
+ <xsl:apply-templates select="/*[1]" mode="recursive-chunk-filename">
+ <xsl:with-param name="recursive" select="true()"/>
+ </xsl:apply-templates>
+ <xsl:text>-toc</xsl:text>
+ <xsl:value-of select="$html.ext"/>
+ </xsl:attribute>
+ <xsl:call-template name="gentext">
+ <xsl:with-param name="key" select="'nav-toc'"/>
+ </xsl:call-template>
+ </a>
+ </xsl:if>
+ </td>
+ <td width="40%" align="{$direction.align.end}">
+ <xsl:text> </xsl:text>
+ <xsl:if test="count($next)>0">
+ <a accesskey="n">
+ <xsl:attribute name="href">
+ <xsl:call-template name="href.target">
+ <xsl:with-param name="object" select="$next"/>
+ </xsl:call-template>
+ </xsl:attribute>
+ <xsl:call-template name="navig.content">
+ <xsl:with-param name="direction" select="'next'"/>
+ </xsl:call-template>
+ </a>
+ </xsl:if>
+ </td>
+ </tr>
+ </xsl:if>
+
+ <xsl:if test="$row2">
+ <tr>
+ <td width="40%" align="{$direction.align.start}" valign="top">
+ <xsl:if test="$navig.showtitles != 0">
+ <xsl:apply-templates select="$prev" mode="object.title.markup.textonly"/>
+ </xsl:if>
+ <xsl:text> </xsl:text>
+ </td>
+ <td width="20%" align="center">
+ <xsl:choose>
+ <xsl:when test="count($up)>0 and generate-id($up) != generate-id($home)">
+ <a accesskey="u">
+ <xsl:attribute name="href">
+ <xsl:call-template name="href.target">
+ <xsl:with-param name="object" select="$up"/>
+ </xsl:call-template>
+ </xsl:attribute>
+ <xsl:call-template name="navig.content">
+ <xsl:with-param name="direction" select="'up'"/>
+ </xsl:call-template>
+ </a>
+ </xsl:when>
+ <xsl:otherwise> </xsl:otherwise>
+ </xsl:choose>
+ </td>
+ <td width="40%" align="{$direction.align.end}" valign="top">
+ <xsl:text> </xsl:text>
+ <xsl:if test="$navig.showtitles != 0">
+ <xsl:apply-templates select="$next" mode="object.title.markup.textonly"/>
+ </xsl:if>
+ </td>
+ </tr>
+ </xsl:if>
+ </table>
+ </xsl:if>
+ </div>
+ </xsl:if>
+</xsl:template>
+<!-- ==================================================================== -->
+
+<!-- from xhtml/chunk-common.xsl -->
+<!-- Modify html.head -->
+<xsl:template name="html.head">
+ <xsl:param name="prev" select="/foo"/>
+ <xsl:param name="next" select="/foo"/>
+ <xsl:variable name="this" select="."/>
+ <xsl:variable name="home" select="/*[1]"/>
+ <xsl:variable name="up" select="parent::*"/>
+
+ <head>
+ <xsl:call-template name="system.head.content"/>
+ <xsl:call-template name="head.content"/>
+
+ <!-- home link not valid in HTML5 -->
+ <xsl:if test="$home and $div.element != 'section' and not(self::book)">
+ <link rel="home">
+ <xsl:attribute name="href">
+ <xsl:call-template name="href.target">
+ <xsl:with-param name="object" select="$home"/>
+ </xsl:call-template>
+ </xsl:attribute>
+ <xsl:attribute name="title">
+ <xsl:apply-templates select="$home" mode="object.title.markup.textonly"/>
+ </xsl:attribute>
+ </link>
+ </xsl:if>
+
+ <!-- up link not valid in HTML5 -->
+ <xsl:if test="$up and $div.element != 'section' and generate-id($up) != generate-id($home)"> <!-- LAW -->
+ <link rel="up">
+ <xsl:attribute name="href">
+ <xsl:call-template name="href.target">
+ <xsl:with-param name="object" select="$up"/>
+ </xsl:call-template>
+ </xsl:attribute>
+ <xsl:attribute name="title">
+ <xsl:apply-templates select="$up" mode="object.title.markup.textonly"/>
+ </xsl:attribute>
+ </link>
+ </xsl:if>
+
+ <xsl:if test="$prev">
+ <link rel="prev">
+ <xsl:attribute name="href">
+ <xsl:call-template name="href.target">
+ <xsl:with-param name="object" select="$prev"/>
+ </xsl:call-template>
+ </xsl:attribute>
+ <xsl:attribute name="title">
+ <xsl:apply-templates select="$prev" mode="object.title.markup.textonly"/>
+ </xsl:attribute>
+ </link>
+ </xsl:if>
+
+ <xsl:if test="$next">
+ <link rel="next">
+ <xsl:attribute name="href">
+ <xsl:call-template name="href.target">
+ <xsl:with-param name="object" select="$next"/>
+ </xsl:call-template>
+ </xsl:attribute>
+ <xsl:attribute name="title">
+ <xsl:apply-templates select="$next" mode="object.title.markup.textonly"/>
+ </xsl:attribute>
+ </link>
+ </xsl:if>
+
+ <xsl:if test="$html.extra.head.links != 0">
+ <xsl:for-each select="//part |//reference |//preface |//chapter |//article |//refentry |//appendix[not(parent::article)]|appendix |//glossary[not(parent::article)]|glossary |//index[not(parent::article)]|index">
+ <link rel="{local-name(.)}">
+ <xsl:attribute name="href">
+ <xsl:call-template name="href.target">
+ <xsl:with-param name="context" select="$this"/>
+ <xsl:with-param name="object" select="."/>
+ </xsl:call-template>
+ </xsl:attribute>
+ <xsl:attribute name="title">
+ <xsl:apply-templates select="." mode="object.title.markup.textonly"/>
+ </xsl:attribute>
+ </link>
+ </xsl:for-each>
+
+ <xsl:for-each select="section|sect1|refsection|refsect1">
+ <link>
+ <xsl:attribute name="rel">
+ <xsl:choose>
+ <xsl:when test="local-name($this) = 'section' or local-name($this) = 'refsection'">
+ <xsl:value-of select="'subsection'"/>
+ </xsl:when>
+ <xsl:otherwise>
+ <xsl:value-of select="'section'"/>
+ </xsl:otherwise>
+ </xsl:choose>
+ </xsl:attribute>
+ <xsl:attribute name="href">
+ <xsl:call-template name="href.target">
+ <xsl:with-param name="context" select="$this"/>
+ <xsl:with-param name="object" select="."/>
+ </xsl:call-template>
+ </xsl:attribute>
+ <xsl:attribute name="title">
+ <xsl:apply-templates select="." mode="object.title.markup.textonly"/>
+ </xsl:attribute>
+ </link>
+ </xsl:for-each>
+
+ <xsl:for-each select="sect2|sect3|sect4|sect5|refsect2|refsect3">
+ <link rel="subsection">
+ <xsl:attribute name="href">
+ <xsl:call-template name="href.target">
+ <xsl:with-param name="context" select="$this"/>
+ <xsl:with-param name="object" select="."/>
+ </xsl:call-template>
+ </xsl:attribute>
+ <xsl:attribute name="title">
+ <xsl:apply-templates select="." mode="object.title.markup.textonly"/>
+ </xsl:attribute>
+ </link>
+ </xsl:for-each>
+ </xsl:if>
+
+ <!-- * if we have a legalnotice and user wants it output as a -->
+ <!-- * separate page and $html.head.legalnotice.link.types is -->
+ <!-- * non-empty, we generate a link or links for each value in -->
+ <!-- * $html.head.legalnotice.link.types -->
+<!-- <xsl:if test="//legalnotice and not($generate.legalnotice.link = 0) and not($html.head.legalnotice.link.types = '')">
+ <xsl:call-template name="make.legalnotice.head.links"/>
+ </xsl:if> -->
+
+ <xsl:call-template name="user.head.content"/>
+ </head>
+</xsl:template>
+
+<!-- ==================================================================== -->
+
+<!-- from common/gentext.xsl -->
+<!-- admin.html:
+"14.5. Non-Durable Settings" -> "Non-Durable Settings"
+"Chapter 15. Installation from Source Code" -> "Installation from Source Code"
+ -->
+<xsl:template match="*" mode="object.title.markup.textonly">
+ <xsl:variable name="template">
+ <xsl:call-template name="gentext.template">
+ <xsl:with-param name="context"><xsl:choose>
+ <xsl:when test="local-name()='part' or
+ local-name()='chapter' or
+ local-name()='appendix' or
+ local-name()='sect1' or
+ local-name()='sect2' or
+ local-name()='sect3' or
+ local-name()='sect4' or
+ local-name()='sect5' or
+ local-name()='simplesect'">title-unnumbered</xsl:when>
+ <xsl:otherwise>title</xsl:otherwise>
+ </xsl:choose></xsl:with-param>
+ <xsl:with-param name="name">
+ <xsl:call-template name="xpath.location"/>
+ </xsl:with-param>
+ </xsl:call-template>
+ </xsl:variable>
+ <xsl:variable name="title">
+ <xsl:call-template name="substitute-markup">
+ <xsl:with-param name="allow-anchors" select="0"/>
+ <xsl:with-param name="template" select="$template"/>
+ </xsl:call-template>
+ </xsl:variable>
+ <xsl:value-of select="normalize-space($title)"/>
+</xsl:template>
+
+<!-- from common/gentext.xsl (based on <xsl:template match="*" mode="object.title.markup">)-->
+<!-- admin.html: "Part III. Server Administration -> III. Server Administration" -->
+<xsl:template match="part" mode="object.title.markup">
+ <xsl:param name="allow-anchors" select="0"/>
+ <xsl:variable name="template">%n. %t
+<!-- <xsl:apply-templates select="." mode="object.title.template"/> -->
+ </xsl:variable>
+
+<!--
+ <xsl:message>
+ <xsl:text>object.title.markup: </xsl:text>
+ <xsl:value-of select="local-name(.)"/>
+ <xsl:text>: </xsl:text>
+ <xsl:value-of select="$template"/>
+ </xsl:message>
+-->
+ <xsl:call-template name="substitute-markup">
+ <xsl:with-param name="allow-anchors" select="$allow-anchors"/>
+ <xsl:with-param name="template" select="$template"/>
+ </xsl:call-template>
+</xsl:template>
+
+<!-- from common/gentext.xsl (based on <xsl:template match="*" mode="object.xref.template">) -->
+<!-- contrib-prog-client.html: "see also PostgreSQL Client Applications" -> "see also Reference II, PostgreSQL Client Applications" -->
+<xsl:template match="reference"
+ mode="object.xref.template">
+ <xsl:variable name="title">
+ <xsl:call-template name="gentext">
+ <xsl:with-param name="key" select="'Reference'"/>
+ </xsl:call-template>
+ </xsl:variable>
+ <xsl:value-of select='concat($title, " %n, %t")' />
+</xsl:template>
+<!-- ==================================================================== -->
+
+<!-- from xhtml/chunk-code.xsl (see stylesheet-xhtml-dsssl-like-imports.xsl) -->
+<xsl:template match="chapter|sect1|appendix">
+ <xsl:choose>
+ <xsl:when test="$onechunk != 0 and parent::*">
+ <xsl:apply-imports/>
+ </xsl:when>
+ <xsl:otherwise>
+ <xsl:call-template name="process-chunk-element"/>
+ </xsl:otherwise>
+ </xsl:choose>
+</xsl:template>
+<!-- ==================================================================== -->
+
+<!-- from xhtml/admon.xsl -->
+<!-- app-psql.html:
+ This mode is provided for those who insist on it, but you are
+ not necessarily encouraged to use it. In particular, if you mix
+ SQL and meta-commands on a line the order of execution might not
+ always be clear to the inexperienced user.
+->
+ This mode is provided for those who insist on it, but you are not
+ necessarily encouraged to use it. In particular, if you mix SQL and
+ meta-commands on a line the order of execution might not always be
+ clear to the inexperienced user.
+-->
+<xsl:template name="nongraphical.admonition">
+ <div>
+ <xsl:call-template name="common.html.attributes">
+ <xsl:with-param name="inherit" select="1"/>
+ </xsl:call-template>
+ <xsl:call-template name="id.attribute"/>
+ <xsl:if test="$admon.style != '' and $make.clean.html = 0">
+ <xsl:attribute name="style">
+ <xsl:value-of select="$admon.style"/>
+ </xsl:attribute>
+ </xsl:if>
+
+ <xsl:choose>
+ <xsl:when test="local-name()='warning' or local-name()='caution'">
+ <table>
+ <xsl:call-template name="common.html.attributes">
+ <xsl:with-param name="inherit" select="1"/>
+ </xsl:call-template>
+ <xsl:attribute name="width">90%</xsl:attribute>
+ <xsl:attribute name="border">1</xsl:attribute>
+ <xsl:if test="$admon.textlabel != 0 or title or info/title">
+ <tr><td align="center"><b>
+ <xsl:call-template name="anchor"/>
+ <xsl:apply-templates select="." mode="object.title.markup"/>
+ </b></td></tr>
+ </xsl:if>
+ <tr><td align="left">
+ <xsl:apply-templates/>
+ </td></tr>
+ </table>
+ </xsl:when>
+ <xsl:otherwise>
+ <blockquote>
+ <xsl:call-template name="common.html.attributes">
+ <xsl:with-param name="inherit" select="1"/>
+ </xsl:call-template>
+ <xsl:if test="$admon.textlabel != 0 or title or info/title">
+ <h3 class="title">
+ <xsl:call-template name="anchor"/>
+ <xsl:apply-templates select="." mode="object.title.markup"/>
+ </h3>
+ </xsl:if>
+ <xsl:apply-templates/>
+ </blockquote>
+ </xsl:otherwise>
+ </xsl:choose>
+ </div>
+</xsl:template>
+
+<xsl:param name="admon.style">
+ <xsl:value-of select="concat('margin-', $direction.align.start, ': 0px; margin-', $direction.align.end, ': 0px;')"/>
+</xsl:param>
+
+<!-- ==================================================================== -->
+<!-- from xhtml/block.xsl -->
+<!--
+auth-pg-hba-conf.htm:
+ Users sometimes wonder why host names are handled in this
+ seemingly complicated way, with two name resolutions including a
+ reverse lookup of the client's IP address. This complicates use
+->
+ Users sometimes wonder why host names are handled in this seemingly
+ complicated way, with two name resolutions including a reverse lookup
+ of the client's IP address. This complicates use of the feature in case
+
+-->
+<xsl:template match="sidebar">
+ <table cellpadding="5" border="1">
+ <xsl:call-template name="common.html.attributes"/>
+ <tr><td>
+ <div>
+ <xsl:call-template name="common.html.attributes"/>
+ <xsl:call-template name="id.attribute"/>
+ <xsl:call-template name="anchor"/>
+ <xsl:call-template name="sidebar.titlepage"/>
+ <xsl:apply-templates/>
+ </div>
+ </td></tr></table>
+</xsl:template>
+
+<!-- ==================================================================== -->
+<!-- from xhtml/refentry.xsl -->
+<!--
+
+app-clusterdb.html:
+ __________________________________________________________________
+->
+ _______________________________________________________________________
+
+ clusterdb
+-->
+<xsl:template match="refnamediv">
+ <div>
+ <xsl:call-template name="common.html.attributes">
+ <xsl:with-param name="inherit" select="1"/>
+ </xsl:call-template>
+ <xsl:call-template name="id.attribute"/>
+ <xsl:call-template name="anchor"/>
+ <xsl:choose>
+ <xsl:when test="preceding-sibling::refnamediv">
+ <!-- no title on secondary refnamedivs! -->
+ </xsl:when>
+ <xsl:when test="$refentry.generate.title != 0">
+ <h1 align="center">
+ <xsl:choose>
+ <xsl:when test="../refmeta/refentrytitle">
+ <xsl:apply-templates select="../refmeta/refentrytitle"/>
+ </xsl:when>
+ <xsl:otherwise>
+ <xsl:apply-templates select="refname[1]"/>
+ </xsl:otherwise>
+ </xsl:choose>
+ </h1>
+ </xsl:when>
+ </xsl:choose>
+ <h2>
+ <xsl:call-template name="gentext">
+ <xsl:with-param name="key" select="'RefName'"/>
+ </xsl:call-template>
+ </h2>
+
+ <p>
+ <xsl:apply-templates/>
+ </p>
+ </div>
+</xsl:template>
+
+<!-- ==================================================================== -->
+
+<!-- from common/common.xsl -->
+<!-- app-clusterdb.html:
+ clusterdb [connection-option...] [ -_-verbose | -v ] -_-all | -a
+->
+ clusterdb [connection-option...] [-_-verbose | -v] -_-all | -a
+-->
+<xsl:param name="arg.choice.plain.open.str"><xsl:text></xsl:text></xsl:param>
+<xsl:param name="arg.choice.plain.close.str"><xsl:text></xsl:text></xsl:param>
+
+<!-- ==================================================================== -->
+
+<!-- from xhml/autotoc.xls -->
+<!-- Add subtoc for sect1/refentry and sect1/simplesect
+ecpg.html:
+ 33.14. Embedded SQL Commands
+ 33.15. Informix Compatibility Mode
+->
+ 33.14. Embedded SQL Commands
+ ALLOCATE DESCRIPTOR — allocate an SQL descriptor area
+ CONNECT — establish a database connection
+...
+ 33.15. Informix Compatibility Mode
+
+-->
+<xsl:template match="sect1" mode="toc">
+ <xsl:param name="toc-context" select="."/>
+ <xsl:call-template name="subtoc">
+ <xsl:with-param name="toc-context" select="$toc-context"/>
+ <xsl:with-param name="nodes" select="sect2|refentry|simplesect |bridgehead[$bridgehead.in.toc != 0]"/>
+ </xsl:call-template>
+</xsl:template>
+
+<!-- from xhtml/autotoc.xsl -->
+<!-- Change subtoc output condition
+contrib.html:
+ F.1. adminpack
+ F.1.1. Functions Implemented
+ F.2. auth_delay
+ F.2.1. Configuration Parameters
+ F.2.2. Author
+ F.3. auto_explain
+->
+ F.1. adminpack
+ F.2. auth_delay
+ F.3. auto_explain
+
+-->
+<xsl:template name="subtoc">
+ <xsl:param name="toc-context" select="."/>
+ <xsl:param name="nodes" select="NOT-AN-ELEMENT"/>
+
+ <xsl:variable name="nodes.plus" select="$nodes | qandaset"/>
+
+ <xsl:variable name="subtoc">
+ <xsl:element name="{$toc.list.type}" namespace="http://www.w3.org/1999/xhtml">
+ <xsl:choose>
+ <xsl:when test="$qanda.in.toc != 0">
+ <xsl:apply-templates mode="toc" select="$nodes.plus">
+ <xsl:with-param name="toc-context" select="$toc-context"/>
+ </xsl:apply-templates>
+ </xsl:when>
+ <xsl:otherwise>
+ <xsl:apply-templates mode="toc" select="$nodes">
+ <xsl:with-param name="toc-context" select="$toc-context"/>
+ </xsl:apply-templates>
+ </xsl:otherwise>
+ </xsl:choose>
+ </xsl:element>
+ </xsl:variable>
+
+ <xsl:variable name="depth">
+ <xsl:choose>
+ <xsl:when test="local-name(.) = 'section'">
+ <xsl:value-of select="count(ancestor::section) + 1"/>
+ </xsl:when>
+ <xsl:when test="local-name(.) = 'sect1'">1</xsl:when>
+ <xsl:when test="local-name(.) = 'sect2'">2</xsl:when>
+ <xsl:when test="local-name(.) = 'sect3'">3</xsl:when>
+ <xsl:when test="local-name(.) = 'sect4'">4</xsl:when>
+ <xsl:when test="local-name(.) = 'sect5'">5</xsl:when>
+ <xsl:when test="local-name(.) = 'refsect1'">1</xsl:when>
+ <xsl:when test="local-name(.) = 'refsect2'">2</xsl:when>
+ <xsl:when test="local-name(.) = 'refsect3'">3</xsl:when>
+ <xsl:when test="local-name(.) = 'topic'">1</xsl:when>
+ <xsl:when test="local-name(.) = 'simplesect'">
+ <!-- sigh... -->
+ <xsl:choose>
+ <xsl:when test="local-name(..) = 'section'">
+ <xsl:value-of select="count(ancestor::section)"/>
+ </xsl:when>
+ <xsl:when test="local-name(..) = 'sect1'">2</xsl:when>
+ <xsl:when test="local-name(..) = 'sect2'">3</xsl:when>
+ <xsl:when test="local-name(..) = 'sect3'">4</xsl:when>
+ <xsl:when test="local-name(..) = 'sect4'">5</xsl:when>
+ <xsl:when test="local-name(..) = 'sect5'">6</xsl:when>
+ <xsl:when test="local-name(..) = 'topic'">2</xsl:when>
+ <xsl:when test="local-name(..) = 'refsect1'">2</xsl:when>
+ <xsl:when test="local-name(..) = 'refsect2'">3</xsl:when>
+ <xsl:when test="local-name(..) = 'refsect3'">4</xsl:when>
+ <xsl:otherwise>1</xsl:otherwise>
+ </xsl:choose>
+ </xsl:when>
+ <xsl:otherwise>0</xsl:otherwise>
+ </xsl:choose>
+ </xsl:variable>
+
+ <xsl:variable name="depth.from.context" select="count(ancestor::*)-count($toc-context/ancestor::*)"/>
+
+ <xsl:variable name="subtoc.list">
+ <xsl:choose>
+ <xsl:when test="$toc.dd.type = ''">
+ <xsl:copy-of select="$subtoc"/>
+ </xsl:when>
+ <xsl:otherwise>
+ <xsl:element name="{$toc.dd.type}" namespace="http://www.w3.org/1999/xhtml">
+ <xsl:copy-of select="$subtoc"/>
+ </xsl:element>
+ </xsl:otherwise>
+ </xsl:choose>
+ </xsl:variable>
+ <xsl:variable name="output.subtoc"><xsl:value-of select="
+ ( (self::set or self::book or self::part) or
+ ($toc.section.depth > $depth and local-name($toc-context)!='appendix' and local-name($toc-context)!='preface') ) and
+ ( ($qanda.in.toc = 0 and (count($nodes)>1 or (count($nodes)>0 and ($toc.section.depth - 1 > $depth)) )) or
+ ($qanda.in.toc != 0 and (count($nodes.plus)>1 or (count($nodes)>0 and $toc.section.depth - 1 > $depth) ))) and
+ $toc.max.depth > $depth.from.context
+ "/></xsl:variable>
+ <xsl:element name="{$toc.listitem.type}" namespace="http://www.w3.org/1999/xhtml">
+ <xsl:call-template name="toc.line">
+ <xsl:with-param name="toc-context" select="$toc-context"/>
+ </xsl:call-template>
+ <xsl:if test="$toc.listitem.type = 'li' and $output.subtoc = 'true'">
+ <xsl:copy-of select="$subtoc.list"/>
+ </xsl:if>
+ </xsl:element>
+ <xsl:if test="$toc.listitem.type != 'li' and $output.subtoc = 'true'">
+ <xsl:copy-of select="$subtoc.list"/>
+ </xsl:if>
+</xsl:template>
+
+<!-- from common/labels.xsl -->
+<!--
+preface.html:
+1. What is PostgreSQL?
+2. A Brief History of PostgreSQL
+3. Conventions
+->
+What is PostgreSQL?
+A Brief History of PostgreSQL
+Conventions
+-->
+<xsl:template name="label.this.section">
+ <xsl:param name="section" select="."/>
+
+ <xsl:variable name="level">
+ <xsl:call-template name="section.level"/>
+ </xsl:variable>
+
+ <xsl:choose>
+ <!-- bridgeheads are not numbered -->
+ <xsl:when test="$section/self::bridgehead">0</xsl:when>
+ <xsl:when test="ancestor::preface">0</xsl:when>
+ <xsl:when test="$level <= $section.autolabel.max.depth">
+ <xsl:value-of select="$section.autolabel"/>
+ </xsl:when>
+ <xsl:otherwise>0</xsl:otherwise>
+ </xsl:choose>
+</xsl:template>
+
+
+<!-- from common/gentext.xsl -->
+<!-- error-style-guide.html:
+What Goes Where
+->
+51.3.1. What Goes Where
+-->
+<xsl:template match="simplesect"
+ mode="object.title.template">
+<xsl:text>%n. %t</xsl:text>
+</xsl:template>
+
+<!-- based on xhtml/component.xsl: <xsl:template match="topic/title|topic/info/title" mode="titlepage.mode" priority="2"> -->
+<!-- sql-commands.html:
+SQL Commands
+->
+I. SQL Commands
+-->
+<xsl:template match="reference/title" mode="titlepage.mode" priority="2">
+ <xsl:call-template name="component.title">
+ <xsl:with-param name="node" select="ancestor::reference[1]"/>
+ </xsl:call-template>
+</xsl:template>
+
+<xsl:template match="reference"
+ mode="object.title.template">
+<xsl:text>%n. %t</xsl:text>
+</xsl:template>
+
+<!-- from xhtml/footnote.xsl -->
+<!--
+<sup>[1]</sup> -> <span>[1]</span>
+
+datatype-json.html:
+each value in the data. ^[16]
+->
+each value in the data. [16]
+-->
+<xsl:template match="footnote">
+ <xsl:variable name="name">
+ <xsl:call-template name="object.id">
+ <xsl:with-param name="conditional" select="0"/>
+ </xsl:call-template>
+ </xsl:variable>
+ <xsl:variable name="href">
+ <xsl:text>#ftn.</xsl:text>
+ <xsl:value-of select="$name"/>
+ </xsl:variable>
+
+ <a href="{$href}">
+ <xsl:apply-templates select="." mode="class.attribute"/>
+ <xsl:if test="$generate.id.attributes = 0">
+ <xsl:attribute name="id">
+ <xsl:value-of select="$name"/>
+ </xsl:attribute>
+ </xsl:if>
+
+ <span> <!-- instead of <sup> -->
+ <xsl:apply-templates select="." mode="class.attribute"/>
+ <xsl:call-template name="id.attribute">
+ <xsl:with-param name="conditional" select="0"/>
+ </xsl:call-template>
+ <xsl:text>[</xsl:text>
+ <xsl:apply-templates select="." mode="footnote.number"/>
+ <xsl:text>]</xsl:text>
+ </span>
+ </a>
+</xsl:template>
+
+<!-- from xhtml/footnote.xsl -->
+<!--
+<sup>[1]</sup> -> <span>[1]</span>
+
+datatype-json.html:
++ ^[1] For this purpose, the term "value" includes array elements,
++ though JSON terminology sometimes considers array elements distinct
+->
++ [1] For this purpose, the term "value" includes array elements,
++ though JSON terminology sometimes considers array elements distinct
+-->
+<xsl:template match="footnote/para[1]|footnote/simpara[1]" priority="2">
+ <!-- this only works if the first thing in a footnote is a para, -->
+ <!-- which is ok, because it usually is. -->
+ <xsl:variable name="href">
+ <xsl:text>#</xsl:text>
+ <xsl:call-template name="object.id">
+ <xsl:with-param name="object" select="ancestor::footnote"/>
+ </xsl:call-template>
+ </xsl:variable>
+
+ <xsl:call-template name="paragraph">
+ <xsl:with-param name="class">
+ <xsl:if test="@role and $para.propagates.style != 0">
+ <xsl:value-of select="@role"/>
+ </xsl:if>
+ </xsl:with-param>
+ <xsl:with-param name="content">
+ <a href="{$href}">
+ <xsl:apply-templates select="." mode="class.attribute"/>
+ <span>
+ <xsl:apply-templates select="." mode="class.attribute"/>
+ <xsl:text>[</xsl:text>
+ <xsl:apply-templates select="ancestor::footnote" mode="footnote.number"/>
+ <xsl:text>] </xsl:text>
+ </span>
+ </a>
+ <p>
+ <xsl:attribute name="style">margin-left:5%</xsl:attribute>
+ <xsl:apply-templates/>
+ </p>
+ </xsl:with-param>
+ </xsl:call-template>
+
+</xsl:template>
+
+<!-- Custom function for chunk numbering -->
+<xsl:template name="footnote.in.chunk.number">
+ <xsl:param name="node" select="."/>
+ <xsl:param name="footnote" select="."/>
+
+ <xsl:variable name="is.chunk">
+ <xsl:call-template name="chunk">
+ <xsl:with-param name="node" select="$node"/>
+ </xsl:call-template>
+ </xsl:variable>
+
+ <xsl:choose>
+ <xsl:when test="$is.chunk = 1">
+ <xsl:value-of select="count($node//footnote[not(@label)][count(./preceding::node()) <= count($node//footnote[not(@label)][.=$footnote]/preceding::node())])" />
+ </xsl:when>
+ <xsl:otherwise>
+ <xsl:if test="$node/parent::*">
+ <xsl:call-template name="footnote.in.chunk.number">
+ <xsl:with-param name="node" select="$node/parent::*"/>
+ <xsl:with-param name="footnote" select="$footnote"/>
+ </xsl:call-template>
+ </xsl:if>
+ </xsl:otherwise>
+ </xsl:choose>
+</xsl:template>
+
+<!-- from xhtml/footnote.xsl
+Independent footnote numbering inside chunks
+error-message-reporting.html:
+ [11] %m does not require any corresponding entry in the parameter list for errmsg.
+->
+ [1] %m does not require any corresponding entry in the parameter list for errmsg.
+-->
+<xsl:template match="footnote" mode="footnote.number">
+ <xsl:choose>
+ <xsl:when test="string-length(@label) != 0">
+ <xsl:value-of select="@label"/>
+ </xsl:when>
+ <xsl:when test="ancestor::table or ancestor::informaltable">
+ <xsl:variable name="tfnum">
+ <xsl:number level="any" from="table|informaltable" format="1"/>
+ </xsl:variable>
+
+ <xsl:choose>
+ <xsl:when test="string-length($table.footnote.number.symbols) >= $tfnum">
+ <xsl:value-of select="substring($table.footnote.number.symbols, $tfnum, 1)"/>
+ </xsl:when>
+ <xsl:otherwise>
+ <xsl:number level="any" from="table | informaltable" format="{$table.footnote.number.format}"/>
+ </xsl:otherwise>
+ </xsl:choose>
+ </xsl:when>
+ <xsl:otherwise>
+ <xsl:variable name="fnum"> <!--"count($pfoot) - count($ptfoot) + 1"/> -->
+ <xsl:choose>
+ <xsl:when test="$onechunk != 0">
+ <xsl:variable name="pfoot" select="preceding::footnote[not(@label)]"/>
+ <xsl:variable name="ptfoot" select="preceding::table//footnote | preceding::informaltable//footnote"/>
+ <xsl:value-of select="count($pfoot) - count($ptfoot) + 1"/>
+ </xsl:when>
+ <xsl:otherwise>
+ <xsl:call-template name="footnote.in.chunk.number">
+ </xsl:call-template>
+ </xsl:otherwise>
+ </xsl:choose>
+ </xsl:variable>
+ <xsl:choose>
+ <xsl:when test="string-length($footnote.number.symbols) >= $fnum">
+ <xsl:value-of select="substring($footnote.number.symbols, $fnum, 1)"/>
+ </xsl:when>
+ <xsl:otherwise>
+ <xsl:number value="$fnum" format="{$footnote.number.format}"/>
+ </xsl:otherwise>
+ </xsl:choose>
+ </xsl:otherwise>
+ </xsl:choose>
+</xsl:template>
+
+<!-- from xhtml/xref.xsl -->
+<!--
+tutorial-sql-intro.html:
+ written on SQL, including [melt93] and [date97].
+->
+ written on SQL, including Understanding the New SQL and A Guide
+ to the SQL Standard.
+-->
+<xsl:template match="biblioentry|bibliomixed" mode="xref-to">
+ <xsl:param name="referrer"/>
+ <xsl:param name="xrefstyle"/>
+ <xsl:param name="verbose" select="1"/>
+ <!-- handles both biblioentry and bibliomixed -->
+
+ <xsl:choose>
+ <xsl:when test="string(.) = ''">
+ <xsl:variable name="bib" select="document($bibliography.collection,.)"/>
+ <xsl:variable name="id" select="(@id|@xml:id)[1]"/>
+ <xsl:variable name="entry" select="$bib/bibliography/ *[@id=$id or @xml:id=$id][1]"/>
+ <xsl:choose>
+ <xsl:when test="$entry">
+ <xsl:choose>
+ <xsl:when test="$bibliography.numbered != 0">
+ <xsl:number from="bibliography" count="biblioentry|bibliomixed" level="any" format="1"/>
+ </xsl:when>
+ <xsl:when test="local-name($entry/*[1]) = 'abbrev'">
+ <xsl:apply-templates select="$entry/*[1]" mode="no.anchor.mode"/>
+ </xsl:when>
+ <xsl:otherwise>
+ <xsl:value-of select="(@id|@xml:id)[1]"/>
+ </xsl:otherwise>
+ </xsl:choose>
+ </xsl:when>
+ <xsl:otherwise>
+ <xsl:message>
+ <xsl:text>No bibliography entry: </xsl:text>
+ <xsl:value-of select="$id"/>
+ <xsl:text> found in </xsl:text>
+ <xsl:value-of select="$bibliography.collection"/>
+ </xsl:message>
+ <xsl:value-of select="(@id|@xml:id)[1]"/>
+ </xsl:otherwise>
+ </xsl:choose>
+ </xsl:when>
+ <xsl:otherwise>
+ <xsl:choose>
+ <xsl:when test="$bibliography.numbered != 0">
+ <xsl:number from="bibliography" count="biblioentry|bibliomixed" level="any" format="1"/>
+ </xsl:when>
+ <xsl:when test="local-name(*[1]) = 'abbrev'">
+ <xsl:apply-templates select="*[1]" mode="no.anchor.mode"/>
+ </xsl:when>
+ <xsl:otherwise>
+ <xsl:value-of select="normalize-space((title|(biblioset[1]/title))[1])"/>
+ </xsl:otherwise>
+ </xsl:choose>
+ </xsl:otherwise>
+ </xsl:choose>
+</xsl:template>
+
+<!-- from xhtml/xref.xsl -->
+<xsl:template match="biblioentry|bibliomixed" mode="xref-to-prefix">
+</xsl:template>
+
+<!-- from xhtml/xref.xsl -->
+<xsl:template match="biblioentry|bibliomixed" mode="xref-to-suffix">
+</xsl:template>
+
+
+</xsl:stylesheet>
diff --git a/doc/src/sgml/stylesheet.xsl b/doc/src/sgml/stylesheet.xsl
index 7967b36..70cdecf 100644
--- a/doc/src/sgml/stylesheet.xsl
+++ b/doc/src/sgml/stylesheet.xsl
@@ -7,6 +7,9 @@
<xsl:import href="http://docbook.sourceforge.net/release/xsl/current/xhtml/chunk.xsl"/>
<xsl:include href="stylesheet-common.xsl" />
+<xsl:include href="stylesheet-speedup-common.xsl" />
+<xsl:include href="stylesheet-speedup-xhtml.xsl" />
+<xsl:include href="stylesheet-xhtml-dsssl-like.xsl" />
<!-- Parameters -->
<xsl:param name="base.dir" select="'html/'"></xsl:param>
@@ -19,6 +22,9 @@
<xsl:param name="chunk.quietly" select="1"></xsl:param>
<xsl:param name="toc.max.depth">2</xsl:param>
+<xsl:param name="refentry.generate.name" select="1"/>
+<xsl:param name="refentry.generate.title" select="1"/>
+<xsl:param name="xref.with.number.and.title" select="0"></xsl:param>
<xsl:param name="website.stylesheet" select="0"/>
<xsl:param name="html.stylesheet">
@@ -49,7 +55,7 @@ preface toc,title
qandadiv toc
qandaset toc
reference toc,title
-sect1 toc
+sect1 toc,title
sect2 toc
sect3 toc
sect4 toc
^ permalink raw reply [nested|flat] 86+ messages in thread
* Re: Docbook 5.x
2016-04-20 14:30 Docbook 5.x Jürgen Purtz <[email protected]>
2016-05-03 19:34 ` Re: Docbook 5.x Alvaro Herrera <[email protected]>
2016-05-03 20:13 ` Re: Docbook 5.x Oleg Bartunov <[email protected]>
2016-05-04 14:44 ` Re: Docbook 5.x Jürgen Purtz <[email protected]>
2016-05-04 15:08 ` Re: Docbook 5.x Alexander Law <[email protected]>
2016-05-05 01:09 ` Re: Docbook 5.x Peter Eisentraut <[email protected]>
@ 2016-07-02 10:14 ` Jürgen Purtz <[email protected]>
3 siblings, 0 replies; 86+ messages in thread
From: Jürgen Purtz @ 2016-07-02 10:14 UTC (permalink / raw)
To: pgsql-docs
On 05.05.2016 03:09, Peter Eisentraut wrote:
> I think the process should be something like this:
>
> - Apply your XSLT performance patch. The patch should be submitted to
> the next commit fest.
>
> - Wait a while to make sure everyone is happy with the performance.
> Keep tweaking if necessary.
>
> - Port all DSSSL customizations to XSLT. Manually evaluate output for
> quality.
>
> - Switch to XSLT build for official HTML documentation. [milestone 1]
>
> - Convert sources to XML. (There could be substeps here.) [milestone 2]
>
> - Then consider upgrading to DocBook 5. [milestone 3]
During the step from DocBook 4 to DocBook 5 [M3] we will face the
problem that there are incompatibilities in the DocBook structure. Our
source is affected by:
1. It's no longer possible to use <option> and <optional> in a
recursive fashion.
2. The content model of <literal>, <function>, <command> and similar
elements has changed.
In my opinion the first issue is not acceptable and the second one may
need some DocBook redesign as well as manual changes in our source code.
The DocBook TC has accepted this concerns and works on a solution. But
as they are in the last phase of bringing 5.1 to an official OASIS
standard, we probably have to wait (a long time) until 5.2. You can
follow the discussion here:
https://lists.oasis-open.org/archives/docbook/201606/msg00007.html and
in a direct mail from Bob Stayton:
-----
Hi,
I'm investigating this issue. I'm trying to track down the history and
reasoning for this change, but have not yet completed that research. It
looks like a mistake to me to limit the content model so much when we
were consciously trying to maintain backwards compatibility unless there
were good reasons not to.
Bob Stayton
Sagehill Enterprises
[email protected]
-----
Jürgen Purtz
Btw: Since 16 June 2016 Norman Welsh is no longer chairman of the TC.
Now Bob holds this position, Norman changed to a 'normal' member of the TC.
^ permalink raw reply [nested|flat] 86+ messages in thread
* Re: Docbook 5.x
2016-04-20 14:30 Docbook 5.x Jürgen Purtz <[email protected]>
2016-05-03 19:34 ` Re: Docbook 5.x Alvaro Herrera <[email protected]>
2016-05-03 20:13 ` Re: Docbook 5.x Oleg Bartunov <[email protected]>
2016-05-04 14:44 ` Re: Docbook 5.x Jürgen Purtz <[email protected]>
@ 2016-05-04 15:18 ` Alvaro Herrera <[email protected]>
2016-05-04 15:31 ` Re: Docbook 5.x Tom Lane <[email protected]>
2016-05-04 18:11 ` Re: Docbook 5.x Jürgen Purtz <[email protected]>
2 siblings, 2 replies; 86+ messages in thread
From: Alvaro Herrera @ 2016-05-04 15:18 UTC (permalink / raw)
To: Jürgen Purtz <[email protected]>; +Cc: pgsql-docs
Jürgen Purtz wrote:
> I measured following elapsed times on an Intel i5 processor:
>
> 1. generate all HTML files with dsl script (make html): 0:48 min.
> 2. generate all HTML files with xslt script (make xslthtml): 16:01 min.
> 3. generate all HTML files with xslt script in the new environment
> (pure Docbook5): 4:07 min.
> 4. Generating different things via dsl scripts in the new environment
> may be possible. But the changelog of the Docbook5 dsl scripts
> shows, that the last modification occurred in 2004 - this way is a
> dead end.
Thanks.
The dsl toolchain has a "make html" format which creates the index and a
"make draft" that doesn't. You timed the former only. What's the
timing for an equivalent of "make draft" in the xslt chain? If it
exists and is short enough, it seems acceptable to me that the complete
(with index) build takes ~4x as long as today; the draft timing is more
critical, I would think.
Man pages are already generated using xslt, so I suppose that wouldn't
change. PDF creation timing is also critical.
FWIW, in my laptop "make draft" takes 1m18.788s and a "make html"
takes 1m26.676s. So it's just 8 seconds to generate the SGML file for
the index, and no reruns required ... hmm. I think I'm gonna forget
about "make draft" in the future.
--
Álvaro Herrera http://www.2ndQuadrant.com/
PostgreSQL Development, 24x7 Support, Remote DBA, Training & Services
--
Sent via pgsql-docs mailing list ([email protected])
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-docs
^ permalink raw reply [nested|flat] 86+ messages in thread
* Re: Docbook 5.x
2016-04-20 14:30 Docbook 5.x Jürgen Purtz <[email protected]>
2016-05-03 19:34 ` Re: Docbook 5.x Alvaro Herrera <[email protected]>
2016-05-03 20:13 ` Re: Docbook 5.x Oleg Bartunov <[email protected]>
2016-05-04 14:44 ` Re: Docbook 5.x Jürgen Purtz <[email protected]>
2016-05-04 15:18 ` Re: Docbook 5.x Alvaro Herrera <[email protected]>
@ 2016-05-04 15:31 ` Tom Lane <[email protected]>
1 sibling, 0 replies; 86+ messages in thread
From: Tom Lane @ 2016-05-04 15:31 UTC (permalink / raw)
To: Alvaro Herrera <[email protected]>; +Cc: Jürgen Purtz <[email protected]>; pgsql-docs
Alvaro Herrera <[email protected]> writes:
> The dsl toolchain has a "make html" format which creates the index and a
> "make draft" that doesn't. You timed the former only. What's the
> timing for an equivalent of "make draft" in the xslt chain? If it
> exists and is short enough, it seems acceptable to me that the complete
> (with index) build takes ~4x as long as today; the draft timing is more
> critical, I would think.
I would object to that; I don't ever use "make draft", in part because
I frequently want to look at whether the index entries look sensible.
Also, as you noted, the time savings is pretty minimal at present.
regards, tom lane
--
Sent via pgsql-docs mailing list ([email protected])
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-docs
^ permalink raw reply [nested|flat] 86+ messages in thread
* Re: Docbook 5.x
2016-04-20 14:30 Docbook 5.x Jürgen Purtz <[email protected]>
2016-05-03 19:34 ` Re: Docbook 5.x Alvaro Herrera <[email protected]>
2016-05-03 20:13 ` Re: Docbook 5.x Oleg Bartunov <[email protected]>
2016-05-04 14:44 ` Re: Docbook 5.x Jürgen Purtz <[email protected]>
2016-05-04 15:18 ` Re: Docbook 5.x Alvaro Herrera <[email protected]>
@ 2016-05-04 18:11 ` Jürgen Purtz <[email protected]>
1 sibling, 0 replies; 86+ messages in thread
From: Jürgen Purtz @ 2016-05-04 18:11 UTC (permalink / raw)
To: pgsql-docs
Alvaro,
the advantage of draft mode is smaller than 15% in the three
environments. In Docbook5 it reduces the elapsed time from 4:07 to 4:02.
Jürgen Purtz
On 04.05.2016 17:18, Alvaro Herrera wrote:
> The dsl toolchain has a "make html" format which creates the index and a
> "make draft" that doesn't. You timed the former only. What's the
> timing for an equivalent of "make draft" in the xslt chain? If it
> exists and is short enough, it seems acceptable to me that the complete
> (with index) build takes ~4x as long as today; the draft timing is more
> critical, I would think.
--
Sent via pgsql-docs mailing list ([email protected])
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-docs
^ permalink raw reply [nested|flat] 86+ messages in thread
end of thread, other threads:[~2017-11-28 16:55 UTC | newest]
Thread overview: 86+ messages (download: mbox mbox.gz follow: Atom feed)
-- links below jump to the message on this page --
2016-04-20 14:30 Docbook 5.x Jürgen Purtz <[email protected]>
2016-04-20 15:59 ` Alexander Law <[email protected]>
2016-04-20 18:41 ` Simon Riggs <[email protected]>
2016-04-21 13:34 ` Jürgen Purtz <[email protected]>
2016-05-03 19:19 ` Jürgen Purtz <[email protected]>
2016-05-03 19:34 ` Alvaro Herrera <[email protected]>
2016-05-03 19:59 ` Joshua D. Drake <[email protected]>
2016-05-03 20:55 ` Tom Lane <[email protected]>
2016-05-03 21:05 ` Tom Lane <[email protected]>
2016-05-03 20:13 ` Oleg Bartunov <[email protected]>
2016-05-04 00:44 ` Peter Eisentraut <[email protected]>
2016-05-05 04:45 ` Alexander Law <[email protected]>
2016-06-03 19:31 ` Peter Eisentraut <[email protected]>
2016-06-04 14:28 ` Alexander Law <[email protected]>
2016-06-06 12:28 ` Peter Eisentraut <[email protected]>
2016-06-06 17:49 ` Alexander Law <[email protected]>
2016-06-06 19:56 ` Peter Eisentraut <[email protected]>
2016-08-18 17:56 ` Peter Eisentraut <[email protected]>
2016-08-19 13:14 ` Alexander Law <[email protected]>
2016-08-22 18:06 ` Peter Eisentraut <[email protected]>
2016-08-23 14:23 ` Alexander Law <[email protected]>
2016-08-24 15:12 ` Peter Eisentraut <[email protected]>
2016-09-14 11:18 ` Alexander Law <[email protected]>
2016-09-14 13:05 ` Jürgen Purtz <[email protected]>
2016-09-14 13:47 ` Alexander Law <[email protected]>
2016-09-14 15:30 ` Alvaro Herrera <[email protected]>
2016-09-14 15:46 ` Alexander Law <[email protected]>
2016-09-14 15:52 ` Tom Lane <[email protected]>
2016-09-14 16:41 ` Alvaro Herrera <[email protected]>
2016-09-14 16:56 ` Alexander Law <[email protected]>
2016-10-04 15:45 ` Alexander Law <[email protected]>
2016-10-19 09:11 ` Jürgen Purtz <[email protected]>
2016-11-08 13:25 ` Peter Eisentraut <[email protected]>
2016-11-08 15:02 ` Tom Lane <[email protected]>
2016-11-08 16:34 ` Peter Eisentraut <[email protected]>
2016-11-09 10:00 ` Alexander Law <[email protected]>
2016-11-16 11:30 ` Alexander Law <[email protected]>
2016-11-16 14:40 ` Jürgen Purtz <[email protected]>
2017-02-28 08:55 ` Alexander Law <[email protected]>
2017-02-28 09:50 ` Jürgen Purtz <[email protected]>
2017-03-11 02:06 ` Peter Eisentraut <[email protected]>
2017-04-05 02:33 ` Peter Eisentraut <[email protected]>
2017-09-06 15:54 ` Peter Eisentraut <[email protected]>
2017-09-08 12:30 ` Alexander Lakhin <[email protected]>
2017-09-10 22:59 ` Thomas Munro <[email protected]>
2017-09-15 14:32 ` Peter Eisentraut <[email protected]>
2017-09-15 18:54 ` Jürgen Purtz <[email protected]>
2017-09-18 13:57 ` Peter Eisentraut <[email protected]>
2017-09-18 14:38 ` Alexander Lakhin <[email protected]>
2017-09-19 20:05 ` Peter Eisentraut <[email protected]>
2017-09-20 13:00 ` Alexander Lakhin <[email protected]>
2017-09-27 15:38 ` Peter Eisentraut <[email protected]>
2017-09-27 16:11 ` Alexander Lakhin <[email protected]>
2017-09-27 19:51 ` Alexander Lakhin <[email protected]>
2017-11-16 06:00 ` Alexander Lakhin <[email protected]>
2017-11-18 17:24 ` Peter Eisentraut <[email protected]>
2017-11-23 14:53 ` Peter Eisentraut <[email protected]>
2017-11-25 05:50 ` Alexander Lakhin <[email protected]>
2017-11-28 16:02 ` Peter Eisentraut <[email protected]>
2017-11-28 16:55 ` Alexander Lakhin <[email protected]>
2016-05-04 14:44 ` Jürgen Purtz <[email protected]>
2016-05-04 14:51 ` Tom Lane <[email protected]>
2016-05-04 15:30 ` Jürgen Purtz <[email protected]>
2016-05-12 19:46 ` Jürgen Purtz <[email protected]>
2016-05-12 19:59 ` Alvaro Herrera <[email protected]>
2016-05-04 15:08 ` Alexander Law <[email protected]>
2016-05-04 15:21 ` Alvaro Herrera <[email protected]>
2016-05-04 15:34 ` Alexander Law <[email protected]>
2016-05-04 16:52 ` Jürgen Purtz <[email protected]>
2016-05-04 17:12 ` Alvaro Herrera <[email protected]>
2016-05-04 18:06 ` Jürgen Purtz <[email protected]>
2016-05-04 18:20 ` Alvaro Herrera <[email protected]>
2016-05-04 18:00 ` Alexander Law <[email protected]>
2016-05-05 01:09 ` Peter Eisentraut <[email protected]>
2016-05-05 04:55 ` Alexander Law <[email protected]>
2016-05-13 07:38 ` Jürgen Purtz <[email protected]>
2016-05-13 18:01 ` Peter Eisentraut <[email protected]>
2016-05-14 06:34 ` Alexander Law <[email protected]>
2016-05-22 19:48 ` Jürgen Purtz <[email protected]>
2016-05-31 17:46 ` Peter Eisentraut <[email protected]>
2016-06-19 20:22 ` Jürgen Purtz <[email protected]>
2016-06-27 13:21 ` Alexander Law <[email protected]>
2016-07-02 10:14 ` Jürgen Purtz <[email protected]>
2016-05-04 15:18 ` Alvaro Herrera <[email protected]>
2016-05-04 15:31 ` Tom Lane <[email protected]>
2016-05-04 18:11 ` Jürgen Purtz <[email protected]>
This inbox is served by agora; see mirroring instructions
for how to clone and mirror all data and code used for this inbox