Register Guidelines E-Books Search Today's Posts Mark Forums Read

Go Back   MobileRead Forums > E-Book Software > Sigil

Notices

Reply
 
Thread Tools Search this Thread
Old 10-27-2011, 04:36 PM   #1
thomasbelrod
Junior Member
thomasbelrod began at the beginning.
 
Posts: 3
Karma: 10
Join Date: Oct 2011
Device: Kindle, Nook, Ipad, etc.
Auto-correcting "Page-map.xml"

I'm using Sigil at the end of our QA process to clean up a couple of things in our Epubs, which are currently being put together by an outside vendor. As a press, we've decided to maintain the page breaks and numbers from our printed edition (we're an academic press). Adobe Digital Editions has an extension for doing this called "page-map," where the info is kept in an xml file. (I know that this is possible to do with NCX, too, but I'm fairly new here and this decision was made before my time. I'm working on changing it, so that we aren't married to ADE, but for now this is what we've got.)

However, when I open an epub in Sigil, the "page-map.xml" file is almost totally erased. All that remains are a couple of HTML tags. (I'm attaching "before and after" versions of this file so you can see.) While I can always just manually place the original XML file back into the Epub after working in Sigil, I'd rather just not have to worry about it. Is there a way to set Sigil so that it doesn't automatically wipe this XML file? (For what it's worth, Epubs won't open in ADE if the XML file is empty. I'm not a fan of ADE, but again...this is what we've got for now.)

---
Tom Elrod
UNC Press
Attached Files
File Type: xml page-map BEFORE.xml (35.1 KB, 478 views)
File Type: xml page-map AFTER.xml (257 Bytes, 312 views)
thomasbelrod is offline   Reply With Quote
Old 10-27-2011, 07:43 PM   #2
Serpentine
Evangelist
Serpentine ought to be getting tired of karma fortunes by now.Serpentine ought to be getting tired of karma fortunes by now.Serpentine ought to be getting tired of karma fortunes by now.Serpentine ought to be getting tired of karma fortunes by now.Serpentine ought to be getting tired of karma fortunes by now.Serpentine ought to be getting tired of karma fortunes by now.Serpentine ought to be getting tired of karma fortunes by now.Serpentine ought to be getting tired of karma fortunes by now.Serpentine ought to be getting tired of karma fortunes by now.Serpentine ought to be getting tired of karma fortunes by now.Serpentine ought to be getting tired of karma fortunes by now.
 
Posts: 416
Karma: 1045911
Join Date: Sep 2011
Location: Cape Town, South Africa
Device: Kindle 3
Hmmm yeah - It seems it wants to use it as part of the book, if you change the extension to something strange it will accept it, the relevant nodes seem fine too - however I'm not sure if ADE would have issues then.

Putting in a ticket over at sigil's bug tracker would be a good idea.
Serpentine is offline   Reply With Quote
Advert
Old 10-28-2011, 07:03 AM   #3
daubnet
Member
daubnet is no ebook tyro.daubnet is no ebook tyro.daubnet is no ebook tyro.daubnet is no ebook tyro.daubnet is no ebook tyro.daubnet is no ebook tyro.daubnet is no ebook tyro.daubnet is no ebook tyro.daubnet is no ebook tyro.daubnet is no ebook tyro.
 
Posts: 18
Karma: 1314
Join Date: Sep 2011
Location: Hamburg, Germany
Device: iPad
The problem is probably more complex than that, but please note that your "page-map BEFORE.xml" is not valid XML. It is missing at least the XML-header
Code:
<?xml version="1.0" ?>
An excerpt from your NCX might also help.
daubnet is offline   Reply With Quote
Old 10-28-2011, 09:45 AM   #4
user_none
Sigil & calibre developer
user_none ought to be getting tired of karma fortunes by now.user_none ought to be getting tired of karma fortunes by now.user_none ought to be getting tired of karma fortunes by now.user_none ought to be getting tired of karma fortunes by now.user_none ought to be getting tired of karma fortunes by now.user_none ought to be getting tired of karma fortunes by now.user_none ought to be getting tired of karma fortunes by now.user_none ought to be getting tired of karma fortunes by now.user_none ought to be getting tired of karma fortunes by now.user_none ought to be getting tired of karma fortunes by now.user_none ought to be getting tired of karma fortunes by now.
 
user_none's Avatar
 
Posts: 2,488
Karma: 1063785
Join Date: Jan 2009
Location: Florida, USA
Device: Nook STR
Any XML file missing the XML header is rewritten automatically and it results in a blank file.
user_none is offline   Reply With Quote
Old 10-28-2011, 09:57 AM   #5
Serpentine
Evangelist
Serpentine ought to be getting tired of karma fortunes by now.Serpentine ought to be getting tired of karma fortunes by now.Serpentine ought to be getting tired of karma fortunes by now.Serpentine ought to be getting tired of karma fortunes by now.Serpentine ought to be getting tired of karma fortunes by now.Serpentine ought to be getting tired of karma fortunes by now.Serpentine ought to be getting tired of karma fortunes by now.Serpentine ought to be getting tired of karma fortunes by now.Serpentine ought to be getting tired of karma fortunes by now.Serpentine ought to be getting tired of karma fortunes by now.Serpentine ought to be getting tired of karma fortunes by now.
 
Posts: 416
Karma: 1045911
Join Date: Sep 2011
Location: Cape Town, South Africa
Device: Kindle 3
I forgot to say, I did test that - as well as with a relevant doctype, both resulted in the same thing. It was also my first guess

The other bits I lifted from:
https://wiki.mobileread.com/wiki/Adob...PUB_extensions
Serpentine is offline   Reply With Quote
Advert
Old 10-28-2011, 01:40 PM   #6
thomasbelrod
Junior Member
thomasbelrod began at the beginning.
 
Posts: 3
Karma: 10
Join Date: Oct 2011
Device: Kindle, Nook, Ipad, etc.
Thanks. Not sure why the XML header hasn't been included before. I'll check with our vendor to make sure they start doing that.

-Tom
thomasbelrod is offline   Reply With Quote
Old 10-28-2011, 03:09 PM   #7
Serpentine
Evangelist
Serpentine ought to be getting tired of karma fortunes by now.Serpentine ought to be getting tired of karma fortunes by now.Serpentine ought to be getting tired of karma fortunes by now.Serpentine ought to be getting tired of karma fortunes by now.Serpentine ought to be getting tired of karma fortunes by now.Serpentine ought to be getting tired of karma fortunes by now.Serpentine ought to be getting tired of karma fortunes by now.Serpentine ought to be getting tired of karma fortunes by now.Serpentine ought to be getting tired of karma fortunes by now.Serpentine ought to be getting tired of karma fortunes by now.Serpentine ought to be getting tired of karma fortunes by now.
 
Posts: 416
Karma: 1045911
Join Date: Sep 2011
Location: Cape Town, South Africa
Device: Kindle 3
Quote:
Originally Posted by thomasbelrod View Post
Thanks. Not sure why the XML header hasn't been included before. I'll check with our vendor to make sure they start doing that.

-Tom
Did adding the header fix it for you? (tho it would be a good idea for them to add it never-the-less)
Serpentine is offline   Reply With Quote
Old 10-28-2011, 04:14 PM   #8
daubnet
Member
daubnet is no ebook tyro.daubnet is no ebook tyro.daubnet is no ebook tyro.daubnet is no ebook tyro.daubnet is no ebook tyro.daubnet is no ebook tyro.daubnet is no ebook tyro.daubnet is no ebook tyro.daubnet is no ebook tyro.daubnet is no ebook tyro.
 
Posts: 18
Karma: 1314
Join Date: Sep 2011
Location: Hamburg, Germany
Device: iPad
Quote:
Originally Posted by user_none View Post
Any XML file missing the XML header is rewritten automatically and it results in a blank file.
I'm unsure what you mean by that. A file that's missing the XML header is not an XML file, so I'm taking wild guesses:
  • Any file that "somewhat resembles" an XML file but lacks the header gets rewritten
  • Any file that is linked from the NCX and which should be XML but isn't, gets rewritten
  • Any file that lacks the XML header is rewritten

Since we know that Sigil leaves other non-XML files alone (e.g. JPEGs), I assume it's one of the other two. I must admit I haven't looked at the code yet, but I'd be curious which conditions trigger that behaviour.

The more I think about it, the more it makes sense to me to either just mark files as invalid/display an error, or to send them through some kind of XML sanitizer (like TagSoup/Tagger).
daubnet is offline   Reply With Quote
Old 10-28-2011, 04:22 PM   #9
user_none
Sigil & calibre developer
user_none ought to be getting tired of karma fortunes by now.user_none ought to be getting tired of karma fortunes by now.user_none ought to be getting tired of karma fortunes by now.user_none ought to be getting tired of karma fortunes by now.user_none ought to be getting tired of karma fortunes by now.user_none ought to be getting tired of karma fortunes by now.user_none ought to be getting tired of karma fortunes by now.user_none ought to be getting tired of karma fortunes by now.user_none ought to be getting tired of karma fortunes by now.user_none ought to be getting tired of karma fortunes by now.user_none ought to be getting tired of karma fortunes by now.
 
user_none's Avatar
 
Posts: 2,488
Karma: 1063785
Join Date: Jan 2009
Location: Florida, USA
Device: Nook STR
Any file that is known / required to be XML such as the page-map.XML is run through an XML Sanitizer which unfortunately gets confused by the missing XML declaration (which gives the XML version) and produces a "blank" file.
user_none is offline   Reply With Quote
Old 10-28-2011, 04:40 PM   #10
daubnet
Member
daubnet is no ebook tyro.daubnet is no ebook tyro.daubnet is no ebook tyro.daubnet is no ebook tyro.daubnet is no ebook tyro.daubnet is no ebook tyro.daubnet is no ebook tyro.daubnet is no ebook tyro.daubnet is no ebook tyro.daubnet is no ebook tyro.
 
Posts: 18
Karma: 1314
Join Date: Sep 2011
Location: Hamburg, Germany
Device: iPad
Thanks a lot for clarifying.
daubnet is offline   Reply With Quote
Old 11-01-2011, 08:33 AM   #11
thomasbelrod
Junior Member
thomasbelrod began at the beginning.
 
Posts: 3
Karma: 10
Join Date: Oct 2011
Device: Kindle, Nook, Ipad, etc.
Quote:
Did adding the header fix it for you? (tho it would be a good idea for them to add it never-the-less)
Yes, it did. Thanks a lot!
thomasbelrod is offline   Reply With Quote
Reply

Tags
ade, sigil, xml

Thread Tools Search this Thread
Search this Thread:

Advanced Search

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
epubcheck: attribute "page-map" not allowed here error message Doitsu ePub 5 10-27-2011 08:51 PM
Importing meta data from xml file exported from Google "My Library" net-buoy Library Management 0 03-14-2011 06:17 PM
Creator taking control of the "first page" link in the "content" menu cyberbaffled Kindle Formats 2 07-11-2010 04:21 PM
Swap "Prev Page" & "Next Buttons" ???? kilofox Amazon Kindle 6 04-02-2008 11:39 PM
re-map an easier "next page" button ? DojoPat Sony Reader 4 09-24-2007 01:08 PM


All times are GMT -4. The time now is 05:19 AM.


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