Page 1 of 1
filename contains spaces
Posted: Fri Oct 26, 2012 5:31 pm
by dcdenison
Hi, I'm just upgrading to Author 14.1 and when I try to validate an epub I'm getting this warning:
"Filename contains spaces. Consider changing filename such that URI escaping is not necessary!"
specifically it cites the css file:
css/_Applications_oxygenAuthor 4_frameworks_docbook_css_styles.css
This doesn't happen on my version of Author 13. I thought I transferred all the settings, but perhaps I'm missing something.
DC
Re: filename contains spaces
Posted: Mon Oct 29, 2012 5:17 pm
by Radu
Hi,
Sorry for the delay.
Are you publishing Docbook 4 or 5 to EPUB?
Are you using the default transformations from Oxygen to create the EPUB archive?
Did you set any custom parameters to it or did you modify the ANT build file in any way?
Regards,
Radu
Re: filename contains spaces
Posted: Mon Oct 29, 2012 11:06 pm
by dcdenison
Publishing Docbook 5
I used the default DocBook Epub, which is ANT -- got that same "filename with spaces" warning.
I do have some custom parameters which I tried to transfer over from my previous version, which I think was 13.2:
1. a custom CSS style sheet.
2. a custom xsl file.
3. The ANT scenario parameters are the same.
I noticed that the new version of Oxygen (14.1) seemed to pick up all this from the previous version, even though I installed it in a separate folder.
As I think I mentioned, I am getting a valid EPub from the 13.2 version.
Thanks for your help!
DC
Re: filename contains spaces
Posted: Tue Oct 30, 2012 11:49 am
by Radu
Hi,
Initially this worked for me (because I tested on Windows) but then I managed to reproduce a similar problem on a MAC when referencing an image.
I think the issues are related and fixing one of them should fix the other although I do not know very much about your customization. We'll look into it, maybe incorporate the fix in one of the Oxygen 14.1 minor bug fix release. I'll update this thread when this happens.
How exactly do you refer to the custom CSS (which is probably called "styles.css")?
I noticed that the new version of Oxygen (14.1) seemed to pick up all this from the previous version, even though I installed it in a separate folder.
The transformation scenarios are inherited from one version to another. This does not mean that resources get copied from one folder to another so maybe your transformation scenario now relies on resources which do not exist anymore in the Oxygen Installation Directory.
Regards,
Radu
Re: filename contains spaces
Posted: Fri Nov 02, 2012 4:56 pm
by sorin_ristache
Hello,
dcdenison wrote:As I think I mentioned, I am getting a valid EPub from the 13.2 version.
Version 13.2 included an older version of the EpubCheck validator which did not report a warning or error when the name of a file from the EPUB file contained spaces. Newer versions of Oxygen come with the latest EpubCheck version, that is EpubCheck 3.0b5 (as you can see in the Help -> About dialog, the Libraries tab). Starting with this version the validator tries to prevent future rejections of EPUBs containing filenames with spaces when they are submitted to app stores like iBookstore. You can read about this
here,
here and
here. Even escaping the space characters (replacing any space from a file path with %20) does not remove all the space-related errors and warnings from the EpubCheck validation.
If you want to have zero warnings you should follow the suggestion of the warning:
Code: Select all
Filename contains spaces. Consider changing filename such that URI escaping is not necessary
and remove the space characters from any file path that goes in the EPUB, for example replace them with the underscore character.
If you don't care about EPUB bookstore requirements like iBookstore and you don't want to remove the space characters, please ignore the warning message. It is not an error that makes the EPUB unusable, it is just a warning that tries to help the users who intend to submit the e-books to some app stores.
Regards,
Sorin
Re: filename contains spaces
Posted: Fri Nov 02, 2012 6:22 pm
by sorin_ristache
Hi DC,
dcdenison wrote:Publishing Docbook 5
I used the default DocBook Epub, which is ANT -- got that same "filename with spaces" warning.
On second thoughts: I just fixed the warning by replacing automatically any space character with '_' in the file path of any CSS or image resource that is included in the final EPUB file. It is a simple fix which does not affect in any way the actual input files (it affects only the file paths from
inside the final EPUB) and which circumvents nicely the pesky "filename with spaces" warning. The fix will be available starting with the next
maintenance build of Oxygen 14.1. If you don't want to wait until the next Oxygen build just let us know by email (support at oxygenxml dot com) and we will provide a download URL of an Oxygen nightly build.
Regards,
Sorin
Re: filename contains spaces
Posted: Sun Nov 11, 2012 8:01 pm
by dcdenison
Thanks Sorin, I can definitely wait until the next build.
I'm *definitely* interested in uploading to the Apple iBookstore, so I want to comply with Epub requirements.
BTW, where are these spaces coming from? I never use spaces in my file names? Is it something in the ANT conversion?
Also to answer Radu's question as to how I refer to the custom CSS:
${frameworksDir}/docbook/css/styles.css
That's what in the "Parameters" section of the ANT scenerio.
On the computer where I'm doing the transformation:
OxygenAuthor4>frameworks>docbook>css>styles.css
Thanks so much for the help. I can see that this is a common problem out there.
DC
Re: filename contains spaces
Posted: Mon Nov 12, 2012 10:26 am
by sorin_ristache
Hi,
If the image file is located outside the folder of the DocBook 5 XML file then a copy of the image file is included in the EPUB with a file name that includes the full original file path of the image file with some minor modifications like '/' and '\' changed to '_', etc. So if your image file is outside the input XML file in a file path like
C:\temp\directory with spaces then these spaces will be included in the copied image file name inside the final EPUB output of the transformation.
This was the behavior up to the initial release of Oxygen 14.1 but we fixed the problem already and the fix will be included in the first
maintenance build of Oxygen 14.1 (probably later this week).
Regards,
Sorin
Re: filename contains spaces
Posted: Mon Nov 12, 2012 4:55 pm
by dcdenison
thanks. That's really helpful.
I always store all the images in a "figs" folder inside the folder that contains the .xml file. I was told that's the best practice. And that sounds like it will work in the next build.
Thanks again, appreciate the quick response!
DC
Re: filename contains spaces
Posted: Mon Nov 12, 2012 5:13 pm
by sorin_ristache
Hi,
If the images are stored in a subfolder of the folder containing the main XML file then the subfolder structure with the images will be mirrored inside the EPUB file. Additionally, starting with the next maintenance build for 14.1 (which we will upload to the Oxygen download server in a couple of days), any space character in any folder or subfolder name (it does not matter if it is located inside the folder containing the main XML file or not) will be replaced with an '_' to avoid that EPUB validation warning.
If you subscribe to
the RSS for the maintenance builds you will be automatically notified about new Oxygen builds in the future.
Regards,
Sorin
Re: filename contains spaces
Posted: Thu Nov 15, 2012 5:35 pm
by adrian
Hello,
I just wanted to let you know that this problem has been resolved in the latest maintenance build of Oxygen 14.1,
2012111217 (released on November 14th):
DocBook 5 to EPUB: The generated EPUB was invalid if an image reference or a custom CSS had space characters in the path.
You can download it from our web site:
http://www.oxygenxml.com/download.html
The list of bug-fixes can be found here:
http://www.oxygenxml.com/build_history.html#2012111217
You can follow the release/build RSS feed here:
http://www.oxygenxml.com/rssBuildID.xml
Let us know if you encounter further problems with this new build.
Regards,
Adrian