[oXygen-user] HTML5 transformation

Peter West
Tue Aug 5 04:23:00 CDT 2014


I'm transforming EPUB2 files to xhtml5 for EPUB3.

Here's the beginning of one of the EPUB2 files.
<?xml version='1.0' encoding='utf-8'?>
<html xmlns="http://www.w3.org/1999/xhtml">
 <head>
   <title>Personal Knowledge: Towards a Post-Critical Philosophy</title>
   <meta content="http://www.w3.org/1999/xhtml; charset=utf-8" http-equiv="Content-Type" />
	...
 </head>

My xsl file has, inter alia, this:

   <xsl:output method="xhtml" html-version="5"/>

When I do the transform, I get html5 output, including the meta element, like so:

<?xml version="1.0" encoding="UTF-8"?><!DOCTYPE html>
<html xmlns="http://www.w3.org/1999/xhtml" xmlns:epub="http://www.idpf.org/2007/ops">
  <head>
     <meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
     <title>Personal Knowledge: Towards a Post-Critical Philosophy</title>
	...
  </head>

Oxygen and Jing do not like
 http-equiv="Content-Type"

Uh-uh, no way.  They want Default-Style or Refresh, and nothing else will do.  I went through every contortion I could think of to recast teh meta element, to no avail.  I could generate a second meta element, but I could not get rid of the original meta.  I was as though that meta was hard coded into the html5 transformer.

So I have two questions.

Is it possible to circumvent the copy of the existing head subelements, including meta?
Why is the xslt so stubborn about http-equiv="Content-Type", when the validation rejects it for html5?

Peter West

"...the kingdom of heaven is like a merchant in search of fine pearls, who, finding one pearl of great value, sold all that he had and bought it."

Peter West

"...the kingdom of heaven is like a merchant in search of fine pearls, who, finding one pearl of great value, sold all that he had and bought it."



More information about the oXygen-user mailing list