That makes sense to me.
Fine.
And what about those xreflabel that already exists, what do we do with them ?
<refsec and <varlistentry are fine but <sec is not done or done poorly.
If you search without my patch with this regex you'll get only 58 occurrences.
(^\s*<sect\d\sid)(="(?=\S*)([a-zA-Z0-9_-]+))(" xreflabel=)(".+?")(>)
and see $3 and $5 parts of regex you'll get something very similar between id and xreflabel.
27 of them are the same and the others are just small replacements. None capitalized, none as separate words.
id="auth-delay" reflabel="auth_delay"
id="basic-archive" reflabel="basic_archive"
and so on
Only two of them are replaced carefully
id="standby-server-operation" reflabel="Standby Server Operation"
id="jit-configuration" reflabel="JIT Configuration"
I think these places need to be replaced carefully too.
You'll get more or less 600 occurrences on config, libpq, select, create_table and monitoring.sgml but there are always params of these specific places, so it's not a problem to reflabel be the same as its config name.
regards
Marcos