docbook-apps

  • 1.  xml catalogs xerces, saxon, and olinking (target database is picked up as relative to docbook-xsl)

    Posted 09-18-2006 10:23
    target.xml is the the name of my olink target.database.document. I
    have an XML catalog that is found via CatalogManager.properties using
    xerces + the commons resolver. I don't know if this is relevant, but
    the path to CatalogManager.properties is specified in URL form (I
    don't know any other way to do it on windows):

    catalogs=file:///C:/Program%20Files/docbook-xsl/docbook-xsl-1.71.0/catalog.xml

    Anyway, with a verbosity level of 99, I can see:

    [java] Stripping NS from DocBook 5/NG document.
    [java] Processing stripped document.
    [java] Writing target.db for book(Engineering_Optimization)
    [java] resolveURI(target.xml)
    [java] Resolved URI: target.xml
    [java] file:/C:/Program%20Files/docbook-xsl/docbook-xsl-1.71.0/html/target.xml
    [java] resolveURI()
    [java] Resolved URI:
    [java] file:/C:/Program%20Files/docbook-xsl/docbook-xsl-1.71.0/html/profile-docbook.xsl
    [java] Recoverable error
    [java] Failure reading
    file:/C:/Program%20Files/docbook-xsl/docbook-xsl-1.71.0/html/target.xml:
    C:\Program Files\docbook-xsl\docbook-xsl-1.71.0\html\target.xml (The
    system cannot find the file specified)
    [java] Olink error: could not open target database 'target.xml'.
    [java] Error: unresolved olink: targetdoc/targetptr = 'self/HW1_Appendix'.

    I guess the stylesheet calls for target.xml and the catalog says, no
    problem, that's right next to you - here's the URL. How does one make
    it use the target database catalog in the folder next to my xml files
    instead of next to the docbook stylesheets. xsltproc didn't have this
    problem, but I ran into more weird xsltproc db5 incompatabilities and
    decided to drop it.

    --
    http://chris.chiasson.name/



  • 2.  Re: xml catalogs xerces, saxon, and olinking (target database is picked up as relative to docbook-xsl)

    Posted 09-18-2006 10:31
    How nice, in the result html file, the images all use full paths
    instead of relative paths. I thought that problem was endemic to
    oXygen. Now I see that it's a little more widespread. However, I am
    sure someone has a workaround. Is this why keep.relative.image.uris
    was invented?

    On 9/18/06, Chris Chiasson <chris@chiasson.name> wrote:
    > target.xml is the the name of my olink target.database.document. I
    > have an XML catalog that is found via CatalogManager.properties using
    > xerces + the commons resolver. I don't know if this is relevant, but
    > the path to CatalogManager.properties is specified in URL form (I
    > don't know any other way to do it on windows):
    >
    > catalogs=file:///C:/Program%20Files/docbook-xsl/docbook-xsl-1.71.0/catalog.xml
    >
    > Anyway, with a verbosity level of 99, I can see:
    >
    > [java] Stripping NS from DocBook 5/NG document.
    > [java] Processing stripped document.
    > [java] Writing target.db for book(Engineering_Optimization)
    > [java] resolveURI(target.xml)
    > [java] Resolved URI: target.xml
    > [java] file:/C:/Program%20Files/docbook-xsl/docbook-xsl-1.71.0/html/target.xml
    > [java] resolveURI()
    > [java] Resolved URI:
    > [java] file:/C:/Program%20Files/docbook-xsl/docbook-xsl-1.71.0/html/profile-docbook.xsl
    > [java] Recoverable error
    > [java] Failure reading
    > file:/C:/Program%20Files/docbook-xsl/docbook-xsl-1.71.0/html/target.xml:
    > C:\Program Files\docbook-xsl\docbook-xsl-1.71.0\html\target.xml (The
    > system cannot find the file specified)
    > [java] Olink error: could not open target database 'target.xml'.
    > [java] Error: unresolved olink: targetdoc/targetptr = 'self/HW1_Appendix'.
    >
    > I guess the stylesheet calls for target.xml and the catalog says, no
    > problem, that's right next to you - here's the URL. How does one make
    > it use the target database catalog in the folder next to my xml files
    > instead of next to the docbook stylesheets. xsltproc didn't have this
    > problem, but I ran into more weird xsltproc db5 incompatabilities and
    > decided to drop it.
    >
    > --
    > http://chris.chiasson.name/
    >


    --
    http://chris.chiasson.name/



  • 3.  Re: xml catalogs xerces, saxon, and olinking (target database is picked up as relative to docbook-xsl)

    Posted 09-18-2006 10:50
    keep.relative.image.uris does help with the images that are referenced
    directly from the main xml source, but it doesn't help the images
    referenced from other source files that aren't in the same directory
    (obviously). :-[



  • 4.  Re: [docbook-apps] xml catalogs xerces, saxon, and olinking (target database is picked up as relative to docbook-xsl)

    Posted 09-18-2006 13:23
    Chris Chiasson wrote:

    > I guess the stylesheet calls for target.xml and the catalog says, no
    > problem, that's right next to you - here's the URL. How does one make
    > it use the target database catalog in the folder next to my xml files
    > instead of next to the docbook stylesheets.

    The problem here is that for DBv5 documents stylesheets create temporary
    document with stripped out namespace. This temporary document doesn't
    have address, it is just temporal in-memory representation. It seems
    that for such documents Saxon assumes that their base URI is same as of
    stylesheet.

    If you will try olink with DBv4 content, you will see that olink target
    database is read from the same directory as document processed.

    It is pain, I will try think about way how to fix it, but meanwhile you
    must specify location of target database as an absolute URI.

    Jirka

    --
    ------------------------------------------------------------------
    Jirka Kosek e-mail: jirka@kosek.cz http://www.kosek.cz
    ------------------------------------------------------------------
    Profesionální školení a poradenství v oblasti technologií XML.
    Podívejte se na náš nove spuštený web http://DocBook.cz
    Podrobný prehled školení http://xmlguru.cz/skoleni/
    ------------------------------------------------------------------
    Nejbližší termíny školení:
    ** XSLT 23.-26.10.2006 ** XML schémata 13.-15.11.2006 **
    ** DocBook 11.-13.12.2006 ** XSL-FO 11.-12.12.2006 **
    ------------------------------------------------------------------
    http://xmlguru.cz Blog mostly about XML for English readers
    ------------------------------------------------------------------




  • 5.  Re: [docbook-apps] xml catalogs xerces, saxon, and olinking (target database is picked up as relative to docbook-xsl)

    Posted 09-19-2006 02:49
    Well, I used ant to feed a fully qualified path to saxon, but it is
    still failing. I have included the saxon output with the catalog
    manager debug level at 99 along with the content of teh olinkdb.xml
    (yes, i switched to using the default name for this file).

    Is it possible to have the stylesheets write the "db4" document (as
    converted from my db5 src) out to a file so that I can restart the
    transformation? It seems like this would make xsltproc and saxon work
    a little better and give you stylesheet authors more time work on
    other things.

    Here is an echo of the parameters I passed on the "command line" (this
    is right, right?)

    [echo] target.database.document=file:///C:/workspace/build/Engineering_Optimization/olinkdb.xml
    [echo] target.filename=file:///C:/workspace/build/Engineering_Optimization/target.db

    Saxon output clip:

    [java] Stripping NS from DocBook 5/NG document.
    [java] Processing stripped document.
    [java] Writing target.db for book(Engineering_Optimization)
    [java] resolveURI(file:///C:/workspace/build/Engineering_Optimization/olink
    db.xml)
    [java] Resolved URI: file:///C:/workspace/build/Engineering_Optimization/ol
    inkdb.xml
    [java] file:/C:/workspace/build/Engineering_Optimization/olinkdb.xml
    [java] resolveSystem(file:/C:/workspace/build/Engineering_Optimization/targ
    et.db)
    [java] resolveSystem(http://www.w3.org/TR/html4/loose.dtd)
    [java] resolvePublic(-//W3C//DTD HTML 4.01 Transitional//EN,http://www.w3.o
    rg/TR/html4/loose.dtd)
    [java] Error on line 31 column 3 of http://www.w3.org/TR/html4/loose.dtd:
    [java] Error reported by XML parser: The declaration for the entity "HTML
    .Version" must end with '>'.
    [java] Error on line 8 column 24 of file:/C:/workspace/build/Engineering_Op
    timization/olinkdb.xml:
    [java] Error reported by XML parser: Error attempting to parse XML file (
    href='target.db').
    [java] resolveURI()
    [java] Recoverable error
    [java] Resolved URI:
    [java] org.xml.sax.SAXParseException: Error attempting to parse XML file (h
    ref='target.db').
    [java] file:/C:/Program%20Files/docbook-xsl/docbook-xsl-1.71.0/html/pro
    file-docbook.xsl
    [java] Olink error: could not open target database 'file:///C:/workspace/bu
    ild/Engineering_Optimization/olinkdb.xml'.
    [java] Error: unresolved olink: targetdoc/targetptr = 'self/HW1_Appendix'.

    olinkdb.xml (in the same dir as the xml files)


    <targetset>
    <sitemap>

    <document targetdoc="self">
    <include
    xmlns="http://www.w3.org/2001/XInclude"
    href="target.db"/>
    </document>

    </sitemap>
    </targetset>

    On 9/18/06, Jirka Kosek <jirka@kosek.cz> wrote:
    > Chris Chiasson wrote:
    >
    > > I guess the stylesheet calls for target.xml and the catalog says, no
    > > problem, that's right next to you - here's the URL. How does one make
    > > it use the target database catalog in the folder next to my xml files
    > > instead of next to the docbook stylesheets.
    >
    > The problem here is that for DBv5 documents stylesheets create temporary
    > document with stripped out namespace. This temporary document doesn't
    > have address, it is just temporal in-memory representation. It seems
    > that for such documents Saxon assumes that their base URI is same as of
    > stylesheet.
    >
    > If you will try olink with DBv4 content, you will see that olink target
    > database is read from the same directory as document processed.
    >
    > It is pain, I will try think about way how to fix it, but meanwhile you
    > must specify location of target database as an absolute URI.
    >
    > Jirka
    >
    > --
    > ------------------------------------------------------------------
    > Jirka Kosek e-mail: jirka@kosek.cz http://www.kosek.cz
    > ------------------------------------------------------------------
    > Profesionální školení a poradenství v oblasti technologií XML.
    > Podívejte se na náš nove spuštený web http://DocBook.cz
    > Podrobný prehled školení http://xmlguru.cz/skoleni/
    > ------------------------------------------------------------------
    > Nejbližší termíny školení:
    > ** XSLT 23.-26.10.2006 ** XML schémata 13.-15.11.2006 **
    > ** DocBook 11.-13.12.2006 ** XSL-FO 11.-12.12.2006 **
    > ------------------------------------------------------------------
    > http://xmlguru.cz Blog mostly about XML for English readers
    > ------------------------------------------------------------------
    >
    >
    >
    >


    --
    http://chris.chiasson.name/