]> sourceware.org Git - newlib-cygwin.git/commitdiff
Fix warning about duplicate id in docbook XML
authorJon Turney <jon.turney@dronecode.org.uk>
Mon, 2 May 2022 12:55:16 +0000 (13:55 +0100)
committerJeff Johnston <jjohnstn@redhat.com>
Wed, 4 May 2022 21:06:07 +0000 (17:06 -0400)
../newlib/libc/libc.xml:22242: element refentry: validity error : ID iconv already defined
    <refentry id="iconv">

Use a separate namespace for chaper ids, to avoid collision between the
ids for the chapter and function 'iconv', now that iconv documentation
is generated unconditionally.

newlib/doc/chapter-texi2docbook.py

index 1a78030917d565a5c744ac153ddebd6cc48399f0..834a14e7cdf8fef72b8fc77197ee818715a9d6a9 100755 (executable)
@@ -29,7 +29,7 @@ def main():
             l = l.strip()
             l = l.lower()
             if first_node:
-                print ('<chapter id="%s" xmlns:xi="http://www.w3.org/2001/XInclude">' % l.replace(' ', '_'))
+                print ('<chapter id="%s_chapter" xmlns:xi="http://www.w3.org/2001/XInclude">' % l.replace(' ', '_'))
                 first_node = False
         elif l.startswith("@chapter "):
             l = l.replace("@chapter ", "", 1)
This page took 0.030705 seconds and 5 git commands to generate.