--- a/uffi/ref_aggregate.xml
+++ b/uffi/ref_aggregate.xml
@@ -1,6 +1,10 @@
-<?xml version="1.0" encoding="utf-8"?><!DOCTYPE book PUBLIC "-//OASIS//DTD DocBook XML V4.4//EN" "http://www.oasis-open.org/docbook/xml/4.4/docbookx.dtd">
-<book lang="en">
- <reference id="uffi.aggregates">
+<?xml version="1.0" encoding="utf-8"?>
+<!DOCTYPE book [
+<!ENTITY % eclent SYSTEM "../ecl.ent">
+%eclent;
+]>
+<book xmlns="http://docbook.org/ns/docbook" version="5.0" xml:lang="en">
+ <reference xml:id="uffi.aggregates">
   <title>Aggregate Types</title>
   <partintro>
    <title>Overview</title>
@@ -9,7 +13,7 @@
    </para>
   </partintro>
 
-  <refentry id="uffi.def-enum">
+  <refentry xml:id="uffi.def-enum">
    <refnamediv>
     <refname><function>def-enum</function></refname>
     <refpurpose>Defines a &C; enumeration.
@@ -89,7 +93,7 @@
   </refentry>
 
 
-  <refentry id="uffi.def-struct">
+  <refentry xml:id="uffi.def-struct">
    <refnamediv>
     <refname><function>def-struct</function></refname>
     <refpurpose>Defines a &C; structure.
@@ -153,7 +157,7 @@
   </refentry>
 
 
-  <refentry id="uffi.get-slot-value">
+  <refentry xml:id="uffi.get-slot-value">
    <refnamediv>
     <refname><function>get-slot-value</function></refname>
     <refpurpose>Retrieves a value from a slot of a structure.
@@ -226,7 +230,7 @@
    </refsect1>
   </refentry>
 
-  <refentry id="uffi.get-slot-pointer">
+  <refentry xml:id="uffi.get-slot-pointer">
    <refnamediv>
     <refname><function>get-slot-pointer</function></refname>
     <refpurpose>Retrieves a pointer from a slot of a structure.
@@ -299,7 +303,7 @@
   </refentry>
 
 
-  <refentry id="uffi.def-array-pointer">
+  <refentry xml:id="uffi.def-array-pointer">
    <refnamediv>
     <refname><function>def-array-pointer</function></refname>
     <refpurpose>Defines a pointer to a array of type.
@@ -357,7 +361,7 @@
   </refentry>
 
 
-  <refentry id="uffi.deref-array">
+  <refentry xml:id="uffi.deref-array">
    <refnamediv>
     <refname><function>deref-array</function></refname>
     <refpurpose>Deference an array.
@@ -442,7 +446,7 @@
    </refsect1>
   </refentry>
 
-  <refentry id="uffi.def-union">
+  <refentry xml:id="uffi.def-union">
    <refnamediv>
     <refname><function>def-union</function></refname>
     <refpurpose>Defines a foreign union type.