docbook-apps

  • 1.  RE: Saxon CE

    Posted 06-19-2012 16:41
    Carlos wrote on Sat, 16 Jun 2012 06:39:47 -0700:

    >Has anyone tried using the new Saxon CE to run transformations in the
    >browser? Did it work for you? Did you have to make any changes to your
    >customization layers if it did work?

    I havent' tried successfully yet, but now Saxonica's has published
    Saxon-CE 1.0, one of the tasks I have is to produce a transform
    solution for Saxon-CE's own documentation such that the docbook is
    transformed within the browser using Saxon-CE to HTML. I'm very new to
    the DocBook XSLT project so I'm not really in a position to answer
    questions right now (quite the reverse), but the goal is that any
    solution produced for Saxon-CE's documentation should be of general
    use also to anyone else using DocBook with Saxon-CE.

    Not knowing much about DocBook's XSLT project I started by downloading
    the latest stable version 1.77.1. but I realize now this was probably
    a mistake because all modules seem to be for XSLT is 1.0, and we
    really need to exploit XSLT 2.0's benefits in Saxon-CE if possible so
    I'm now looking to start with the resources available at:
    https://github.com/docbook/xslt20-stylesheets. First attempts with
    1.77.1 showed XSLT compile errors because XML parsers in browsers
    generally don't work with DTD entity references so I'm expecting
    similar issues with the XSLT 2.0 version.

    Without having looked closely at the DocBook XSLT I do have some
    concern about the apparent number of XSLT files that need importing
    for a transform. XSLT-compile time on the browser will be critical
    (mitigated somewhat by compiling at the same time as asynchronously
    fetching the initial source XML) so this is something I will be
    looking at closely.

    Any thoughts, is starting with the github DocBook XSLT 2.0 project the best bet?

    Phil Fearon
    (Saxonica)



  • 2.  Re: [docbook-apps] RE: Saxon CE

    Posted 06-19-2012 20:29
    On 19.6.2012 18:40, Philip Fearon wrote:

    > Any thoughts, is starting with the github DocBook XSLT 2.0 project the best bet?

    As Bob already said if you use only subset of DocBook markup and are
    concerned about speed then writing simple stylesheet from scratch might
    be the best idea.

    On the other hand if you want to cover all of DocBook and have support
    for localization, etc. then using XSLT 2.0 stylesheets from GitHub are
    the right choice for Saxon-CE.

    Of course some customitation is needed as stylesheets were primarly
    targeted for off-line usage where you convert one large DocBook document
    into one large HTML file or set of smaller interlinked HTML pages
    (chunked output).

    To my knowledge current saxonica site is composed from large number of
    small XML files where each XML file corresponds to HTML page in browser
    and there is navigation generated between those page. In your case you
    have to decide if you want to retain this approach -- then you will have
    to extend existing stylesheets with additional code to generate
    navigation. Or you can have complete site in one large DocBook XML and
    use interactive features of Saxon-CE to render only part of document and
    map navigation to AJAX-like refreshes of page. In this case modifaction
    of chunking code to use interactive features of Saxon-CE will be
    necessary as well. But I think it is cruical to decide on this before
    designing the best architecture.

    Anyway I would be interested in watching your progress and if my
    knowledge and time will permit I will try to help answers related to
    XSLT 2.0 stylesheets and DocBook in general.

    Jirka

    BTW, congrats for releasing 1.0 of Saxon-CE.

    --
    ------------------------------------------------------------------
    Jirka Kosek e-mail: jirka@kosek.cz http://xmlguru.cz
    ------------------------------------------------------------------
    Professional XML consulting and training services
    DocBook customization, custom XSLT/XSL-FO document processing
    ------------------------------------------------------------------
    OASIS DocBook TC member, W3C Invited Expert, ISO JTC1/SC34 member
    ------------------------------------------------------------------




  • 3.  Re: [docbook-apps] RE: Saxon CE

    Posted 06-19-2012 21:08
    Many thanks to all for your comments - some wise words!

    Above all, I think this will be a good learning process - from your
    comments I now understand the need to approach this with a fair
    amount of caution. I will try to use as much of the existing code base
    as possible, but make the feature compromises necessary to make this a
    real solution for the client. In many ways, this is the same approach
    used when porting server-side Saxon to the client.

    Whilst the current Saxonica site does comprise a large number of small
    XML files these are actually split from larger files that correspond
    reasonably well to DocBook chapters, there's also a single catalog
    file that references each 'chapter' - this, along with Saxonica's
    existing XSLT resources to generate DocBook means that I believe we're
    in pretty good starting position for the challenges ahead in this next
    stage.

    We have some great ideas on how to add new features to the site once
    we have client-side XSLT 2.0 processing, but one step at a time...

    I will keep you posted, and also come back as and when issues arise,

    thanks again

    Phil


    On Tue, Jun 19, 2012 at 9:28 PM, Jirka Kosek <jirka@kosek.cz> wrote:
    > On 19.6.2012 18:40, Philip Fearon wrote:
    >
    >> Any thoughts, is starting with the github DocBook XSLT 2.0 project the best bet?
    >
    > As Bob already said if you use only subset of DocBook markup and are
    > concerned about speed then writing simple stylesheet from scratch might
    > be the best idea.
    >
    > On the other hand if you want to cover all of DocBook and have support
    > for localization, etc. then using XSLT 2.0 stylesheets from GitHub are
    > the right choice for Saxon-CE.
    >
    > Of course some customitation is needed as stylesheets were primarly
    > targeted for off-line usage where you convert one large DocBook document
    > into one large HTML file or set of smaller interlinked HTML pages
    > (chunked output).
    >
    > To my knowledge current saxonica site is composed from large number of
    > small XML files where each XML file corresponds to HTML page in browser
    > and there is navigation generated between those page. In your case you
    > have to decide if you want to retain this approach -- then you will have
    > to extend existing stylesheets with additional code to generate
    > navigation. Or you can have complete site in one large DocBook XML and
    > use interactive features of Saxon-CE to render only part of document and
    > map navigation to AJAX-like refreshes of page. In this case modifaction
    > of chunking code to use interactive features of Saxon-CE will be
    > necessary as well. But I think it is cruical to decide on this before
    > designing the best architecture.
    >
    > Anyway I would be interested in watching your progress and if my
    > knowledge and time will permit I will try to help answers related to
    > XSLT 2.0 stylesheets and DocBook in general.
    >
    >                                Jirka
    >
    > BTW, congrats for releasing 1.0 of Saxon-CE.
    >
    > --
    > ------------------------------------------------------------------
    >  Jirka Kosek      e-mail: jirka@kosek.cz      http://xmlguru.cz
    > ------------------------------------------------------------------
    >       Professional XML consulting and training services
    >  DocBook customization, custom XSLT/XSL-FO document processing
    > ------------------------------------------------------------------
    >  OASIS DocBook TC member, W3C Invited Expert, ISO JTC1/SC34 member
    > ------------------------------------------------------------------
    >