<html>
  <head>
    <meta content="text/html; charset=windows-1252"
      http-equiv="Content-Type">
  </head>
  <body bgcolor="#FFFFFF" text="#000000">
    Hello Peter,<br>
    <br>
    Oxygen uses the Epubcheck schemas for validating EPUB3/(X)HTML5.<br>
    Unfortunately this is a case of the HTML5 specification changing and
    the schemas not keeping up with the change.<br>
    The old HTML5 specs specifically forbid using
    http-equiv="content-type" in XML documents, while the new specs
    allow it.<br>
    <br>
    <br>
    Regarding the 'Encoding declaration state
    (http-equiv="content-type")' the W3C Candidate Recommendation from
    17 December 2012 said:<br>
<a class="moz-txt-link-freetext" href="http://www.w3.org/TR/2012/CR-html5-20121217/document-metadata.html#attr-meta-http-equiv-content-type">http://www.w3.org/TR/2012/CR-html5-20121217/document-metadata.html#attr-meta-http-equiv-content-type</a><br>
    <blockquote type="cite">The Encoding declaration state may be used
      in HTML documents, but elements with an http-equiv attribute in
      that state <b>must not be used in XML documents.</b></blockquote>
    However, since the 2013 CR and also in the current W3C Candidate
    Recommendation this has changed:<br>
<a class="moz-txt-link-freetext" href="http://www.w3.org/TR/2013/CR-html5-20130806/document-metadata.html#attr-meta-http-equiv-content-type">http://www.w3.org/TR/2013/CR-html5-20130806/document-metadata.html#attr-meta-http-equiv-content-type</a><br>
    <blockquote type="cite">The encoding declaration state <b>may be
        used in HTML documents and in XML Documents.</b> If the encoding
      declaration state is used in XML Documents, the name of the
      character encoding must be an ASCII case-insensitive match for the
      string "UTF-8" (and the document is therefore forced to use UTF-8
      as its encoding).</blockquote>
    <br>
    This is currently logged as a bug for the Epubcheck validator:<br>
    content-type value should be allowed for http-equiv attribute of
    meta tag<br>
    <a class="moz-txt-link-freetext" href="https://code.google.com/p/epubcheck/issues/detail?id=135">https://code.google.com/p/epubcheck/issues/detail?id=135</a><br>
    <br>
    <br>
    To keep a long story short(er), the simplest solution for this
    problem is to patch the schema to accept 'http-equiv="Content-Type"'
    (which is allowed  as per the latest HTML 5 specification). See the
    attached RNC schema file which patches this.<br>
    To apply this patch, save the 'html5-document-30.rnc' file locally
    and copy it to your Oxygen installation folder in:<br>
    Oxygen/frameworks/xhtml/xhtml5 (epub3)/mod/html5<br>
    Replace the existing file when prompted to. Depending on the
    location where Oxygen is installed you may need admin access to
    perform this operation.<br>
    <br>
    To answer your questions:<br>
    <blockquote type="cite">Is it possible to circumvent the copy of the
      existing head subelements, including meta?</blockquote>
    No, not without changing the output method to "xml". The meta is
    actually not a copy of the original, when you specify<br>
    &lt;xsl:output method="xhtml"/&gt;, Saxon serializes that meta in
    the output.<br>
    <br>
    <blockquote type="cite">
      Why is the xslt so stubborn about http-equiv="Content-Type", when
      the validation rejects it for html5?</blockquote>
    It's not its fault, really, it's the validation that shouldn't
    reject it.<br>
    <br>
    Let us know if you need additional assistance.<br>
    <br>
    Regards,<br>
    Adrian<br>
    <pre class="moz-signature" cols="72">Adrian Buza
oXygen XML Editor and Author Support

Tel: +1-650-352-1250 ext.2020
Fax: +40-251-461482
<a class="moz-txt-link-abbreviated" href="mailto:support@oxygenxml.com">support@oxygenxml.com</a>
<a class="moz-txt-link-freetext" href="http://www.oxygenxml.com">http://www.oxygenxml.com</a></pre>
    <br>
    <div class="moz-cite-prefix">On 05.08.2014 12:23, Peter West wrote:<br>
    </div>
    <blockquote
      cite="mid:5625C7D6-1F29-483B-8AF0-179506B053B7@pbw.id.au"
      type="cite">
      <pre wrap="">I'm transforming EPUB2 files to xhtml5 for EPUB3.

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

My xsl file has, inter alia, this:

   &lt;xsl:output method="xhtml" html-version="5"/&gt;

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

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

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."

_______________________________________________
oXygen-user mailing list
<a class="moz-txt-link-abbreviated" href="mailto:oXygen-user@oxygenxml.com">oXygen-user@oxygenxml.com</a>
<a class="moz-txt-link-freetext" href="http://www.oxygenxml.com/mailman/listinfo/oxygen-user">http://www.oxygenxml.com/mailman/listinfo/oxygen-user</a>

</pre>
    </blockquote>
    <br>
  </body>
</html>