private void MakeSpine(XNamespace opf, XElement rootElt, string manifestPath)
{
// Generate the spine, which indicates the top-level readable content in order.
// These IDs must match the corresponding ones in the manifest, since the spine
// doesn't indicate where to actually find the content.
var spineElt = new XElement(opf + "spine");
rootElt.Add(spineElt);
foreach (var item in _spineItems)
{
var itemElt = new XElement(opf + "itemref",
new XAttribute("idref", GetIdOfFile(item)));
spineElt.Add(itemElt);
}
using (var writer = XmlWriter.Create(manifestPath))
rootElt.WriteTo(writer);
}