void serializePageMap(PageMapResource pageMap, OutputStream out) throws IOException {
final String pagemapns = "http://www.idpf.org/2007/opf";
XMLSerializer ser = new XMLSerializer(out);
ser.startDocument("1.0", "UTF-8");
ser.startElement(pagemapns, "page-map", null, true);
ser.newLine();
Iterator pages = this.pages.iterator();
while (pages.hasNext()) {
Page page = (Page) pages.next();
SMapImpl attrs = new SMapImpl();
attrs.put(null, "name", page.name);