View Full Version : ERROR: Open Quote is Expected (means what?)


NewDay
10-23-2010, 06:10 PM
I am this close to finally validating an epub file that has been full of bugs in the toc.ncx (thank you, InDesign). But now I'm seeing (4 instances of) an error message I've not encountered before:

blah blah.epub/OEBPS/toc.ncx: Open quote is expected for attribute "playOrder" associated with an element type "navPoint".

Here's the code for the last 5 items:

<navPoint id="navpoint-134" playOrder="135"><navLabel><text>Chicken Biscklets</text></navLabel><content src="CastIronCuisine-16.xhtml#toc-anchor-5"/></navPoint>
<navPoint id="navpoint-135" playOrder="136"><navLabel><text>Charcoal Chews</text></navLabel><content src="CastIronCuisine-16.xhtml#toc-anchor-6"/></navPoint>
<navPoint id="navpoint-136" playOrder="137"><navLabel><text>Resources</text></navLabel><content src="CastIronCuisine-17.xhtml#toc-anchor"/></navPoint>
<navPoint id="navpoint-137" playOrder="138"><navLabel><text>Glossary</text></navLabel><content src="CastIronCuisine-18.xhtml#toc-anchor"/></navPoint>
<navPoint id="navpoint-138" playOrder="139"><navLabel><text>About Us</text></navLabel><content src="CastIronCuisine-19.xhtml#toc-anchor"/></navPoint>

Can you please point out the error of my ways so I can go straight to GO?

NewDay
10-23-2010, 06:33 PM
I'm especially puzzled by this since upon opening the toc.ncx for an epub file that was successfully uploaded, I see this code:

<navPoint id="chapter06" playOrder="13"><navLabel><text>6. Mexico</text</navLabel><content src="xhtml/chapter06.html"/></navPoint>

which to me looks identical in logic to the epub file for whose toc.ncx I'm getting this error message.

What am I missing here?

NewDay
10-23-2010, 07:53 PM
O.K. Problem solved. After much head-scratching and floor-pacing, I decided to bypass epubcheck and run it by this validator: http://www.w3schools.com/xml/xml_validator.asp
(Thanks, Liz Castro, for the referral.) It pointed me in the right direction. I did have some xml issues, but not the one epubcheck was claiming. Anyway, everything's cleaned up now, and I'm looking at a validated file.

(I still want my money back for CS5.)

charleski
10-25-2010, 06:23 PM
As a general rule, it's pretty common for the more simplistic validators to point to errors much later in the code than they really are, especially when it comes to quotes or other organising elements. They'll try to make sense of the code and then only stumble when they get to the end of the block.

NewDay
10-26-2010, 10:51 AM
Bingo! You nailed it, Charleski. Man, I wracked my head every which way until I finally went ahead and fixed the first error, a very simple one, then ran it back through the validator and voila! the other error messages disappeared.

I'm getting a lot of use out of the syntax validator at http://www.w3schools.com/xml/xml_validator.asp My new protocol is to run a file by the syntax validator first, then send the clean file to epubcheck. Much less consternation that way.