Register Guidelines E-Books Today's Posts Search

Go Back   MobileRead Forums > E-Book Software > Sigil

Notices

Reply
 
Thread Tools Search this Thread
Old 08-21-2010, 03:41 PM   #1
ChrisI
Connoisseur
ChrisI has learned how to read e-booksChrisI has learned how to read e-booksChrisI has learned how to read e-booksChrisI has learned how to read e-booksChrisI has learned how to read e-booksChrisI has learned how to read e-booksChrisI has learned how to read e-books
 
Posts: 55
Karma: 847
Join Date: Sep 2007
Device: Kobo H2O, Libre 2
Namespace declaration

I have an existing epub with the following code:

<html xmlns="http://www.w3.org/1999/xhtml" xmlns:svg="http://www.w3.org/2000/svg xmlns:xlink="http://www.w3.org/1999/xlink">

and later in the body:

<svg:svg height="100%" ...>
</svg:svg>

When I open the file in Sigil, the entire svg tag gets automatically deleted.

If I change the code to:

<html xmlns="http://www.w3.org/1999/xhtml">

and later in the body:

<svg xmlns="http://www.w3.org/2000/svg xmlns:xlink="http://www.w3.org/1999/xlink" height="100%" ...>
</svg>

Sigil has no problem and the image is displayed.

Forgive my ignorance, but I figured this out from scraps of other people's code, without really understanding what I am doing. Is this an issue with Sigil that I should report, or is the original epub invalid?
ChrisI is offline   Reply With Quote
Old 08-22-2010, 06:02 AM   #2
Valloric
Created Sigil, FlightCrew
Valloric ought to be getting tired of karma fortunes by now.Valloric ought to be getting tired of karma fortunes by now.Valloric ought to be getting tired of karma fortunes by now.Valloric ought to be getting tired of karma fortunes by now.Valloric ought to be getting tired of karma fortunes by now.Valloric ought to be getting tired of karma fortunes by now.Valloric ought to be getting tired of karma fortunes by now.Valloric ought to be getting tired of karma fortunes by now.Valloric ought to be getting tired of karma fortunes by now.Valloric ought to be getting tired of karma fortunes by now.Valloric ought to be getting tired of karma fortunes by now.
 
Valloric's Avatar
 
Posts: 1,982
Karma: 350515
Join Date: Feb 2008
Device: Kobo Clara HD
Quote:
Originally Posted by ChrisI View Post
Forgive my ignorance, but I figured this out from scraps of other people's code, without really understanding what I am doing. Is this an issue with Sigil that I should report, or is the original epub invalid?
Tidy doesn't like namespaces much. It doesn't like svg either, so I had to hack it to leave it alone.

Don't use a namespace prefix for svg elements.

I'm aware of this problem but there's little point in reporting it since I can't rewrite 40 KLOC of Tidy's unreadable C into understanding XML namespaces.
Valloric is offline   Reply With Quote
Advert
Reply


Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
attribute "scheme" from namespace error in epubcheck 1.0.5 thunderune ePub 15 06-30-2011 10:57 AM
Proper Unicode Declaration Fabe Sigil 9 10-13-2010 01:42 PM
Encoding declaration in OPF and TOC? paulpeer Sigil 7 03-08-2010 03:48 PM
Declaration of Independence bill the smith News 140 10-02-2009 05:01 PM
Government United States: Declaration of Independence etc, v1, 21 Oct 2007. Patricia BBeB/LRF Books 2 10-21-2007 09:37 PM


All times are GMT -4. The time now is 10:13 AM.


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