10-27-2011, 04:36 PM | #1 |
Junior Member
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 |
10-27-2011, 07:43 PM | #2 |
Evangelist
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. |
Advert | |
|
10-28-2011, 07:03 AM | #3 |
Member
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" ?> |
10-28-2011, 09:45 AM | #4 |
Sigil & calibre developer
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.
|
10-28-2011, 09:57 AM | #5 |
Evangelist
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 |
Advert | |
|
10-28-2011, 01:40 PM | #6 |
Junior Member
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 |
10-28-2011, 03:09 PM | #7 |
Evangelist
Posts: 416
Karma: 1045911
Join Date: Sep 2011
Location: Cape Town, South Africa
Device: Kindle 3
|
|
10-28-2011, 04:14 PM | #8 | |
Member
Posts: 18
Karma: 1314
Join Date: Sep 2011
Location: Hamburg, Germany
Device: iPad
|
Quote:
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). |
|
10-28-2011, 04:22 PM | #9 |
Sigil & calibre developer
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.
|
10-28-2011, 04:40 PM | #10 |
Member
Posts: 18
Karma: 1314
Join Date: Sep 2011
Location: Hamburg, Germany
Device: iPad
|
Thanks a lot for clarifying.
|
11-01-2011, 08:33 AM | #11 | |
Junior Member
Posts: 3
Karma: 10
Join Date: Oct 2011
Device: Kindle, Nook, Ipad, etc.
|
Quote:
|
|
Tags |
ade, sigil, xml |
Thread Tools | Search this Thread |
|
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 |