Error XML Not Well Formed - Sigil XHTML created from notepad++

603 Views Asked by At

I am quite new to the epub world.

I converted my word doc to xhtml using notepad++. I am now trying to clean up the code and use the flightcrew plugin in sigil.

I keep getting this error

Error XML not well formed : attribute name expected near column 11

Am I missing something obvious? I can't see anything wrong. I've tried deleting the dc:dc: double up but it only creates more errors

<?xml version="1.0" encoding="utf-8" ?>
<package unique-identifier="BookId" version="2.0" xmlns="http://www.idpf.org/2007/opf">
  <metadata xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:opf="http://www.idpf.org/2007/opf">
    <dc:identifier id="BookId" opf:scheme="UUID">urn:uuid:2bc70065-7d5d-481c-9e1d-338b5ed4dba6</dc:identifier>
    <dc:language opf:scheme="DCTERMS.RFC4646">en-US</dc:language>
    <dc:source>http://xml.openoffice.org/odf2xhtml</dc:source>
    <dc:creator>Briana Ellis</dc:creator>
    <dc:dc:date opf:event="publication" opf:scheme="DCTERMS.W3CDTF">2017-05-25T11:24:00</dc:dc:date>
    <dc:contributor>Briana Ellis</dc:contributor>
    <dc:dc:date opf:event="modification" opf:scheme="DCTERMS.W3CDTF">2017-05-25T11:24:00</dc:dc:date>
    <dc:subject>,</dc:subject>
  </metadata>
  <manifest>
    <item href="toc.ncx" id="ncx" media-type="application/x-dtbncx+xml"/>
    <item href="Text/Carmilla%20V3.xhtml" id="Carmilla_V3.xhtml" media-type="application/xhtml+xml"/>
  </manifest>
  <spine toc="ncx">
    <itemref idref="Carmilla_V3.xhtml"/>
  </spine>
  <guide>
  </guide>
</package>
1

There are 1 best solutions below

0
On

The error is in the two date elements. Both should only have one dc: part at the beginning of the element.

With an EPUB 2.0 file like the one in this question you would use two dc:date elements to display the publication and last modified dates:

<dc:date>2017-05-25T11:24:00Z</dc:dc:date>
<dc:date opf:event="modification">2017-05-25T11:24:00Z</dc:dc:date>

With an EPUB 3.0 file the usual method is to use dc:date for the publication date as with EPUB 2.0, but use dcterms meta elements for the modification date and time:

<dc:date>2017-05-25T11:24:00Z</dc:dc:date>
<meta property="dcterms:modified">2017-05-25T11:24:00Z</meta>

The date and time must use the ISO standard format with the UTC timezone indicated by either the letter Z (Zulu Time) or the timezone offset (e.g. +00:00:00).