LinuxQuestions.org
Visit Jeremy's Blog.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Non-*NIX Forums > Programming
User Name
Password
Programming This forum is for all programming questions.
The question does not have to be directly related to Linux and any language is fair game.

Notices


Reply
  Search this Thread
Old 04-16-2017, 05:04 AM   #1
Xeratul
Senior Member
 
Registered: Jun 2006
Location: UNIX
Distribution: FreeBSD
Posts: 2,657

Rep: Reputation: 255Reputation: 255Reputation: 255
Can an EPUB be used with HTML instead of XHTML ?


Hello,

The ePub standard requires xhtml 1.1 per the specification.


XHTML 1.1 starts the chapter.xhtml page to define the type with:

Code:
<?xml version="1.0" encoding="UTF-8"?>

<!DOCTYPE html 
PUBLIC "-//W3C//DTD XHTML 1.1//EN"
"http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">

<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en">

In the OPF file, the extension which matches the MIME type is being given:
Code:
.xhtml is for application/xhtml+xml documents
.html is for text/html documents
For instance, ePub3 requires .xhtml!!

It is strongly suggested that you use the .xhtml extension for all EPUB content documents. Browsers will not interpret HTML content as application/xhtml+xml without that extension.

Despite that it is impossible to use HTML into an EPUB, can we in future get EPUB be used with HTML with or instead of XHTML ?
 
Old 04-16-2017, 05:14 AM   #2
Xeratul
Senior Member
 
Registered: Jun 2006
Location: UNIX
Distribution: FreeBSD
Posts: 2,657

Original Poster
Rep: Reputation: 255Reputation: 255Reputation: 255
here I have managed to create a hack of epub copying HTML page and adding it into xhtml (from a gutenberg html, i.e. xhtml).
https://ufile.io/3rz5e

Maybe there is a way simpler to do so?
 
Old 04-16-2017, 10:12 PM   #3
sundialsvcs
LQ Guru
 
Registered: Feb 2004
Location: SE Tennessee, USA
Distribution: Gentoo, LFS
Posts: 10,659
Blog Entries: 4

Rep: Reputation: 3941Reputation: 3941Reputation: 3941Reputation: 3941Reputation: 3941Reputation: 3941Reputation: 3941Reputation: 3941Reputation: 3941Reputation: 3941Reputation: 3941
Generally, XHTML is upward-compatible with HTML but more precise. You should specify XHTML in order to have maximum control over what any particular device will do with the content. (Don't forget the original black-and-white Amazon Kindles: they're still out there.)
 
Old 04-16-2017, 11:58 PM   #4
dugan
LQ Guru
 
Registered: Nov 2003
Location: Canada
Distribution: distro hopper
Posts: 11,225

Rep: Reputation: 5320Reputation: 5320Reputation: 5320Reputation: 5320Reputation: 5320Reputation: 5320Reputation: 5320Reputation: 5320Reputation: 5320Reputation: 5320Reputation: 5320
Quote:
Originally Posted by sundialsvcs View Post
Generally, XHTML is upward-compatible with HTML but more precise. You should specify XHTML in order to have maximum control over what any particular device will do with the content. (Don't forget the original black-and-white Amazon Kindles: they're still out there.)
Kindles don't read EPUB anyway.

Last edited by dugan; 04-17-2017 at 12:07 AM.
 
Old 04-17-2017, 01:07 AM   #5
Xeratul
Senior Member
 
Registered: Jun 2006
Location: UNIX
Distribution: FreeBSD
Posts: 2,657

Original Poster
Rep: Reputation: 255Reputation: 255Reputation: 255
Quote:
Originally Posted by dugan View Post
Kindles don't read EPUB anyway.
and the otherway around too. Non Kindles do not understand Kindle format. Try gutenberg.org with kindles, good luck.

It is a flame war kindle vs epub Anyhow, those are "proprietary" formats.

Could GNU make some a format for epub neutral and clean. Even if GNU would make one, it will never be used by proprietary, eager, money-driven giant informatics corporation (e.g. amazon).
 
Old 04-17-2017, 01:10 AM   #6
dugan
LQ Guru
 
Registered: Nov 2003
Location: Canada
Distribution: distro hopper
Posts: 11,225

Rep: Reputation: 5320Reputation: 5320Reputation: 5320Reputation: 5320Reputation: 5320Reputation: 5320Reputation: 5320Reputation: 5320Reputation: 5320Reputation: 5320Reputation: 5320
Quote:
Originally Posted by Xeratul View Post
Try gutenberg.org with kindles, good luck.
Gutenberg provides their documents in Epub, Kindle, and other formats. Not sure where the luck comes in.
 
Old 04-17-2017, 01:13 AM   #7
Xeratul
Senior Member
 
Registered: Jun 2006
Location: UNIX
Distribution: FreeBSD
Posts: 2,657

Original Poster
Rep: Reputation: 255Reputation: 255Reputation: 255
Quote:
Originally Posted by dugan View Post
Gutenberg provides their documents in Epub, Kindle, and other formats. Not sure where the luck comes in.
My pocketbook reads well the epubs, but surprise, the kindles aren't working at all.
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Relations and Functionalities among HTML, HTML5, XHTML and XML NoWeDoR Programming 5 08-14-2016 06:05 AM
LXer: W3C 'clarifies' HTML 5 v XHTML LXer Syndicated Linux News 0 05-16-2008 11:30 PM
Using tables for layout in HTML and XHTML: yes or no? ayteebee Programming 2 09-10-2006 05:30 AM
LXer: Rescue terrible HTML with TagSoup XHTML LXer Syndicated Linux News 0 05-23-2006 11:03 AM
HTML to XHTML conversion rjlee Linux - Software 3 01-10-2005 07:27 AM

LinuxQuestions.org > Forums > Non-*NIX Forums > Programming

All times are GMT -5. The time now is 10:58 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration