Epub display/save confusion

Having trouble installing <oXygen/>? Got a bug to report? Post it all here.
noteon
Posts: 3

Epub display/save confusion

Tue Apr 28, 2015 9:42 pm

I just delivered an .epub to a client with problems in it because I didn't understand that some of the open tabs I saw open in oXygen (XHTML files) didn't belong to the .epub displayed next to them in the Archive Browser.

As it is, it's not just possible, but likely, for me to have ABCversion2.epub showing in the Archive Browser, and Chapter1.xhtml open next to it in a tab in the same window, without realizing that this Chapter 1 is from (and will be saved back to) ABCversion1.epub.

If I am working with two epubs, I need:

- To see each epub in its own window, which also 1) contains its HTML files, and 2) does not contain HTML files from any other .epub.

- To know what's being saved where, without having to hover over tabs for full-pathname tooltips.

If clear visual separation of two two epubs is not possible, is there a setting someplace that will close all tabs from the current .epub (and prompt to SAVE) when a new .epub is opened?

Is there, additionally, a setting that will stop oXygen from reopening the last .epub and all the HTML files I last worked on? Ideally, I don't want anything open until I select OPEN.

I hope this is PEBCAK issue (Problem Exists Between Chair and Keyboard). I've looked through the help file, but haven't hit on the answer yet.

Thank you!

oXygen Author
MacOS 10.9.5
adrian
Posts: 2454

Re: Epub display/save confusion

Tue Apr 28, 2015 11:14 pm

Hi,

To keep a long story short, Oxygen treats .epub files (and archives in general) as virtual folders. This means you can open files from inside different .epubs (from the Archive Browser or the Browse for archived file dialog) just as you would open files from different folders. When you save one of them, it is saved directly in the .epub from where it was open. Since the files are saved directly, there is no separate save action for the .epub.

Oxygen does not group the files from the same .epub together. Also, closing an .epub in the Archive Browser, does not close the individual files opened from that .epub. Although, I admit that sounds like a useful function to have. I'll log a feature request to provide an option for this. There's no "close all editors from the current .epub" either, you can only close all editors, or all but the current one.

I'm afraid that the Archive Browser only holds one .epub at a time. If you open another, the previous one is closed (though not the files you've opened from it). If you are using Oxygen XML Editor, a way around this would be to run an additional instance of Oxygen in the form of the Oxygen XML Author (separate .app) and open the second .epub there. This will also allow you to work with a separate set of files for each .epub, but you will have to go back and forth between two different Oxygen windows (Editor and Author).

Regarding the reopening of files, by default Oxygen remembers and reopens the files you left open on a per project basis. If you don't want this, go to Options > Preferences, Global and uncheck the option Open last edited files from project.

Regads,
Adrian
Adrian Buza
<oXygen/> XML Editor, Schema Editor and XSLT Editor/Debugger
http://www.oxygenxml.com
noteon
Posts: 3

Re: Epub display/save confusion

Wed Apr 29, 2015 12:09 am

Thanks. I almost said I'd like open/close/save to treat .epub files as files, instead of as folders, but thought that might not be very clear. I get what you're saying.

How do people guard against version errors at 2am when there's no obvious indication of which .epub they're working on? Just don't ever open a second archive without completely closing the first one?
george
Site Admin
Posts: 2100

Re: Epub display/save confusion

Wed Apr 29, 2015 7:46 am

This functionality depends on the use case... For example if you validate multiple EPUB files in a folder and you get 5 errors, it is nice that you can just click on those errors and automatically have the files where those errors appear open in oXygen, no matter what EPUB files they are from, instead of closing all files from an EPUB before opening a file from the other.
If you want to update content in an EPUB while looking at a file from another EPUB, that is possible now, but it will not be possible if only files from a single EPUB are allowed to be open.
And so on...

I think the best approach is to define a project for each EPUB file you are working on and keep the option to automatically reopen files. Changing from one project to the other is very easy if you use the drop down next to the project name from the Project View. Thus, you just change the project and you work on a different EPUB and all files you have open there should be from that archive (you should also avoid opening files from another EPUB if you work with a project that is intended for a single EPUB only).

Hope this helps,
George
George Cristian Bina
noteon
Posts: 3

Re: Epub display/save confusion

Thu Apr 30, 2015 6:04 pm

OK...so if I'm understanding correctly, the word "open" doesn't mean what I expect it to mean.

When I do a "find/replace in files" (command-H), and choose "search in open archive," what does that instance of "open" mean?

Does it mean it's going to make this change to everything in the "open" .epub (which isn't actually "open"), whether I have that HTML file open in a tab or not?

Also, are the following two statements true, when working with .epubs?

FILE/OPEN does not open a file.
FILE/SAVE does not save the same thing I "opened" with FILE/OPEN.
george
Site Admin
Posts: 2100

Re: Epub display/save confusion

Fri May 01, 2015 8:23 am

If you Open (double click) on a ZIP-based archive that will be opened in the Archive Browser view. The Find/replace in files command presents a few options to allow you to select the scope of the operation (the set of files the operation will apply on). The option "Opened archive" refers to the archive file that is currently displayed in the Archive Browser view.
Please note that the dialog has also an option in the Filters section called "look inside archives" - that will treat archives as folders and all files within the archives included in the scope of the search/replace operation will be processed.

oXygen accesses files though URLs and in case of a file within an EPUB archive there is a URL that points to that file, for example zip:file:/Users/george/Library/Application%20Support/OxygenXMLEditor/samples/epub/flowers.epub!/toc.ncx is a URL pointing to the toc.ncx file inside /Users/george/Library/Application%20Support/OxygenXMLEditor/samples/epub/flowers.epub EPUB. Now, these URLs work irrespective of the archive presented by the Archive Browser because all the information needed to access that file is already available in the URL itself. The Archive Browser will "open" and EPUB and it will present its content there to allow you to add or delete files.

If a file from an archive is included in the scope of the find/replace operation, then it may be changed by that operation. File within archive can be included in the scope if you select the "opened archive" or if you enable the "look inside archives" option and an archive is included in the scope.

Yes, if you select the "opened archive" as the scope of the operation then all the files from the archive displayed by the Archive Browser view will be processed. If you want to process only the files that are opened in editors select "All opened files" as scope.

Yes, File->Open on an epub will not open that as a file in an editor window, it will open that as an archive in the Archive Browser, so it will became the "opened archive" but not part of the "opened files".

You can make changed to the structure of an EPUB in the Archive Browser and that will automatically save the archive but File->Save refer to files opened in the editing area, so it does not apply to archives.

Best Regards,
George
George Cristian Bina

Return to “Common Problems”

Who is online

Users browsing this forum: No registered users and 0 guests