View Full Version : ePub Validation Error


mrbillb
09-27-2010, 07:08 PM
Epubcheck 1.0.5 returns the following error:
ERROR: xyz.epub/OEBPS/content.opf(14): unfinished element

<?xml version='1.0' encoding='utf-8'?>
<package xmlns="http://www.idpf.org/2007/opf" version="2.0" unique-identifier="uuid_id">
<opf:metadata xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:opf="http://www.idpf.org/2007/opf" xmlns:dcterms="http://purl.org/dc/terms/" xmlns:calibre="http://calibre.kovidgoyal.net/2009/metadata" xmlns:dc="http://purl.org/dc/elements/1.1/">
<dc:identifier id="uuid_id" opf:scheme="uuid">d0e369cc-33bd-4832-82bf-44f46ae30607</dc:identifier>
<dc:creator>Amaya</dc:creator>
<dc:language>en</dc:language>
<dc:title>A Visual Guide to Mastering the Digitrax Zephyr</dc:title>
</opf:metadata>
<manifest>
<item href="0-button.png" id="added26" media-type="image/png"/>
<item href="0005.png" id="added58" media-type="image/png"/>
<item href="001thrown-swbl.png" id="added107" media-type="image/png"/>
<item href="002-small.png" id="added63" media-type="image/png"/>
<item href="004.png" id="added55" media-type="image/png"/>
<item href="005thrown.png" id="added103" media-type="image/png"/>
<item href="012closed.png" id="added104" media-type="image/png"/>
<item href="012thrown.png" id="added105" media-type="image/png"/>
<item href="020closed.png" id="added109" media-type="image/png"/>
<item href="020thrown.png" id="added108" media-type="image/png"/>
<item href="03-and-function-blinking.png" id="added12" media-type="image/png"/>
<item href="03-and-function-small.png" id="added129" media-type="image/png"/>
<item href="043.png" id="added56" media-type="image/png"/>
<item href="0543.png" id="added59" media-type="image/png"/>
<item href="1-button.png" id="added27" media-type="image/png"/>
<item href="12-1.png" id="added10" media-type="image/png"/>
<item href="12-3.png" id="added11" media-type="image/png"/>
<item href="12-6.png" id="added" media-type="image/png"/>
<item href="12-flfu-flmu.png" id="added95" media-type="image/png"/>
<item href="14-1.png" id="added19" media-type="image/png"/>
<item href="14-2.png" id="added20" media-type="image/png"/>
<item href="14-3.png" id="added21" media-type="image/png"/>
<item href="14-4.png" id="added22" media-type="image/png"/>
<item href="15-1.png" id="added23" media-type="image/png"/>
<item href="15-2.png" id="added24" media-type="image/png"/>
<item href="15-3.png" id="added25" media-type="image/png"/>
<item href="16-1.png" id="added30" media-type="image/png"/>
<item href="16-2.png" id="added31" media-type="image/png"/>
<item href="16-3.png" id="added33" media-type="image/png"/>
<item href="16-4.png" id="added34" media-type="image/png"/>
<item href="17-1.png" id="added35" media-type="image/png"/>
<item href="17-2.png" id="added36" media-type="image/png"/>
<item href="17-3.png" id="added37" media-type="image/png"/>
<item href="17-4.png" id="added38" media-type="image/png"/>
<item href="17-5.png" id="added39" media-type="image/png"/>
<item href="18-1.png" id="added32" media-type="image/png"/>
<item href="18-2.png" id="added42" media-type="image/png"/>
<item href="18-3.png" id="added43" media-type="image/png"/>
<item href="19-1.png" id="added44" media-type="image/png"/>
<item href="2-button.png" id="added28" media-type="image/png"/>
<item href="20-1.png" id="added45" media-type="image/png"/>
<item href="20-2.png" id="added46" media-type="image/png"/>
<item href="25-and-flashing-mu.png" id="added94" media-type="image/png"/>
<item href="25-and-function.png" id="added15" media-type="image/png"/>
<item href="25-flashing.png" id="added13" media-type="image/png"/>
<item href="27-1.png" id="added80" media-type="image/png"/>
<item href="28-flmu.png" id="added99" media-type="image/png"/>
<item href="28-fu-mu.png" id="added98" media-type="image/png"/>
<item href="28-function.png" id="added100" media-type="image/png"/>
<item href="3-button.png" id="added29" media-type="image/png"/>
<item href="ID00.png" id="added111" media-type="image/png"/>
<item href="ProgModeLED-Off.png" id="added49" media-type="image/png"/>
<item href="ProgModeLED-On.png" id="added50" media-type="image/png"/>
<item href="a01-small.png" id="added87" media-type="image/png"/>
<item href="a02-small.png" id="added88" media-type="image/png"/>
<item href="a128-small.png" id="added89" media-type="image/png"/>
<item href="a28-small.png" id="added86" media-type="image/png"/>
<item href="ad2-small.png" id="added48" media-type="image/png"/>
<item href="ad2.png" id="added52" media-type="image/png"/>
<item href="ad4-small.png" id="added47" media-type="image/png"/>
<item href="ad4.png" id="added53" media-type="image/png"/>
<item href="apdxg-1.png" id="added116" media-type="image/png"/>
<item href="apdxg-2.png" id="added117" media-type="image/png"/>
<item href="apdxg-3.png" id="added118" media-type="image/png"/>
<item href="back-panel.png" id="added4" media-type="image/png"/>
<item href="br02.png" id="added113" media-type="image/png"/>
<item href="bumping-post.png" id="added130" media-type="image/png"/>
<item href="closed-small.png" id="added101" media-type="image/png"/>
<item href="cs-small.png" id="added6" media-type="image/png"/>
<item href="cs.png" id="added7" media-type="image/png"/>
<item href="cv29-byte.png" id="added115" media-type="image/png"/>
<item href="cv29-summary.png" id="added114" media-type="image/png"/>
<item href="d-small.png" id="added75" media-type="image/png"/>
<item href="d008-small.png" id="added128" media-type="image/png"/>
<item href="d050-small.png" id="added76" media-type="image/png"/>
<item href="d052.png" id="added74" media-type="image/png"/>
<item href="digitrax-logo.png" id="added1" media-type="image/png"/>
<item href="dir-brake-forward.png" id="added93" media-type="image/png"/>
<item href="dir-small.png" id="added126" media-type="image/png"/>
<item href="dna-small.png" id="added60" media-type="image/png"/>
<item href="dna.png" id="added125" media-type="image/png"/>
<item href="dnd-small.png" id="added57" media-type="image/png"/>
<item href="dnd.png" id="added124" media-type="image/png"/>
<item href="dnr-small.png" id="added54" media-type="image/png"/>
<item href="dnr.png" id="added123" media-type="image/png"/>
<item href="erl-small.png" id="added96" media-type="image/png"/>
<item href="erl.png" id="added97" media-type="image/png"/>
<item href="flow-chart.png" id="added79" media-type="image/png"/>
<item href="full-small.png" id="added14" media-type="image/png"/>
<item href="good-small.png" id="added119" media-type="image/png"/>
<item href="hint.png" id="added2" media-type="image/png"/>
<item href="jump-flashing.png" id="added40" media-type="image/png"/>
<item href="jump-off.png" id="added41" media-type="image/png"/>
<item href="l-loco-r-arrow-12.png" id="added91" media-type="image/png"/>
<item href="l-loco-r-arrow-28.png" id="added92" media-type="image/png"/>
<item href="loco-disp-small.png" id="added18" media-type="image/png"/>
<item href="loconet-connections-sm.png" id="added122" media-type="image/png"/>
<item href="o-small.png" id="added69" media-type="image/png"/>
<item href="o002.png" id="added68" media-type="image/png"/>
<item href="o003.png" id="added73" media-type="image/png"/>
<item href="ops-small.png" id="added77" media-type="image/png"/>
<item href="ops.png" id="added78" media-type="image/png"/>
<item href="opsw-buttons.png" id="added106" media-type="image/png"/>
<item href="p-small.png" id="added62" media-type="image/png"/>
<item href="p002.png" id="added61" media-type="image/png"/>
<item href="p003.png" id="added70" media-type="image/png"/>
<item href="page.png" id="added51" media-type="image/png"/>
<item href="power-connector-sm.png" id="added120" media-type="image/png"/>
<item href="r-loco-r-arrow-25.png" id="added90" media-type="image/png"/>
<item href="r-small.png" id="added67" media-type="image/png"/>
<item href="r002.png" id="added66" media-type="image/png"/>
<item href="r003.png" id="added72" media-type="image/png"/>
<item href="rail-connections.png" id="added121" media-type="image/png"/>
<item href="rail-icon.png" id="added17" media-type="image/png"/>
<item href="s128-function.png" id="added81" media-type="image/png"/>
<item href="s128-small.png" id="added83" media-type="image/png"/>
<item href="s14-small.png" id="added85" media-type="image/png"/>
<item href="s28-small.png" id="added82" media-type="image/png"/>
<item href="sp99.png" id="added112" media-type="image/png"/>
<item href="stlo.png" id="added16" media-type="image/png"/>
<item href="stri-small.png" id="added84" media-type="image/png"/>
<item href="t-small.png" id="added65" media-type="image/png"/>
<item href="t002.png" id="added64" media-type="image/png"/>
<item href="t003.png" id="added71" media-type="image/png"/>
<item href="t008-small.png" id="added127" media-type="image/png"/>
<item href="throttle-id.png" id="added110" media-type="image/png"/>
<item href="thrown-small.png" id="added102" media-type="image/png"/>
<item href="top-view.png" id="added5" media-type="image/png"/>
<item href="track-status-off.png" id="added9" media-type="image/png"/>
<item href="track-status-on.png" id="added8" media-type="image/png"/>
<item href="warning.png" id="added3" media-type="image/png"/>
<item href="zephyr.html" id="html" media-type="application/xhtml+xml"/>
<item href="toc.ncx" media-type="application/x-dtbncx+xml" id="ncx"/>
</manifest>
<spine toc="ncx">
<itemref idref="html"/>
</spine>
<guide/>
</package>

Does anybody recognize the error? Can you tell me how to fix it?

ATDrake
09-27-2010, 07:37 PM
Right near the bottom, you're missing a <guide> to open the </guide> you've got. Either insert the first or delete the second and you should be good to go.

mrbillb
09-27-2010, 08:02 PM
I fixed that, but I still get the same error message. Here's the file:

<?xml version='1.0' encoding='utf-8'?>
<package xmlns="http://www.idpf.org/2007/opf" version="2.0" unique-identifier="uuid_id">
<opf:metadata xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:opf="http://www.idpf.org/2007/opf" xmlns:dcterms="http://purl.org/dc/terms/" xmlns:calibre="http://calibre.kovidgoyal.net/2009/metadata" xmlns:dc="http://purl.org/dc/elements/1.1/">
<dc:identifier id="uuid_id" opf:scheme="uuid">d0e369cc-33bd-4832-82bf-44f46ae30607</dc:identifier>
<dc:creator>Amaya</dc:creator>
<dc:language>en</dc:language>
<dc:title>A Visual Guide to Mastering the Digitrax Zephyr</dc:title>
</opf:metadata>
<manifest>
<item href="0-button.png" id="added26" media-type="image/png"/>
<item href="0005.png" id="added58" media-type="image/png"/>
<item href="001thrown-swbl.png" id="added107" media-type="image/png"/>
<item href="002-small.png" id="added63" media-type="image/png"/>
<item href="004.png" id="added55" media-type="image/png"/>
<item href="005thrown.png" id="added103" media-type="image/png"/>
<item href="012closed.png" id="added104" media-type="image/png"/>
<item href="012thrown.png" id="added105" media-type="image/png"/>
<item href="020closed.png" id="added109" media-type="image/png"/>
<item href="020thrown.png" id="added108" media-type="image/png"/>
<item href="03-and-function-blinking.png" id="added12" media-type="image/png"/>
<item href="03-and-function-small.png" id="added129" media-type="image/png"/>
<item href="043.png" id="added56" media-type="image/png"/>
<item href="0543.png" id="added59" media-type="image/png"/>
<item href="1-button.png" id="added27" media-type="image/png"/>
<item href="12-1.png" id="added10" media-type="image/png"/>
<item href="12-3.png" id="added11" media-type="image/png"/>
<item href="12-6.png" id="added" media-type="image/png"/>
<item href="12-flfu-flmu.png" id="added95" media-type="image/png"/>
<item href="14-1.png" id="added19" media-type="image/png"/>
<item href="14-2.png" id="added20" media-type="image/png"/>
<item href="14-3.png" id="added21" media-type="image/png"/>
<item href="14-4.png" id="added22" media-type="image/png"/>
<item href="15-1.png" id="added23" media-type="image/png"/>
<item href="15-2.png" id="added24" media-type="image/png"/>
<item href="15-3.png" id="added25" media-type="image/png"/>
<item href="16-1.png" id="added30" media-type="image/png"/>
<item href="16-2.png" id="added31" media-type="image/png"/>
<item href="16-3.png" id="added33" media-type="image/png"/>
<item href="16-4.png" id="added34" media-type="image/png"/>
<item href="17-1.png" id="added35" media-type="image/png"/>
<item href="17-2.png" id="added36" media-type="image/png"/>
<item href="17-3.png" id="added37" media-type="image/png"/>
<item href="17-4.png" id="added38" media-type="image/png"/>
<item href="17-5.png" id="added39" media-type="image/png"/>
<item href="18-1.png" id="added32" media-type="image/png"/>
<item href="18-2.png" id="added42" media-type="image/png"/>
<item href="18-3.png" id="added43" media-type="image/png"/>
<item href="19-1.png" id="added44" media-type="image/png"/>
<item href="2-button.png" id="added28" media-type="image/png"/>
<item href="20-1.png" id="added45" media-type="image/png"/>
<item href="20-2.png" id="added46" media-type="image/png"/>
<item href="25-and-flashing-mu.png" id="added94" media-type="image/png"/>
<item href="25-and-function.png" id="added15" media-type="image/png"/>
<item href="25-flashing.png" id="added13" media-type="image/png"/>
<item href="27-1.png" id="added80" media-type="image/png"/>
<item href="28-flmu.png" id="added99" media-type="image/png"/>
<item href="28-fu-mu.png" id="added98" media-type="image/png"/>
<item href="28-function.png" id="added100" media-type="image/png"/>
<item href="3-button.png" id="added29" media-type="image/png"/>
<item href="ID00.png" id="added111" media-type="image/png"/>
<item href="ProgModeLED-Off.png" id="added49" media-type="image/png"/>
<item href="ProgModeLED-On.png" id="added50" media-type="image/png"/>
<item href="a01-small.png" id="added87" media-type="image/png"/>
<item href="a02-small.png" id="added88" media-type="image/png"/>
<item href="a128-small.png" id="added89" media-type="image/png"/>
<item href="a28-small.png" id="added86" media-type="image/png"/>
<item href="ad2-small.png" id="added48" media-type="image/png"/>
<item href="ad2.png" id="added52" media-type="image/png"/>
<item href="ad4-small.png" id="added47" media-type="image/png"/>
<item href="ad4.png" id="added53" media-type="image/png"/>
<item href="apdxg-1.png" id="added116" media-type="image/png"/>
<item href="apdxg-2.png" id="added117" media-type="image/png"/>
<item href="apdxg-3.png" id="added118" media-type="image/png"/>
<item href="back-panel.png" id="added4" media-type="image/png"/>
<item href="br02.png" id="added113" media-type="image/png"/>
<item href="bumping-post.png" id="added130" media-type="image/png"/>
<item href="closed-small.png" id="added101" media-type="image/png"/>
<item href="cs-small.png" id="added6" media-type="image/png"/>
<item href="cs.png" id="added7" media-type="image/png"/>
<item href="cv29-byte.png" id="added115" media-type="image/png"/>
<item href="cv29-summary.png" id="added114" media-type="image/png"/>
<item href="d-small.png" id="added75" media-type="image/png"/>
<item href="d008-small.png" id="added128" media-type="image/png"/>
<item href="d050-small.png" id="added76" media-type="image/png"/>
<item href="d052.png" id="added74" media-type="image/png"/>
<item href="digitrax-logo.png" id="added1" media-type="image/png"/>
<item href="dir-brake-forward.png" id="added93" media-type="image/png"/>
<item href="dir-small.png" id="added126" media-type="image/png"/>
<item href="dna-small.png" id="added60" media-type="image/png"/>
<item href="dna.png" id="added125" media-type="image/png"/>
<item href="dnd-small.png" id="added57" media-type="image/png"/>
<item href="dnd.png" id="added124" media-type="image/png"/>
<item href="dnr-small.png" id="added54" media-type="image/png"/>
<item href="dnr.png" id="added123" media-type="image/png"/>
<item href="erl-small.png" id="added96" media-type="image/png"/>
<item href="erl.png" id="added97" media-type="image/png"/>
<item href="flow-chart.png" id="added79" media-type="image/png"/>
<item href="full-small.png" id="added14" media-type="image/png"/>
<item href="good-small.png" id="added119" media-type="image/png"/>
<item href="hint.png" id="added2" media-type="image/png"/>
<item href="jump-flashing.png" id="added40" media-type="image/png"/>
<item href="jump-off.png" id="added41" media-type="image/png"/>
<item href="l-loco-r-arrow-12.png" id="added91" media-type="image/png"/>
<item href="l-loco-r-arrow-28.png" id="added92" media-type="image/png"/>
<item href="loco-disp-small.png" id="added18" media-type="image/png"/>
<item href="loconet-connections-sm.png" id="added122" media-type="image/png"/>
<item href="o-small.png" id="added69" media-type="image/png"/>
<item href="o002.png" id="added68" media-type="image/png"/>
<item href="o003.png" id="added73" media-type="image/png"/>
<item href="ops-small.png" id="added77" media-type="image/png"/>
<item href="ops.png" id="added78" media-type="image/png"/>
<item href="opsw-buttons.png" id="added106" media-type="image/png"/>
<item href="p-small.png" id="added62" media-type="image/png"/>
<item href="p002.png" id="added61" media-type="image/png"/>
<item href="p003.png" id="added70" media-type="image/png"/>
<item href="page.png" id="added51" media-type="image/png"/>
<item href="power-connector-sm.png" id="added120" media-type="image/png"/>
<item href="r-loco-r-arrow-25.png" id="added90" media-type="image/png"/>
<item href="r-small.png" id="added67" media-type="image/png"/>
<item href="r002.png" id="added66" media-type="image/png"/>
<item href="r003.png" id="added72" media-type="image/png"/>
<item href="rail-connections.png" id="added121" media-type="image/png"/>
<item href="rail-icon.png" id="added17" media-type="image/png"/>
<item href="s128-function.png" id="added81" media-type="image/png"/>
<item href="s128-small.png" id="added83" media-type="image/png"/>
<item href="s14-small.png" id="added85" media-type="image/png"/>
<item href="s28-small.png" id="added82" media-type="image/png"/>
<item href="sp99.png" id="added112" media-type="image/png"/>
<item href="stlo.png" id="added16" media-type="image/png"/>
<item href="stri-small.png" id="added84" media-type="image/png"/>
<item href="t-small.png" id="added65" media-type="image/png"/>
<item href="t002.png" id="added64" media-type="image/png"/>
<item href="t003.png" id="added71" media-type="image/png"/>
<item href="t008-small.png" id="added127" media-type="image/png"/>
<item href="throttle-id.png" id="added110" media-type="image/png"/>
<item href="thrown-small.png" id="added102" media-type="image/png"/>
<item href="top-view.png" id="added5" media-type="image/png"/>
<item href="track-status-off.png" id="added9" media-type="image/png"/>
<item href="track-status-on.png" id="added8" media-type="image/png"/>
<item href="warning.png" id="added3" media-type="image/png"/>
<item href="zephyr.html" id="html" media-type="application/xhtml+xml"/>
<item href="toc.ncx" media-type="application/x-dtbncx+xml" id="ncx"/>
</manifest>
<spine toc="ncx">
<itemref idref="html"/>
</spine>
</package>

ATDrake
09-27-2010, 08:07 PM
In which case, your problem seems to be with <opf:metadata>. I'm not sure that <metadata> is actually in the opf: namespace, but even if it were, you would have to put the xmlns for opf at least one level above under <package>, rather than calling it from within the namespaced tag even as you're defining it.

Hope this helps.

mrbillb
09-27-2010, 09:34 PM
In which case, your problem seems to be with <opf:metadata>. I'm not sure that <metadata> is actually in the opf: namespace, but even if it were, you would have to put the xmlns for opf at least one level above under <package>, rather than calling it from within the namespaced tag even as you're defining it.

Hope this helps.

Since this is Calibre output, how do I control the placement?

ATDrake
09-27-2010, 09:47 PM
Edit the .opf manually in a text editor and hope it doesn't get overwritten?

Mind you, since this is auto-generated Calibre output and if it's always worked for you before on other books, quite possibly there's something else that I've overlooked, and hopefully someone else will see it.

charleski
09-28-2010, 03:14 PM
Just open the epub in epubtweak and remove the opf: qualifiers from the metadata tags.