本文共 3938 字,大约阅读时间需要 13 分钟。
OPF文档是epub电子书的核心文件,且是一个标准的XML文件,依据OPF规范,主要由五个部分组成:
1、<metadata>,元数据信息,由两个子元素组成:
2、<menifest>,文件列表,由于列出OEBPS文档及相关的文档,有一个子元素构成,
3、<spine toc="ncx">,脊骨,其主要功能是提供书籍的线性阅读次序。由一个子元素构成:
4、<guide>,指南,依次列出电子书的特定页面, 例如封面、目录、序言等, 属性值指向文件保存地址。一般情况下,epub电子书可以不用该元素。
5、<tour>,导读。可以根据不同的读者水平或者阅读目的, 按一定次序, 选择电子书中的部分页面组成导读。一般情况下,epub电子书可以不用该元素。
content.opf实例
<?xml version= "1.0" encoding= "utf-8" ?> <!DOCTYPE package PUBLIC "+//ISBN 978-7-308-05831-5//DTD OEB 1.2 Package//EN" "http://openebook.org/dtds/oeb-1.2/oebpkg12.dtd" > <package unique-identifier= "bookid" xmlns:opf= "http://www.idpf.org/2007/opf" xmlns= "http://www.idpf.org/2007/opf" version= "2.0" > <metadata> <dc-metadata xmlns:dc= "http://purl.org/dc/elements/1.1/" xmlns:dcterms= "http://purl.org/dc/terms/" xmlns:xsi= "http://www.w3.org/2001/XMLSchema-instance" > <dc:title>数字档案馆理论与技术研究</dc:title> <dc:creator>金更达</dc:creator> <dc:subject>数字档案馆</dc:subject> <dc:subject>电子文件管理</dc:subject> <dc:subject>元数据</dc:subject> <dc:subject>数字化</dc:subject> <dc:subject>档案化</dc:subject> <dc:description>当……<dc:description> <dc:publisher>机械工业出版社</dc:publisher> <dc:contributor/> <dc:date>2007-09</dc:date> <dc:type>普通图书</dc:type> <dc:format>Text/html(.html,.htm)</dc:format> <dc:identifier id= "bookid" opf:scheme= "ISBN" >isbn:978-7-111-04961-6</dc:identifier> <dc:source/> <dc:language>chi</dc:language> <dc:relation/> <dc:coverage/> <dc:rights>机械工业出版社版权所有</dc:rights> </dc-metadata> <x-metadata/> </metadata> <manifest> <item id= "ncx" href= "toc.ncx" media-type= "application/x-dtbncx+xml" /> <item id= "style" href= "style.css" media-type= "text/css" /> <item id= "cover" href= "cover.htm" media-type= "text/html" /> <item id= "tableofc" href= "toc.xhtml" media-type= "application/xhtml+xml" /> <item id= "forword" href= "forword.xhtml" media-type= "application/xhtml+xml" /> <item id= "chap01" href= "chap01.xhtml" media-type= "application/xhtml+xml" /> <item id= "chap02" href= "chap02.xhtml" media-type= "application/xhtml+xml" /> <item id= "chap03" href= "chap03.xhtml" media-type= "application/xhtml+xml" /> <item id= "chap04" href= "chap04.xhtml" media-type= "application/xhtml+xml" /> <item id= "chap05" href= "chap05.xhtml" media-type= "application/xhtml+xml" /> <item id= "chap06" href= "chap06.xhtml" media-type= "application/xhtml+xml" /> <item id= "chap07" href= "chap07.xhtml" media-type= "application/xhtml+xml" /> <item id= "chap08" href= "chap08.xhtml" media-type= "application/xhtml+xml" /> <item id= "chap09" href= "chap09.xhtml" media-type= "application/xhtml+xml" /> <item id= "chap10" href= "chap10.xhtml" media-type= "application/xhtml+xml" /> <item id= "reference" href= "reference.xhtml" media-type= "application/xhtml+xml" /> </manifest> <spine toc= "ncx" > <itemref idref= "cover" /> <itemref idref= "tableofc" /> <itemref idref= "forword" /> <itemref idref= "chap01" /> <itemref idref= "chap02" /> <itemref idref= "chap03" /> <itemref idref= "chap04" /> <itemref idref= "chap05" /> <itemref idref= "chap06" /> <itemref idref= "chap07" /> <itemref idref= "chap08" /> <itemref idref= "chap09" /> <itemref idref= "chap10" /> <itemref idref= "reference" /> </spine> <guide/> </package> |
本文转自Work Hard Work Smart博客园博客,原文链接:http://www.cnblogs.com/linlf03/archive/2011/12/13/2285983.html,如需转载请自行联系原作者