5 int main (string
[] args
) {
6 foreach (string fname
; args
[1..$]) {
7 import std
.file
: readText
;
8 auto doc
= new Document(readText(fname
));
9 auto obj
= doc
.querySelector("object[id]");
12 auto id
= to
!uint(obj
.getAttribute("id"));
13 if (auto pname
= id
in idmap
) {
15 writeln("DUPLICATE ID ", id
, " for object '", fname
, "' (previous: '", *pname
, "'");
23 import std
.algorithm
: sort
;
26 foreach (uint id
; idmap
.byKey
) ids
~= id
;
28 //foreach (uint id; ids) writeln(id);
29 writeln("minimal: ", ids
[0]);
30 writeln("maximal: ", ids
[$-1]);