![]() |
#16 | ||
Hedge Wizard
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 802
Karma: 19999999
Join Date: May 2011
Location: UK/Philippines
Device: Kobo Touch, Nook Simple
|
Quote:
Glad to be of service. With regard to the Quote:
The OPF is one file I need to know more about. I understand the basic structure but I do not know the fine detail. How "nsO: was being used meant nothing to me. |
||
![]() |
![]() |
![]() |
#17 |
Sigil Developer
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 8,765
Karma: 6000000
Join Date: Nov 2009
Device: many
|
FWIW, pure xml allows any tags and attributes anyone would want. The problem is that two or more xml projects/language variants could use the same name for different tags that mean different things. And worse yet these names could needed to be used in the same xml file. So xml adopted the use of namespaces and these namespaces had to be unique so they decided to use a url/uri to represent them since no two different websites could have the same url. (These urls need not point to functional web pages but sometimes do).
The idea was to prefix each tag with its associated project namespace (url).. However that is too cumbersome in practice and shorter namespace prefixes were used instead. Things like opf: and dc: and even ns0: are examples of these shorter namespace prefixes. Each prefix needs to be defined by using an xmlns attribute hopefully in the root tag and where else needed by using the xmlns attribute. So the attribute: xmlns:opf="http://www.idpf.org/2007/opf" is often seen in opf files to define the namespace associated with the opf: prefix. To make notation even shorter a tag can define a default namespace that tells you that all tags without prefixes are using this namespace. For example: xmlns="http://www.idpf.org/2007/opf" means that the tags in the opf namespace do not need a prefix at all. Your epub opf defined an uncommon prefix (ns0:) for tags in the opf namespace and then needed to prefix all tags with ns0: as a result. This made the opf much more cumbersome than usual. Sigil's code knows the urls associated with epub namespaces and now properly simplifies (cleans) them down to the most compact (typical) form so that they can be more easily be read, written, and parsed. Hope something here helps. |
![]() |
![]() |
Advert | |
|
![]() |
#18 | |
Bibliophagist
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 46,243
Karma: 168983734
Join Date: Jul 2010
Location: Vancouver
Device: Kobo Sage, Libra Colour, Lenovo M8 FHD, Paperwhite 4, Tolino epos
|
Quote:
Which I admit to still doing a lot of the time. ![]() |
|
![]() |
![]() |
![]() |
#19 |
Grand Sorcerer
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 28,574
Karma: 204127028
Join Date: Jan 2010
Device: Nexus 7, Kindle Fire HD
|
Hardly a "return." Sigil has never really stopped ensuring that the opf is in state that Sigil can properly parse. Nearly every aspect of Sigil's automated processes are predicated upon the opf being in a state that's both valid (RE spec) and useable by Sigil's parsing routines.
The OPF is one of the few places where Sigil's wishes may still trump the user's. Just hopefully only in minor esoterica like this example. I've not run into too many ebook creators who have an interest in preserving technically correct, but functionally purposeless namespace prefixing schemes. *shrug* I know you were probably posting in a primarily ironic manner. but I wanted to be sure people understand that Sigil's move towards a "hands off" approach does not extend to every single aspect of the OPF. ![]() With regard to the uncommon prefixes in this test sample, I believe I've seen those ns0, ns1 prefixes introduced by lxml parsing where no attempt to properly manage the namespace prefixes is made. Probably some sort of in-house automated script that no one has ever revisited since epubcheck doesn't bark about it. |
![]() |
![]() |
![]() |
#20 | ||
Bibliophagist
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 46,243
Karma: 168983734
Join Date: Jul 2010
Location: Vancouver
Device: Kobo Sage, Libra Colour, Lenovo M8 FHD, Paperwhite 4, Tolino epos
|
Quote:
Quote:
|
||
![]() |
![]() |
Advert | |
|
![]() |
#21 |
null operator (he/him)
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 21,731
Karma: 29711016
Join Date: Mar 2012
Location: Sydney Australia
Device: none
|
|
![]() |
![]() |
![]() |
#22 | |
Hedge Wizard
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 802
Karma: 19999999
Join Date: May 2011
Location: UK/Philippines
Device: Kobo Touch, Nook Simple
|
Quote:
That is one more step on my journey to learn about the OPF file and ePubs. I bet just when I think I have learned all that is necessary it all changes. ![]() |
|
![]() |
![]() |
![]() |
|
![]() |
||||
Thread | Thread Starter | Forum | Replies | Last Post |
problem! massive problem! | Persian | Calibre | 8 | 07-13-2011 04:39 PM |
PRS-500 battery problem, but the battery's not the problem | ZachC | Sony Reader | 7 | 01-11-2010 11:46 PM |
Calibré problem (may be XP problem) | Hildebrandt | Calibre | 3 | 07-23-2009 02:04 PM |