09-12-2012, 09:35 AM | #1 |
Groupie
Posts: 184
Karma: 2572
Join Date: Aug 2010
Device: Kindle
|
problem with added characters
In my html file, I have the following line:
<span class="underline">action</span> and <span class="underline">decision</span> But when I open the html file in Sigil, I see this: <span class="underline>action</span> and <span class=" underline="">decision</span> As a result, epub validator makes this complaint: attribute "underline" not allowed here; expected attribute "dir", "id", "style", "title" or "xml:lang" So, two questions: 1. Why do you suppose Sigil makes such radical changes in the text, accepting some instances of < and > but changing others, and again adding a space and a straight quote which seem to have created invalid epub? 2. Am I correct in thinking that epub validator is complaining about the space and the apparent extra " in the second instance, to wit: " underline=""> There are many instances of span="underline" in the document, but only three errors relating to the word "underline". Thanks! |
09-12-2012, 10:03 AM | #2 | |
Well trained by Cats
Posts: 30,377
Karma: 58053698
Join Date: Aug 2009
Location: The Central Coast of California
Device: Kobo Libra2,Kobo Aura2v1, K4NT(Fixed: New Bat.), Galaxy Tab A
|
Quote:
In this case, I think it is the uppercase-bracketed [B] You would be best served using the newer way of doing bold, using a selector <p class="bold">... </p> and in the CSS .bold { font-weight: bold; } Last edited by theducks; 09-12-2012 at 07:31 PM. Reason: Ooops! the braket was MR's,strike all |
|
Advert | |
|
09-12-2012, 12:21 PM | #3 | |
Berti
Posts: 1,197
Karma: 4985964
Join Date: Jan 2012
Location: Zischebattem
Device: Acer Lumiread
|
Quote:
2. Epub-Validator takes the second underline as attribute-name, not as value and probably does not see the missing quote before the second underline. Don't think too much about it... |
|
09-12-2012, 07:17 PM | #4 |
Groupie
Posts: 184
Karma: 2572
Join Date: Aug 2010
Device: Kindle
|
You would be best served using the newer way of doing bold,
But there is no bold in that set of underlinings! Are you saying that span class=underline should be p class="underline"? I should use paragraph tags within a sentence? Surely that will create a new line? And You probably missed the Quote between the first underline and the > I don't see any missing quote. It reads: <span class="underline">. That's pasted from the original html file. Perhaps I should have said that the html validates without a problem. I suppose I could simply use italics, though that's not true to the original. |
09-12-2012, 07:30 PM | #5 | |
Well trained by Cats
Posts: 30,377
Karma: 58053698
Join Date: Aug 2009
Location: The Central Coast of California
Device: Kobo Libra2,Kobo Aura2v1, K4NT(Fixed: New Bat.), Galaxy Tab A
|
Quote:
|
|
Advert | |
|
09-12-2012, 07:35 PM | #6 |
Well trained by Cats
Posts: 30,377
Karma: 58053698
Join Date: Aug 2009
Location: The Central Coast of California
Device: Kobo Libra2,Kobo Aura2v1, K4NT(Fixed: New Bat.), Galaxy Tab A
|
All I can think of: there was a mismatch in the closing </span> or different quote marks were used. something unbalanced the span
|
09-12-2012, 07:39 PM | #7 |
Grand Sorcerer
Posts: 27,903
Karma: 198500000
Join Date: Jan 2010
Device: Nexus 7, Kindle Fire HD
|
I've never seen Sigil turn a opening/closing tag into an entity on well-formed (x)html. I'm not saying yours isn't/wasn't well-formed ... I'm just saying that out of the 100 of thousands of lines of (x)html code I've run into/through Sigil ... every single instance of > or < has been my fault. 100%. Either I purposely entered the entities because I wanted them there, or I screwed up the code and Sigil failed to correctly guess what I did wrong.
I've tried importing, pasting, opening that line of html you posted and I just can't get Sigil to screw it up. The only way I can get Sigil to reproduce your problem is by forgetting one of the attribute quotes. Last edited by DiapDealer; 09-12-2012 at 07:41 PM. |
09-13-2012, 03:57 AM | #8 |
frumious Bandersnatch
Posts: 7,533
Karma: 19000001
Join Date: Jan 2008
Location: Spaniard in Sweden
Device: Cybook Orizon, Kobo Aura
|
Maybe some of the quotes are curly/directional (“”) instead of straight? Delete and write them again and see if that helps.
|
09-13-2012, 06:35 AM | #9 |
Guru
Posts: 718
Karma: 1085610
Join Date: Mar 2009
Location: Bristol, England
Device: PRS-T1, 1825PT, Galaxy Tab, One X, TF700T, Aura HD, Nexus 7
|
I've had this happen to me a couple of times with the 0.6.0 beta's. I never could figure out what caused it as looking at my master copies of the files that had this, they looks perfectly fine. Certainly the quotes were all straight.
This seemed to be a random occurance, I could never replicate it. It just seemed to happen. |
09-13-2012, 12:27 PM | #10 | |
Berti
Posts: 1,197
Karma: 4985964
Join Date: Jan 2012
Location: Zischebattem
Device: Acer Lumiread
|
Quote:
Just try it out: turn well-fornmed check off, paste your code to a blank xhtml, remove that quote, save and close the file and open it again and look what sigil did with your code. |
|
09-16-2012, 08:22 AM | #11 |
Groupie
Posts: 184
Karma: 2572
Join Date: Aug 2010
Device: Kindle
|
The problem seems to have been my using underline when I should have used u. The file now validates.
I shouldn't have confused the matter by asking about the messed-up characters. Sorry! |
09-16-2012, 09:54 AM | #12 | |
Well trained by Cats
Posts: 30,377
Karma: 58053698
Join Date: Aug 2009
Location: The Central Coast of California
Device: Kobo Libra2,Kobo Aura2v1, K4NT(Fixed: New Bat.), Galaxy Tab A
|
Quote:
Code:
<span class="underline"> I would expect that there would be a (at minimum): Code:
.underline { text-decoration: underline; } |
|
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
Problem with Turkish Characters | aeolus | Kindle Formats | 13 | 02-22-2012 07:10 AM |
Pdf to epub Problem with Turkish Characters | Nazimco | ePub | 2 | 01-19-2012 07:04 PM |
Touch Problem handling multi-byte characters? | zhhbc | Kobo Reader | 12 | 06-22-2011 09:47 AM |
Creator Problem with spanish characters | Darkitow | Kindle Formats | 1 | 03-25-2011 08:53 AM |
Non-english characters input problem | Celeblin | Calibre | 3 | 06-28-2009 02:05 PM |