Fix warning about duplicate id in docbook XML

../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.
This commit is contained in:
Jon Turney 2022-05-02 13:55:16 +01:00 committed by Jeff Johnston
parent 81b7cf09fa
commit a9d2d7baae
1 changed files with 1 additions and 1 deletions

View File

@ -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)