docbook-apps

  • 1.  EPUB2 vs. EPUB3: Making base.dir consistent?

    Posted 04-17-2013 06:33
    Hi,

    thanks to Bob's changes for the EPUB3 stylesheets, the parameter
    base.dir makes more sense. Many thanks! :)

    I would like to ask if it would be useful to add the same change to the
    EPUB2 stylesheets.

    As far as I can see, it would be compatible with the existing
    implementation, but would be a huge benefit for stylesheet writers and
    developers. I believe, it should be consistent between the two EPUB
    implementations.

    Opinions, thoughts?

    --
    Gruß/Regards,
    Thomas Schraitle



  • 2.  Re: [docbook-apps] EPUB2 vs. EPUB3: Making base.dir consistent?

    Posted 04-17-2013 08:04
    Agreed, consistency between the two makes sense.

    Mike

    On 17/04/2013 07:33, Thomas Schraitle wrote:
    > Hi,
    >
    > thanks to Bob's changes for the EPUB3 stylesheets, the parameter
    > base.dir makes more sense. Many thanks! :)
    >
    > I would like to ask if it would be useful to add the same change to the
    > EPUB2 stylesheets.
    >
    > As far as I can see, it would be compatible with the existing
    > implementation, but would be a huge benefit for stylesheet writers and
    > developers. I believe, it should be consistent between the two EPUB
    > implementations.
    >
    > Opinions, thoughts?
    >




  • 3.  Re: [docbook-apps] EPUB2 vs. EPUB3: Making base.dir consistent?

    Posted 04-17-2013 12:51
    As far as I can remember the person who created the ePub stylesheets is no longer actively supporting them.

    Guess bob has the final answer :-)

    Carlos

    Sent from my iPad

    On Apr 17, 2013, at 1:03 AM, Mike Cook <m@mikecook.co.uk> wrote:

    > Agreed, consistency between the two makes sense.
    >
    > Mike
    >
    > On 17/04/2013 07:33, Thomas Schraitle wrote:
    >> Hi,
    >>
    >> thanks to Bob's changes for the EPUB3 stylesheets, the parameter
    >> base.dir makes more sense. Many thanks! :)
    >>
    >> I would like to ask if it would be useful to add the same change to the
    >> EPUB2 stylesheets.
    >>
    >> As far as I can see, it would be compatible with the existing
    >> implementation, but would be a huge benefit for stylesheet writers and
    >> developers. I believe, it should be consistent between the two EPUB
    >> implementations.
    >>
    >> Opinions, thoughts?
    >
    >
    > ---------------------------------------------------------------------
    > To unsubscribe, e-mail: docbook-apps-unsubscribe@lists.oasis-open.org
    > For additional commands, e-mail: docbook-apps-help@lists.oasis-open.org
    >



  • 4.  Re: [docbook-apps] EPUB2 vs. EPUB3: Making base.dir consistent?

    Posted 04-20-2013 09:24
    Hi

    Am Mittwoch, 17. April 2013, 08:33:27 schrieb Thomas Schraitle:
    >
    > I would like to ask if it would be useful to add the same change to the
    > EPUB2 stylesheets.
    >
    > As far as I can see, it would be compatible with the existing
    > implementation, but would be a huge benefit for stylesheet writers and
    > developers. I believe, it should be consistent between the two EPUB
    > implementations.

    I took the liberty to backport Bob's changes regarding base.dir from the EPUB3
    stylesheet(s) to the EPUB2 stylesheet. :) This is committed to revision 9749.

    It should still be compatible with the old behaviour: If you don't change
    base.dir, it will save all the files in the current directory. However, if you
    specify the parameter base.dir then all files will be written to that
    directory.

    I've tested both behaviours with epubcheck 3.0 and it hasn't complained so
    far. :)

    Would be nice, if someone could test that. Thanks!


    --
    Gruß/Regards
    Thomas Schraitle



  • 5.  Re: [docbook-apps] EPUB2 vs. EPUB3: Making base.dir consistent?

    Posted 04-20-2013 10:33
    I can't get either EPUB 2 or 3 working. I've done a fresh checkout;

    svn co https://docbook.svn.sourceforge.net/svnroot/docbook/trunk/xsl
    basetest

    But I'm getting include failures when executing (with and without
    setting the base);

    xsltproc /docbook/xsl-ns/basetest/epub3/chunk.xsl test.xml

    warning: failed to load external entity
    "/docbook/xsl-ns/basetest/xhtml5/xhtml-docbook.xsl"
    compilation error: file /docbook/xsl-ns/basetest/xhtml5/docbook.xsl line
    16 element import
    xsl:import : unable to load
    /docbook/xsl-ns/basetest/xhtml5/xhtml-docbook.xsl
    warning: failed to load external entity
    "/docbook/xsl-ns/basetest/epub3/titlepage.templates.xsl"
    compilation error: file
    /docbook/xsl-ns/basetest/epub3/epub3-element-mods.xsl line 34 element import
    xsl:import : unable to load
    /docbook/xsl-ns/basetest/epub3/titlepage.templates.xsl
    warning: failed to load external entity
    "/docbook/xsl-ns/basetest/xhtml/chunk-common.xsl"
    compilation error: file /docbook/xsl-ns/basetest/epub3/chunk.xsl line 18
    element import
    xsl:import : unable to load /docbook/xsl-ns/basetest/xhtml/chunk-common.xsl
    warning: failed to load external entity
    "/docbook/xsl-ns/basetest/xhtml/chunk-code.xsl"
    compilation error: file /docbook/xsl-ns/basetest/epub3/chunk.xsl line 20
    element include
    xsl:include : unable to load /docbook/xsl-ns/basetest/xhtml/chunk-code.xsl


    ...and;


    xsltproc /docbook/xsl-ns/basedir/epub/docbook.xsl test.xml

    warning: failed to load external entity
    "/docbook/xsl-ns/basedir/epub/docbook.xsl"
    cannot parse /docbook/xsl-ns/basedir/epub/docbook.xsl



    Mike




    On 20/04/2013 10:23, Thomas Schraitle wrote:
    > Hi
    >
    > Am Mittwoch, 17. April 2013, 08:33:27 schrieb Thomas Schraitle:
    >> I would like to ask if it would be useful to add the same change to the
    >> EPUB2 stylesheets.
    >>
    >> As far as I can see, it would be compatible with the existing
    >> implementation, but would be a huge benefit for stylesheet writers and
    >> developers. I believe, it should be consistent between the two EPUB
    >> implementations.
    > I took the liberty to backport Bob's changes regarding base.dir from the EPUB3
    > stylesheet(s) to the EPUB2 stylesheet. :) This is committed to revision 9749.
    >
    > It should still be compatible with the old behaviour: If you don't change
    > base.dir, it will save all the files in the current directory. However, if you
    > specify the parameter base.dir then all files will be written to that
    > directory.
    >
    > I've tested both behaviours with epubcheck 3.0 and it hasn't complained so
    > far. :)
    >
    > Would be nice, if someone could test that. Thanks!
    >
    >




  • 6.  Re: [docbook-apps] EPUB2 vs. EPUB3: Making base.dir consistent?

    Posted 04-20-2013 11:13
    Hi Mike,

    Am Samstag, 20. April 2013, 11:32:44 schrieb Mike Cook:
    > I can't get either EPUB 2 or 3 working. I've done a fresh checkout;

    This will not work; if you look into the xhtml-1_1 then you will see an almost
    empty directory. The different XHTML stylesheets need to be generated first.
    That's the reason for your errors, regardless of the EPUB version.

    I would recommend to use the snapshot releases from
    http://snapshots.docbook.org. However, it takes some time to create a new
    snapshot release after a commit. I don't know when the next will be generated,
    but the last one was from 17. April. So it's a little bit old. :-]

    In your case, you could try the following:

    1. Download the latest snapshot release from http://snapshots.docbook.org
    2. Unpack the archive, let's say to /tmp. This will create the folder
    docbook-xsl-snapshot.
    3. Copy the epub/docbook.xsl from your fresh checkout into the
    /tmp/docbook-xsl-snapshot/epub directory.
    4. Optionally copy the epub3/ directory in the same way.
    5. Test again. :)


    > [...]


    Hope that helps. :)


    --
    Gruß/Regards
    Thomas Schraitle




  • 7.  Re: [docbook-apps] EPUB2 vs. EPUB3: Making base.dir consistent?

    Posted 04-20-2013 12:40
    Thanks Thomas, I've merged the two together and those errors are now
    gone. However, I think I need to wait for the next snapshot to be
    generated as I'm now getting other errors.

    EPUB3: setting base.dir to "/path/book", puts all files in that "book"
    directory, but I'm getting an epubcheck3 error;

    ERROR: ../test.epub/OEBPS/toc.ncx(9,10): element "navMap" incomplete;
    missing required element "navPoint"

    The NCX has an empty <navMap/>


    EPUB2: is even worse: base.dir is the same as above but the folder
    structure is messed up;

    ./book
    ./bookMETA-INF
    ./bookOEBPS

    The meta/config files are written, but non of the book files (chapters,
    titlepage, etc); they are just printed to the terminal.


    Mike


    On 20/04/2013 12:13, Thomas Schraitle wrote:
    > Hi Mike,
    >
    > Am Samstag, 20. April 2013, 11:32:44 schrieb Mike Cook:
    >> I can't get either EPUB 2 or 3 working. I've done a fresh checkout;
    > This will not work; if you look into the xhtml-1_1 then you will see an almost
    > empty directory. The different XHTML stylesheets need to be generated first.
    > That's the reason for your errors, regardless of the EPUB version.
    >
    > I would recommend to use the snapshot releases from
    > http://snapshots.docbook.org. However, it takes some time to create a new
    > snapshot release after a commit. I don't know when the next will be generated,
    > but the last one was from 17. April. So it's a little bit old. :-]
    >
    > In your case, you could try the following:
    >
    > 1. Download the latest snapshot release from http://snapshots.docbook.org
    > 2. Unpack the archive, let's say to /tmp. This will create the folder
    > docbook-xsl-snapshot.
    > 3. Copy the epub/docbook.xsl from your fresh checkout into the
    > /tmp/docbook-xsl-snapshot/epub directory.
    > 4. Optionally copy the epub3/ directory in the same way.
    > 5. Test again. :)
    >
    >
    >> [...]
    >
    > Hope that helps. :)
    >
    >




  • 8.  Re: [docbook-apps] EPUB2 vs. EPUB3: Making base.dir consistent?

    Posted 04-20-2013 13:34
    Hi Mike,

    Am Samstag, 20. April 2013, 13:39:41 schrieb Mike Cook:
    > Thanks Thomas, I've merged the two together and those errors are now
    > gone. However, I think I need to wait for the next snapshot to be
    > generated as I'm now getting other errors.

    Probably, you are right. I think, the next snapshot release will fix some of
    the issues.


    > EPUB3: setting base.dir to "/path/book", puts all files in that "book"
    > directory, but I'm getting an epubcheck3 error;

    Better append a "/" to your base.dir.


    > ERROR: ../test.epub/OEBPS/toc.ncx(9,10): element "navMap" incomplete;
    > missing required element "navPoint"
    >
    > The NCX has an empty <navMap/>

    I think this bug was fixed already, but I'm not sure.


    > EPUB2: is even worse: base.dir is the same as above but the folder
    > structure is messed up;
    >
    > ./book
    > ./bookMETA-INF
    > ./bookOEBPS

    That's because you haven't appended "/" to your base.dir.


    > The meta/config files are written, but non of the book files (chapters,
    > titlepage, etc); they are just printed to the terminal.

    Maybe the correct base.dir should handle this.


    --
    Gruß/Regards
    Thomas Schraitle




  • 9.  Re: [docbook-apps] EPUB2 vs. EPUB3: Making base.dir consistent?

    Posted 04-20-2013 14:57
    > Better append a "/" to your base.dir.
    Ah, yes, that might be why :)

    For sure I'll just wait for the new snapshot. Thanks Thomas.


    Mike


    On 20/04/2013 14:34, Thomas Schraitle wrote:
    > Hi Mike,
    >
    > Am Samstag, 20. April 2013, 13:39:41 schrieb Mike Cook:
    >> Thanks Thomas, I've merged the two together and those errors are now
    >> gone. However, I think I need to wait for the next snapshot to be
    >> generated as I'm now getting other errors.
    > Probably, you are right. I think, the next snapshot release will fix some of
    > the issues.
    >
    >
    >> EPUB3: setting base.dir to "/path/book", puts all files in that "book"
    >> directory, but I'm getting an epubcheck3 error;
    > Better append a "/" to your base.dir.
    >
    >
    >> ERROR: ../test.epub/OEBPS/toc.ncx(9,10): element "navMap" incomplete;
    >> missing required element "navPoint"
    >>
    >> The NCX has an empty <navMap/>
    > I think this bug was fixed already, but I'm not sure.
    >
    >
    >> EPUB2: is even worse: base.dir is the same as above but the folder
    >> structure is messed up;
    >>
    >> ./book
    >> ./bookMETA-INF
    >> ./bookOEBPS
    > That's because you haven't appended "/" to your base.dir.
    >
    >
    >> The meta/config files are written, but non of the book files (chapters,
    >> titlepage, etc); they are just printed to the terminal.
    > Maybe the correct base.dir should handle this.
    >
    >




  • 10.  Re: [docbook-apps] EPUB2 vs. EPUB3: Making base.dir consistent?

    Posted 04-20-2013 13:08
    Mike,

    If you do the fresh checkout from sourceforge there are additional steps you need to complete to get the stylesheets working

    To get the latest version that will work right out of the box you can download it from snapshots.docbook.org

    Carlos

    Sent from my iPad

    On Apr 20, 2013, at 3:32 AM, Mike Cook <m@mikecook.co.uk> wrote:

    > I can't get either EPUB 2 or 3 working. I've done a fresh checkout;
    >
    > svn co https://docbook.svn.sourceforge.net/svnroot/docbook/trunk/xsl basetest
    >
    > But I'm getting include failures when executing (with and without setting the base);
    >
    > xsltproc /docbook/xsl-ns/basetest/epub3/chunk.xsl test.xml
    >
    > warning: failed to load external entity "/docbook/xsl-ns/basetest/xhtml5/xhtml-docbook.xsl"
    > compilation error: file /docbook/xsl-ns/basetest/xhtml5/docbook.xsl line 16 element import
    > xsl:import : unable to load /docbook/xsl-ns/basetest/xhtml5/xhtml-docbook.xsl
    > warning: failed to load external entity "/docbook/xsl-ns/basetest/epub3/titlepage.templates.xsl"
    > compilation error: file /docbook/xsl-ns/basetest/epub3/epub3-element-mods.xsl line 34 element import
    > xsl:import : unable to load /docbook/xsl-ns/basetest/epub3/titlepage.templates.xsl
    > warning: failed to load external entity "/docbook/xsl-ns/basetest/xhtml/chunk-common.xsl"
    > compilation error: file /docbook/xsl-ns/basetest/epub3/chunk.xsl line 18 element import
    > xsl:import : unable to load /docbook/xsl-ns/basetest/xhtml/chunk-common.xsl
    > warning: failed to load external entity "/docbook/xsl-ns/basetest/xhtml/chunk-code.xsl"
    > compilation error: file /docbook/xsl-ns/basetest/epub3/chunk.xsl line 20 element include
    > xsl:include : unable to load /docbook/xsl-ns/basetest/xhtml/chunk-code.xsl
    >
    >
    > ...and;
    >
    >
    > xsltproc /docbook/xsl-ns/basedir/epub/docbook.xsl test.xml
    >
    > warning: failed to load external entity "/docbook/xsl-ns/basedir/epub/docbook.xsl"
    > cannot parse /docbook/xsl-ns/basedir/epub/docbook.xsl
    >
    >
    >
    > Mike
    >
    >
    >
    >
    > On 20/04/2013 10:23, Thomas Schraitle wrote:
    >> Hi
    >>
    >> Am Mittwoch, 17. April 2013, 08:33:27 schrieb Thomas Schraitle:
    >>> I would like to ask if it would be useful to add the same change to the
    >>> EPUB2 stylesheets.
    >>>
    >>> As far as I can see, it would be compatible with the existing
    >>> implementation, but would be a huge benefit for stylesheet writers and
    >>> developers. I believe, it should be consistent between the two EPUB
    >>> implementations.
    >> I took the liberty to backport Bob's changes regarding base.dir from the EPUB3
    >> stylesheet(s) to the EPUB2 stylesheet. :) This is committed to revision 9749.
    >>
    >> It should still be compatible with the old behaviour: If you don't change
    >> base.dir, it will save all the files in the current directory. However, if you
    >> specify the parameter base.dir then all files will be written to that
    >> directory.
    >>
    >> I've tested both behaviours with epubcheck 3.0 and it hasn't complained so
    >> far. :)
    >>
    >> Would be nice, if someone could test that. Thanks!
    >
    >
    > ---------------------------------------------------------------------
    > To unsubscribe, e-mail: docbook-apps-unsubscribe@lists.oasis-open.org
    > For additional commands, e-mail: docbook-apps-help@lists.oasis-open.org
    >