Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

invalid noc.tcx > dtb:uid problem #28

Open
c0ze opened this issue Mar 30, 2013 · 1 comment
Open

invalid noc.tcx > dtb:uid problem #28

c0ze opened this issue Mar 30, 2013 · 1 comment

Comments

@c0ze
Copy link

c0ze commented Mar 30, 2013

I get dtb:uid like

<meta name="dtb:uid" content="{:value=&gt;&quot;12351bc0-7b50-0130-0e74-10bf4888f82f&quot;, :scheme=&gt;&quot;uuid&quot;, :id=&gt;&quot;http://c.learncodethehardway.org/book/&quot;}"/>

in toc.ncx

coze@cb-gene:~/ruby/eeepub/epubcheck-3.0/lcthw$ java -jar ../epubcheck-3.0.jar LearnCTheHardWay.epub 
Epubcheck Version 3.0

Validating against EPUB version 2.0
ERROR: LearnCTheHardWay.epub/content.opf(2,120): value of attribute "unique-identifier" is invalid; must be an XML name without colons

my code is something like this :

title = 'Learn C The Hard Way'
author = 'Zed. A. Shaw'
publisher = 'http://c.learncodethehardway.org'
date = '2010-05-06'
url = 'http://c.learncodethehardway.org/book/'
uid = UUID.generate

epub = EeePub.make do
  title       title
  creator     author
  publisher   publisher
  date        date
  identifier  uid , :scheme => 'uid'
  uid         uid

  files dic.map{|el| "#{dir}/#{el[:url]}"}
  nav dic.map{|el| {content: "#{el[:url]}", label: el[:name]}}

end
epub.save("#{title}.epub")

(I parse the html in between)
seems like toc initializer is using the whole hash for uid where it should only use :value .

@gioele
Copy link

gioele commented Mar 30, 2013

This is a dupe of issue #27. See the issue and the attached pull request.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants