This is the mail archive of the
libstdc++@gcc.gnu.org
mailing list for the libstdc++ project.
Re: http://gcc.gnu.org/onlinedocs/libstdc++/ext/lwg-active.html
- From: Jonathan Wakely <jwakely at redhat dot com>
- To: Gerald Pfeifer <gerald at pfeifer dot com>
- Cc: libstdc++ at gcc dot gnu dot org, Paolo Carlini <paolo dot carlini at oracle dot com>
- Date: Sun, 5 Feb 2017 21:52:37 +0000
- Subject: Re: http://gcc.gnu.org/onlinedocs/libstdc++/ext/lwg-active.html
- Authentication-results: sourceware.org; auth=none
- References: <alpine.LSU.2.20.1701212215080.3033@anthias.pfeifer.com> <20170123143759.GC3093@redhat.com> <alpine.LSU.2.20.1702052152180.2253@anthias.pfeifer.com> <20170205213848.GI3093@redhat.com>
On 05/02/17 21:38 +0000, Jonathan Wakely wrote:
On 05/02/17 22:01 +0100, Gerald Pfeifer wrote:
The patch below is my first attempt at removing these three outdated
copies and the machinery around them.
There is just one catch: doc/xml/manual/intro.xml has 132 links to
../ext/lwg-defects.html#2442 (and other anchors).
I could just replace this with the upstream link all those times, but
am wondering whether there is a more elegant way using SGML/Docbook
that you could help with?
We could define an entity for the URL, e.g. (I'm not sure if this is
the right DOCTYPE)
--- a/libstdc++-v3/doc/xml/manual/intro.xml
+++ b/libstdc++-v3/doc/xml/manual/intro.xml
@@ -1,3 +1,10 @@
+<?xml version='1.0'?>
+<!DOCTYPE book PUBLIC "-//OASIS//DTD DocBook V5.0//EN"
+ "http://www.oasis-open.org/docbook/xml/5.0/docbook.dtd"
+ [ <!ENTITY DR "http://cplusplus.github.io/LWG/lwg-defects.html">
+ ]
+>
+
<part xmlns="http://docbook.org/ns/docbook" version="5.0" xml:id="manual.intro" xreflabel="Introduction">
<?dbhtml filename="intro.html"?>
@@ -232,7 +239,7 @@ requirements of the license of GCC.
</para>
<variablelist>
- <varlistentry><term><link xmlns:xlink="http://www.w3.org/1999/xlink" xlink:href="../ext/lwg-defects.html#5">5</link>:
+ <varlistentry><term><link xmlns:xlink="http://www.w3.org/1999/xlink" xlink:href="&DR;#5">5</link>:
<emphasis>string::compare specification questionable</emphasis>
</term>
<listitem><para>This should be two overloaded functions rather than a single function.
Ah, we don't need to use a DTD with the DOCTYPE, so this is simpler
(and uses the right URL):
--- a/libstdc++-v3/doc/xml/manual/intro.xml
+++ b/libstdc++-v3/doc/xml/manual/intro.xml
@@ -1,3 +1,8 @@
+<?xml version='1.0'?>
+<!DOCTYPE book [
+ <!ENTITY DR "http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-defects.html">
+] >
+
<part xmlns="http://docbook.org/ns/docbook" version="5.0" xml:id="manual.intro" xreflabel="Introduction">
<?dbhtml filename="intro.html"?>
@@ -232,7 +237,7 @@ requirements of the license of GCC.
</para>
<variablelist>
- <varlistentry><term><link xmlns:xlink="http://www.w3.org/1999/xlink" xlink:href="../ext/lwg-defects.html#5">5</link>:
+ <varlistentry><term><link xmlns:xlink="http://www.w3.org/1999/xlink" xlink:href="&DR;#5">5</link>:
<emphasis>string::compare specification questionable</emphasis>
</term>
<listitem><para>This should be two overloaded functions rather than a single function.