[v2,3/5] Fix target element validity error in features/gdb-target.dtd

Message ID 20260826212209.925066-4-tdevries@suse.de
State New
Headers
Series xml linting |

Checks

Context Check Description
linaro-tcwg-bot/tcwg_gdb_build--master-arm fail Patch failed to apply
linaro-tcwg-bot/tcwg_gdb_build--master-aarch64 fail Patch failed to apply

Commit Message

Tom de Vries Aug. 26, 2026, 9:22 p.m. UTC
  When running xmllint with --valid, I got:
...
gdb/features/rs6000/powerpc-405.xml:9: element target: validity error : \
  No declaration for attribute xmlns:xi of element target
<target xmlns:xi="http://www.w3.org/2001/XInclude">
                                                  ^
...

Fix this by updating features/gdb-target.dtd.

Note that this is not a regression since "Fix xmllint namespace errors".

Before that patch, we have a slightly different error:
...
gdb/features/rs6000/powerpc-405.xml:58: element target: validity error : \
  Element target content does not follow the DTD, \
  expecting (architecture? , osabi? , compatible* , feature*), \
  got (xi:include xi:include feature )
</target>
...

This patch fixes both variants.
---
 gdb/features/gdb-target.dtd | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)
  

Patch

diff --git a/gdb/features/gdb-target.dtd b/gdb/features/gdb-target.dtd
index 2c405af8add..d1efbad16a5 100644
--- a/gdb/features/gdb-target.dtd
+++ b/gdb/features/gdb-target.dtd
@@ -9,10 +9,10 @@ 
 <!-- The osabi and compatible elements were added post GDB 6.8.  The version
      wasn't bumped, since older GDBs silently ignore unknown elements.  -->
 
-<!ELEMENT target	(architecture?, osabi?, compatible*, feature*)>
+<!ELEMENT target	(architecture?, osabi?, compatible*, xi:include*, feature*)>
 <!ATTLIST target
-	version		CDATA	#FIXED "1.0">
-
+	version		CDATA	#FIXED "1.0"
+	xmlns:xi	CDATA   #FIXED "http://www.w3.org/2001/XInclude">
 <!ELEMENT architecture	(#PCDATA)>
 
 <!ELEMENT osabi	(#PCDATA)>