MobileRead Forums

MobileRead Forums (https://www.mobileread.com/forums/index.php)
-   Sigil (https://www.mobileread.com/forums/forumdisplay.php?f=203)
-   -   Value of "id" is invalid; must be an XML name without colons (https://www.mobileread.com/forums/showthread.php?t=204542)

cherubchops 02-01-2013 11:49 AM

Value of "id" is invalid; must be an XML name without colons
 
Hello,
Wonder if anyone could help me - I'm getting this message with footnote references in the main text... Don't know what to do to solve it?

The epub file was originally created in Pages, exported to word, saved as a docx, and imported into Calibre, then tweaked in Sigil, and they work fine apart from the footnotes? (i know this is a very long-winded way, but since apple upgraded Pages about a month ago, the epubs they produce are absolutely enormous, and I can't roll-back the application, even with time-machine)

Please help (in a simple way as I am not an expert at all!)

Thanks very much

JSWolf 02-01-2013 11:56 AM

Please post the code in question.

mzmm 02-01-2013 09:37 PM

i tend to get this error after exporting from word when id tags of images have spaces in them. if you change them from id="image 1" to something like id="image_1" it should work

cherubchops 02-02-2013 09:56 AM

Hello,
Sorry, here's the code and error message. It's definitely to do with footnotes in the text.

ERROR: /OEPS/Text/001_split_053.html(1939): value of attribute "id" is invalid; must be an XML name without colons
ERROR: /OEPS/Text/001_split_053.html(1945): value of attribute "id" is invalid; must be an XML name without colons

Line 1939:
<p class="body">5th Division.: Warren.<sup class="calibre17"><a href="../Text/ft_001.html" id="1">{1}</a></sup></p>

Line 1945:
<p class="body">10th Division:<sup class="calibre17"><a href="../Text/ft_002.html" id="2">{2}</a></sup> Sir A. Hunter.</p>


Here's the footnote code bit (but there;s no error listed here, but just in case):

<?xml version="1.0" encoding="utf-8" standalone="no"?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN"
"http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">

<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta content="DOCX Input by SauliusP., v0.0.22" name="Generator" />

<title>ft_001</title>
<link href="../Styles/stylesheet.css" rel="stylesheet" type="text/css" />
<link href="../Styles/page_styles.css" rel="stylesheet" type="text/css" />
</head>

<body class="calibre">
<p class="calibre18"><sup class="calibre17"><a href="../Text/001_split_053.html#1">{1}</a></sup></p>

<p class="footnotetext">Relieved on account of his failure at Spion Kop, and sent to the western theatre on duty other than that at the front. Hildyard placed in command May 1st.</p>
</body>
</html>


and the second footnote code bit:
<?xml version="1.0" encoding="utf-8" standalone="no"?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN"
"http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">

<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta content="DOCX Input by SauliusP., v0.0.22" name="Generator" />

<title>ft_002</title>
<link href="../Styles/stylesheet.css" rel="stylesheet" type="text/css" />
<link href="../Styles/page_styles.css" rel="stylesheet" type="text/css" />
</head>

<body class="calibre">
<p class="calibre18"><sup class="calibre17"><a href="../Text/001_split_053.html#2">{2}</a></sup></p>

<p class="footnotetext">Early in April Hart's Brigade was transferred to the western theatre to join Brabant. Barton's followed and was sent to Kimberley.</p>
</body>
</html>



If you can help, would be very grateful!

DiapDealer 02-02-2013 10:30 AM

Quote:

<p class="body">5th Division.: Warren.<sup class="calibre17"><a href="../Text/ft_001.html" id="1">{1}</a></sup></p>
IDs can't start with (hence nor can they consist entirely of) a number. You'll have to change the IDs and the corresponding url fragment identifiers to something other than just digits.

Quote:

<p class="calibre18"><sup class="calibre17"><a href="../Text/001_split_053.html#1">{1}</a></sup></p>

cherubchops 02-02-2013 12:04 PM

Brilliant!! You've fixed it. I added fn before the numbers and it's passed for epub. Thank you I am very very grateful. I now won't have to go scratching around putting loads of footnotes in the text (which looks a bit rubbish)

https://www2.mobileread.com/i/smiliesadd1/thumbsup.gif


All times are GMT -4. The time now is 10:14 PM.

Powered by: vBulletin
Copyright ©2000 - 3.8.5, Jelsoft Enterprises Ltd.
MobileRead.com is a privately owned, operated and funded community.