parse static method
Implementation
static Spine parse(
XmlNode element, Map<String, String> prefixMap, double epubVersion) {
List<Itemref> itemrefs = element
.findElements("itemref", namespace: Namespaces.opf)
.mapNotNull((it) => Itemref.parse(it, prefixMap))
.toList();
ReadingProgression pageProgressionDirection;
switch (element.getAttribute("page-progression-direction")) {
case "rtl":
pageProgressionDirection = ReadingProgression.rtl;
break;
case "ltr":
pageProgressionDirection = ReadingProgression.ltr;
break;
default:
pageProgressionDirection = ReadingProgression.auto; // null or "default"
}
String? ncx = (epubVersion >= 3.0) ? element.getAttribute("toc") : null;
return Spine(itemrefs, pageProgressionDirection, ncx);
}