OASIS Mailing List ArchivesView the OASIS mailing list archive below
or browse/search using MarkMail.

 


Help: OASIS Mailing Lists Help | MarkMail Help

docbook-apps message

[Date Prev] | [Thread Prev] | [Thread Next] | [Date Next] -- [Date Index] | [Thread Index] | [List Home]


Subject: Re: Specifying directory for epub 3 output (i.e., doing everything the Oxygen way)


Hi, there,

This may not be what you're looking for, but here's how I specify my paths using Oxygen for epub3.  I see that you are setting variables and using XSLT magic to construct a path. My method is nowhere near as sophisticated, but I'm pretty sure it works without messing up your <a href tags.  I generally follow the steps  Bob's README file inside the epub3 directory
http://50.56.245.89/xsl-ns/epub3/README (which means I zip things manually).

After I created my Oxygen scenario, I edited the parameters using the Oxygen scenario interface dialog (and NOT the customization layer XSLT file).  You can access this by opening the Edit Scenario tab --> XSLT tab --> clicking the "Parameters" button).

For epub/html chunk scenarios, Oxygen includes some Oxygen-specific parameters out of the box (although 99% of the parameters are simply whatever the default values happen to be).

I got tripped up multiple times because I tried modifying a parameter in my XSLT customization layer without blanking out the parameter value which was in the Oxygen scenario. If I recall correctly, when you run an Oxygen scenario, the parameters set in the scenario interface dialog override anything you put in the customization layer XSLT file you have created.

I generally don't edit any parameters using the scenarios in Oxygen, except for these things:

base.dir ${cfd}/epub3-output1/OEBPS/
img.src.path:  (leave blank)

the  "${cfd}" is an  Oxygen Editor variable . (see http://www.oxygenxml.com/doc/ug-editor/topics/editor-variables.html ).

In my xslt customization layer, I don't declare anything having to do with path (except for importing the docbook xsl !) I found that Windows paths were cumbersome to set in my customization layer and hard to reconstruct on different machines. Using Oxygen Editor Variables was a lot easier for me.

When I import my docbook-epub xsl path in Windows, I do it in my xslt customization layer and I use a relative path instead of an absolute path. (i.e.,         <xsl:import href="" ).  If you use some of the epub scenarios provided by Oxygen and are not careful, you can accidentally   change the paths to everything to be in c:/program files.  which is bad. My latest docbook xslt are simply in "c:/My Documents/1 latest" (which is where I chose to copy them to).

If you want to have the output files in the same directory as your docbook xml source, all you would need to do is to edit the value in the Edit Scenario popup for Parameters (Instead of doing it in the xslt customization layer). 

So if you wanted to create an OEBPS folder inside your source directory, you would simply go to Edit Scenario and say:
base.dir =  ${cfd}/OEBPS/ or ${cfd} instead of the values I used.

I suspect the reason you want to keep your output files in the same directory as your source directory is so you don't have to copy/sync all the images in the images directory (and css into your output directory).  Generally I found it was easier to manually duplicate your assets into the output directory, and then, when I declare the paths in docbook xml, I do something like this:   <imagedata  contentwidth="150px" contentdepth="189px" fileref="images-epub/small-small.jpg"/>.  ( leave img.src.path value blank in both my customization layer and in the  Oxygen scenario parameter popup dialog).

Copying assets manually into the output directory may not be elegant (I'm sure using ant scripts would do the job), but it's a heck of a lot easier.

Hope this helps (or at least helps people who are looking for a fast and easy way to produce epub files using Oxygen).

--
Robert Nagle
6121 Winsome Ln #56C, Houston TX 77057-5581
(H) 713 893 3424/ (W) 832-251-7522 Carbon Neutral Since Jan 2010
http://www.robertnagle.info


[Date Prev] | [Thread Prev] | [Thread Next] | [Date Next] -- [Date Index] | [Thread Index] | [List Home]