Register Guidelines E-Books Today's Posts Search

Go Back   MobileRead Forums > E-Book Software > Calibre > Editor

Notices

Reply
 
Thread Tools Search this Thread
Old 07-05-2022, 09:47 PM   #1
Karellen
Wizard
Karellen ought to be getting tired of karma fortunes by now.Karellen ought to be getting tired of karma fortunes by now.Karellen ought to be getting tired of karma fortunes by now.Karellen ought to be getting tired of karma fortunes by now.Karellen ought to be getting tired of karma fortunes by now.Karellen ought to be getting tired of karma fortunes by now.Karellen ought to be getting tired of karma fortunes by now.Karellen ought to be getting tired of karma fortunes by now.Karellen ought to be getting tired of karma fortunes by now.Karellen ought to be getting tired of karma fortunes by now.Karellen ought to be getting tired of karma fortunes by now.
 
Karellen's Avatar
 
Posts: 1,157
Karma: 4917718
Join Date: Sep 2021
Location: Australia
Device: Kobo Libra 2
xmlns:epub=""

When creating a new xhtml page in a epub v3.0 file, the following code is automatically added to the page...

PHP Code:
<?xml version='1.0' encoding='utf-8'?>
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
  <title>The Third Option</title>
  <link type="text/css" rel="stylesheet" href="OEBPS/Styles/stylesheet.css"/>
</head>

<body>
    
</body>
</html>
Is it possible to modify this so that it also automatically adds the following to the <html> tag...

PHP Code:
xmlns:epub="http://www.idpf.org/2007/ops" 
Thank you
Karellen is online now   Reply With Quote
Old 07-05-2022, 10:07 PM   #2
kovidgoyal
creator of calibre
kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.
 
kovidgoyal's Avatar
 
Posts: 43,980
Karma: 22669822
Join Date: Oct 2006
Location: Mumbai, India
Device: Various
You shouldnt need to use the epub namesapce, the bright bulbs over at the epub spec committee realized namespaces are poison and replaced most of them with the role HTML attribute. What do you intend to use epub: for?
kovidgoyal is offline   Reply With Quote
Old 07-05-2022, 10:38 PM   #3
Karellen
Wizard
Karellen ought to be getting tired of karma fortunes by now.Karellen ought to be getting tired of karma fortunes by now.Karellen ought to be getting tired of karma fortunes by now.Karellen ought to be getting tired of karma fortunes by now.Karellen ought to be getting tired of karma fortunes by now.Karellen ought to be getting tired of karma fortunes by now.Karellen ought to be getting tired of karma fortunes by now.Karellen ought to be getting tired of karma fortunes by now.Karellen ought to be getting tired of karma fortunes by now.Karellen ought to be getting tired of karma fortunes by now.Karellen ought to be getting tired of karma fortunes by now.
 
Karellen's Avatar
 
Posts: 1,157
Karma: 4917718
Join Date: Sep 2021
Location: Australia
Device: Kobo Libra 2
Hi @kovidgoyal,

I am just starting to dive into the use of the epub:type attribute as I wanted to learn a bit more about it and its use, using this as a reference... https://www.w3.org/TR/epub-ssv/#sec-partitions

If I add one of these attributes, like <body epub:type="chapter">, and I don't add the namespace, then EPUBCheck gives the following error...

Code:
p01c21.xhtml ERROR(RSC-005): Error while parsing file: The prefix "epub" for attribute "epub:type" associated with an element type "body" is not bound.
So I need to add the namespace.

I initially started looking into this to experiment with the newer footnotes method of using the <aside> tag, but it does not seem to work on the Libra2, but thought I would continue learning about the attributes anyway.

Are you saying that the epub:type= attribute is not required/needed in epub v3?
Karellen is online now   Reply With Quote
Old 07-05-2022, 11:09 PM   #4
kovidgoyal
creator of calibre
kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.
 
kovidgoyal's Avatar
 
Posts: 43,980
Karma: 22669822
Join Date: Oct 2006
Location: Mumbai, India
Device: Various
Yes, it's not required. You can just use role instead, a bit of googling should find you the information for the role values.
kovidgoyal is offline   Reply With Quote
Old 07-05-2022, 11:32 PM   #5
Karellen
Wizard
Karellen ought to be getting tired of karma fortunes by now.Karellen ought to be getting tired of karma fortunes by now.Karellen ought to be getting tired of karma fortunes by now.Karellen ought to be getting tired of karma fortunes by now.Karellen ought to be getting tired of karma fortunes by now.Karellen ought to be getting tired of karma fortunes by now.Karellen ought to be getting tired of karma fortunes by now.Karellen ought to be getting tired of karma fortunes by now.Karellen ought to be getting tired of karma fortunes by now.Karellen ought to be getting tired of karma fortunes by now.Karellen ought to be getting tired of karma fortunes by now.
 
Karellen's Avatar
 
Posts: 1,157
Karma: 4917718
Join Date: Sep 2021
Location: Australia
Device: Kobo Libra 2
Quote:
Originally Posted by kovidgoyal View Post
Yes, it's not required. You can just use role instead, a bit of googling should find you the information for the role values.
Oh, bugger. There's a few hours of wasted time and effort. Now to forget what I have learnt and start again on a different system.

Is it the Aria-Roles that I should be using?... https://www.w3.org/TR/wai-aria-1.0/roles

And it looks like a namespace is not needed as you stated.

What are your thoughts - is it worth going to the effort of adding the roles attributes throughout ebooks? Wondering if it is a waste of time for no foreseeable benefit.
Karellen is online now   Reply With Quote
Old 07-06-2022, 01:15 AM   #6
kovidgoyal
creator of calibre
kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.
 
kovidgoyal's Avatar
 
Posts: 43,980
Karma: 22669822
Join Date: Oct 2006
Location: Mumbai, India
Device: Various
ARIA roles are mostly useful for screen readers. How useful you find that depends on if you expect your work to be read using screen readers. As far as non-screen reader uses are concerned, the only useful one in my experience is the one for footnotes, since many viewers including the calibre one use this to make popup footnotes more robust.
kovidgoyal is offline   Reply With Quote
Old 07-06-2022, 02:53 AM   #7
Karellen
Wizard
Karellen ought to be getting tired of karma fortunes by now.Karellen ought to be getting tired of karma fortunes by now.Karellen ought to be getting tired of karma fortunes by now.Karellen ought to be getting tired of karma fortunes by now.Karellen ought to be getting tired of karma fortunes by now.Karellen ought to be getting tired of karma fortunes by now.Karellen ought to be getting tired of karma fortunes by now.Karellen ought to be getting tired of karma fortunes by now.Karellen ought to be getting tired of karma fortunes by now.Karellen ought to be getting tired of karma fortunes by now.Karellen ought to be getting tired of karma fortunes by now.
 
Karellen's Avatar
 
Posts: 1,157
Karma: 4917718
Join Date: Sep 2021
Location: Australia
Device: Kobo Libra 2
Thank you @kovidgoyal
Karellen is online now   Reply With Quote
Reply

Tags
epub 3, xmlns


Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Calibre-generated epub (from .docx) gives "e21027" "multiple opf files" on KindleGen GhostRider Conversion 0 12-22-2017 09:06 AM
Bugs "Sanity Check epub" and "Failed Release date" on V 0.91 qkiazd Sigil 5 12-03-2015 04:01 AM
Recipe for EPUB subscribers of "Tagesspiegel" and "Handelsblatt"? F.W. Recipes 0 05-14-2013 11:16 AM
epub "padding left" to mobi "block quote" conversion issue 1611mac Conversion 3 01-11-2012 02:10 PM
xmlns="http://www.w3.org/1999/xhtml paulpeer Sigil 2 03-21-2010 07:57 AM


All times are GMT -4. The time now is 06:30 AM.


MobileRead.com is a privately owned, operated and funded community.