Register Guidelines E-Books Today's Posts Search

Go Back   MobileRead Forums > E-Book Software > Sigil

Notices

Reply
 
Thread Tools Search this Thread
Old 01-06-2016, 07:57 AM   #1
Hendrixxxxxxxx
Connoisseur
Hendrixxxxxxxx knows how many angels can dance on the head of a pin.Hendrixxxxxxxx knows how many angels can dance on the head of a pin.Hendrixxxxxxxx knows how many angels can dance on the head of a pin.Hendrixxxxxxxx knows how many angels can dance on the head of a pin.Hendrixxxxxxxx knows how many angels can dance on the head of a pin.Hendrixxxxxxxx knows how many angels can dance on the head of a pin.Hendrixxxxxxxx knows how many angels can dance on the head of a pin.Hendrixxxxxxxx knows how many angels can dance on the head of a pin.Hendrixxxxxxxx knows how many angels can dance on the head of a pin.Hendrixxxxxxxx knows how many angels can dance on the head of a pin.Hendrixxxxxxxx knows how many angels can dance on the head of a pin.
 
Posts: 67
Karma: 136594
Join Date: Jan 2013
Location: Hong Kong
Device: Kindle DX, Paperwhite, Paperwhite II, and Voyage
I THINK pretty-print used to fix this for me...

First up, this is not a complaint about the disappearance of pretty-print. I understand why it had to go.

Second up, I have no idea what I'm doing, so its mostly trial and error....

Here is my issue, and as I said in the title, I THINK pretty-print used to correct this issue for me, but unfortunately, I didn't pay enough attention as to how....

If, in an english language book (<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN" "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">, I have the code <span lang="fr" xml:lang="fr" xmlns="http://www.w3.org/1999/xhtml">Que nous étions encore à Frankfort</span>, everything seems OK until I try to validate it.

I vaguely recall that (maybe?) pretty print used to change it to http://www.w3.org/XML/1998/namespace (I found this by searching the big web), or something similar, but if I try to use this (replacing the xmlns="http://www.w3.org/1999/xhtml" with xmlns="http://www.w3.org/XML/1998/namespace") I get an error "xml namespace URI cannot be the default namespace".

FlightCrew tells me that attribute lang is not declared for element span near.....

Some questions:
1) Is something like <lang="fr"....> able to be used in Sigil?
2) How do I declare "attribute lang" for "element span"? Am I on the sorta right track with what I have done, or an I completely missing something? Is there something that needs to be declared, instead in <head> or <html>?
3) Does anyone have any idea what I'm talking about?

Phil
Hendrixxxxxxxx is offline   Reply With Quote
Old 01-06-2016, 09:48 AM   #2
rubeus
Banned
rubeus ought to be getting tired of karma fortunes by now.rubeus ought to be getting tired of karma fortunes by now.rubeus ought to be getting tired of karma fortunes by now.rubeus ought to be getting tired of karma fortunes by now.rubeus ought to be getting tired of karma fortunes by now.rubeus ought to be getting tired of karma fortunes by now.rubeus ought to be getting tired of karma fortunes by now.rubeus ought to be getting tired of karma fortunes by now.rubeus ought to be getting tired of karma fortunes by now.rubeus ought to be getting tired of karma fortunes by now.rubeus ought to be getting tired of karma fortunes by now.
 
Posts: 272
Karma: 1224588
Join Date: Sep 2014
Device: Sony PRS 650
The Epub Validtor reports no error when using <span lang ="en"> so it might be that Flightcrew is wrong in this case.
rubeus is offline   Reply With Quote
Advert
Old 01-06-2016, 10:10 AM   #3
DiapDealer
Grand Sorcerer
DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.
 
DiapDealer's Avatar
 
Posts: 28,359
Karma: 203720150
Join Date: Jan 2010
Device: Nexus 7, Kindle Fire HD
Pretty Print isn't gone. It's just not automatically done any more. Use Tools->Reformat Html->Mend/Mend + Prettify (also available from the Code View context menu) whenever you want to reformat/mend your code.

No version of Sigil that I know of changed the 1999 namespace to a 1998 one (and if the old htmltidy pretty-print ever "fixed" anything, I assure you it was entirely by accident. )

I don't believe you need the namespace in the span since that namespace is always added to the html tag.

I'll look into old vs new behavior, though.
DiapDealer is offline   Reply With Quote
Old 01-06-2016, 10:39 AM   #4
KevinH
Sigil Developer
KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.
 
Posts: 8,485
Karma: 5703586
Join Date: Nov 2009
Device: many
The lang attribute has been deprecated. Have you tried just using the xml:lang attribute in its place and removing lang=blah attribute.
KevinH is offline   Reply With Quote
Old 01-06-2016, 11:07 AM   #5
DiapDealer
Grand Sorcerer
DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.
 
DiapDealer's Avatar
 
Posts: 28,359
Karma: 203720150
Join Date: Jan 2010
Device: Nexus 7, Kindle Fire HD
Quote:
Originally Posted by KevinH View Post
The lang attribute has been deprecated.
Are you sure it's not the "language" attribute that's been deprecated for script elements?

According to what I'm seeing, "lang" should be valid for any element in html5, and there's only a handful of elements that lang can't be used with in html4.01 (I've seen it recommended to use both lang and xml:lang for xhtml delivered as text/html).

I definitely see some IDPF Accessibility guidelines for epub3 recommending both--but it's entirely possible that I have my wires crossed. Specs make my eyes go crossed.
DiapDealer is offline   Reply With Quote
Advert
Old 01-06-2016, 01:02 PM   #6
KevinH
Sigil Developer
KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.
 
Posts: 8,485
Karma: 5703586
Join Date: Nov 2009
Device: many
Hi,
Here is the link that I read once before. See Example 3 which uses the xhtml 1.1 doctype near the end of this page. It does not use lang= anymore where as xhtml 1.0 does.

http://www.w3.org/TR/WCAG20-TECHS/H57.html

So perhaps the doctype does make the difference:

Code:
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" 
  "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
vs

Code:
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN" 
   "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
Either that or FlightCrew is just wrong!

KevinH
KevinH is offline   Reply With Quote
Old 01-06-2016, 01:18 PM   #7
DiapDealer
Grand Sorcerer
DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.
 
DiapDealer's Avatar
 
Posts: 28,359
Karma: 203720150
Join Date: Jan 2010
Device: Nexus 7, Kindle Fire HD
Quote:
Originally Posted by KevinH View Post
Hi,
Here is the link that I read once before. See Example 3 which uses the xhtml 1.1 doctype near the end of this page. It does not use lang= anymore where as xhtml 1.0 does.

http://www.w3.org/TR/WCAG20-TECHS/H57.html

So perhaps the doctype does make the difference:

Code:
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" 
  "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
vs

Code:
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN" 
   "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
Either that or FlightCrew is just wrong!

KevinH
Then Flightcrew should have been wrong about it all along, right? I honestly don't remember how old Sigil handled this sort of thing, but we've not changed Flightcrew (other than to plugin-ize it) have we?

Also, doesn't that documentation only refer to using it with the html element?

EDIT: You're right though ... getting rid of lang="fr" (and leaving xml:lang="fr") makes Flightcrew stop barking about it. Epubcheck doesn't seem to care whether it's there or not.

Last edited by DiapDealer; 01-06-2016 at 01:41 PM.
DiapDealer is offline   Reply With Quote
Old 01-06-2016, 01:55 PM   #8
KevinH
Sigil Developer
KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.
 
Posts: 8,485
Karma: 5703586
Join Date: Nov 2009
Device: many
Hi DiapDealer,

Yes, I think Flightcrew uses the specific DOCTYPE to correctly set the dtd used to validate things. If you change to use the older DOCTYPE (and be careful not to run it through mend or it will convert it back!) and then pass to Flightcrew, it may be accepted.

The dtd is the key and if transitional vs strict.

KevinH
KevinH is offline   Reply With Quote
Old 01-06-2016, 05:59 PM   #9
Hendrixxxxxxxx
Connoisseur
Hendrixxxxxxxx knows how many angels can dance on the head of a pin.Hendrixxxxxxxx knows how many angels can dance on the head of a pin.Hendrixxxxxxxx knows how many angels can dance on the head of a pin.Hendrixxxxxxxx knows how many angels can dance on the head of a pin.Hendrixxxxxxxx knows how many angels can dance on the head of a pin.Hendrixxxxxxxx knows how many angels can dance on the head of a pin.Hendrixxxxxxxx knows how many angels can dance on the head of a pin.Hendrixxxxxxxx knows how many angels can dance on the head of a pin.Hendrixxxxxxxx knows how many angels can dance on the head of a pin.Hendrixxxxxxxx knows how many angels can dance on the head of a pin.Hendrixxxxxxxx knows how many angels can dance on the head of a pin.
 
Posts: 67
Karma: 136594
Join Date: Jan 2013
Location: Hong Kong
Device: Kindle DX, Paperwhite, Paperwhite II, and Voyage
Thanks gents. I'll have a play around with your suggestions above when I get home tonight.
Hendrixxxxxxxx is offline   Reply With Quote
Old 01-07-2016, 06:31 AM   #10
Hendrixxxxxxxx
Connoisseur
Hendrixxxxxxxx knows how many angels can dance on the head of a pin.Hendrixxxxxxxx knows how many angels can dance on the head of a pin.Hendrixxxxxxxx knows how many angels can dance on the head of a pin.Hendrixxxxxxxx knows how many angels can dance on the head of a pin.Hendrixxxxxxxx knows how many angels can dance on the head of a pin.Hendrixxxxxxxx knows how many angels can dance on the head of a pin.Hendrixxxxxxxx knows how many angels can dance on the head of a pin.Hendrixxxxxxxx knows how many angels can dance on the head of a pin.Hendrixxxxxxxx knows how many angels can dance on the head of a pin.Hendrixxxxxxxx knows how many angels can dance on the head of a pin.Hendrixxxxxxxx knows how many angels can dance on the head of a pin.
 
Posts: 67
Karma: 136594
Join Date: Jan 2013
Location: Hong Kong
Device: Kindle DX, Paperwhite, Paperwhite II, and Voyage
A simple <span xml:lang="fr"> did the trick, and no-one (FlightCrew and ePubCheck) has an issue with it.

Thank you both.

Phil
Hendrixxxxxxxx is offline   Reply With Quote
Reply


Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Sigil 0.7 Pretty print exaltedwombat Sigil 37 02-21-2013 11:14 AM
Print Not Working (nor print to PDF) foxglove Calibre 5 03-02-2012 10:05 AM
Print vs Pixel: retailers experiment with print/ebook bundles DMcCunney General Discussions 42 09-15-2010 11:29 AM
Please please please pretty please... nortydog Sony Reader Dev Corner 1 01-09-2010 07:23 PM


All times are GMT -4. The time now is 03:21 AM.


MobileRead.com is a privately owned, operated and funded community.