docbook-apps

  • 1.  Catalogs

    Posted 10-13-2008 14:12
    Good afternoon all,

    I am trying to write a catalog file for my DocBook processing so all the
    paths that I need are in one place. At the moment I have limited success.

    I have pretty much lifted the Catalog file from
    'Example DocBook catalog file' -
    http://www.sagehill.net/docbookxsl/ExampleCatalog.htmland I have got the
    system to find my customisation stylesheet in the correct location.

    However when my file then tries to import the Docbook XSL file, it does it
    with the same path location as it did when it found my customisation, even
    though in my catalog I have a different path for this file.

    I am using xsltproc to produce my FO file, the command I am using is:

    XML_CATALOG_FILES="catalog.xml" xsltproc -o output.fo cpsltdonline.xsl
    c815ea1d111988cfc9e630e7feb3b6a6.xml

    If i re-run this command using fo-docbook.xsl instead it works perfectly and
    I get the FO, trouble is that it is not what I want. I have appened the
    Catalog file to the end of this email.

    Thanks, Russell




    PUBLIC "-//OASIS/DTD Entity Resolution XML Catalog V1.0//EN"
    "http://www.oasis-open.org/committees/entity/release/1.0/catalog.dtd">

    <catalog xmlns="urn:oasis:names:tc:entity:xmlns:xml:catalog">


    <group xml:base="file:///home/russells/workspace/cpsltdonline/docbook/">
    <uri name="cpsltdonline.xsl"
    uri="custom/cpsltdonline.xsl" />

    <uri
    name="cpsltdonline-order.xsl"
    uri="styles/cpsltdonline-order.xsl" />
    </group>


    <group xml:base="file:///usr/share/xml/">


    <rewriteSystem
    systemIdStartString="http://www.oasis-open.org/docbook/xml/4.5/"
    rewritePrefix="docbook/schema/dtd/4.5/" />


    <rewriteURI
    uriStartString="http://docbook.sourceforge.net/release/xsl/current/"
    rewritePrefix="docbook-xsl-1.73.1/" />




    <system
    systemId="docbook.dtd"
    uri="docbook/schema/dtd/4.5/docbookx.dtd" />


    <uri
    name="fo-docbook.xsl"
    uri="docbook/stylesheet/nwalsh/fo/docbook.xsl" />


    </group>


    </catalog>



  • 2.  Re: [docbook-apps] Catalogs

    Posted 10-13-2008 15:08
    Russell

    I struggled with that also. Here what I found worked best for me. I used a relative path (mostly) instead of a fixed one. I also needed this to work for Windows and Linux so I structured it so that I would only adjust the base dir. Here is mine:

    Regards,
    Dean Nelson


    "http://www.oasis-open.org/committees/entity/release/1.0/catalog.dtd" [




    ]>


    <catalog prefer="public" xmlns="urn:oasis:names:tc:entity:xmlns:xml:catalog">

    <group xml:base="&BASE_DIR;">


    publicId="-//OASIS//DTD DocBook XML V4.4//EN" uri="doctools/&DB_VER;/docbookx.dtd"/>
    <public publicId="-//W3C//DTD MathML 2.0//EN" uri="doctools/MathML2/mathml2.dtd"/>

    <rewriteSystem systemIdStartString="http://www.oasis-open.org/docbook/xml/4.4/" rewritePrefix="doctools/&DB_VER;/"/>
    <rewriteSystem systemIdStartString="http://www.docbook.org/xml/4.4/" rewritePrefix="doctools/&DB_VER;/"/>
    <rewriteSystem systemIdStartString="http://www.docbook.org/xml/4.5/" rewritePrefix="doctools/&DB_VER;/"/>
    <rewriteSystem systemIdStartString="http://www.w3.org/TR/MathML2/dtd/" rewritePrefix="doctools/&MATHML_VER;/"/>

    <rewriteURI uriStartString="http://docbook.sourceforge.net/release/xsl/current/" rewritePrefix="doctools/&XSL_VER;/"/>
    <rewriteURI uriStartString="http://docbook.sourceforge.net/release/slides/current/" rewritePrefix="doctools/&SLIDES_VER;/"/>
    <rewriteURI uriStartString="http://docbook.sourceforge.net/release/slides/" rewritePrefix="doctools/&SLIDES_VER;/"/>

    <uri name="html-docbook.xsl" uri="doctools/&XSL_VER;/html/docbook.xsl"/>
    <uri name="chunk.xsl" uri="doctools/&XSL_VER;/html/chunk.xsl"/>
    <uri name="fo-docbook.xsl" uri="doctools/&XSL_VER;/fo/docbook.xsl"/>
    </group>


    <nextCatalog catalog="file:///../../doctools/&DB_VER;/catalog.xml"/>
    </catalog>



    In a message dated 10/13/08 07:12:20 Pacific Daylight Time, russell.seymour@turtlesystems.co.uk writes:
    Good afternoon all,

    I am trying to write a catalog file for my DocBook processing so all the paths that I need are in one place. At the moment I have limited success.

    I have pretty much lifted the Catalog file from

    'Example DocBook catalog file' - http://www.sagehill.net/docbookxsl/ExampleCatalog.html
    and I have got the system to find my customisation stylesheet in the correct location.

    However when my file then tries to import the Docbook XSL file, it does it with the same path location as it did when it found my customisation, even though in my catalog I have a different path for this file.

    I am using xsltproc to produce my FO file, the command I am using is:

    XML_CATALOG_FILES="catalog.xml" xsltproc -o output.fo cpsltdonline.xsl c815ea1d111988cfc9e630e7feb3b6a6.xml

    If i re-run this command using fo-docbook.xsl instead it works perfectly and I get the FO, trouble is that it is not what I want. I have appened the Catalog file to the end of this email.

    Thanks, Russell




    PUBLIC "-//OASIS/DTD Entity Resolution XML Catalog V1.0//EN"
    "http://www.oasis-open.org/committees/entity/release/1.0/catalog.dtd">

    <catalog xmlns="urn:oasis:names:tc:entity:xmlns:xml:catalog">


    <group xml:base="file:///home/russells/workspace/cpsltdonline/docbook/">
    <uri name="cpsltdonline.xsl"
    uri="custom/cpsltdonline.xsl" />

    <uri
    name="cpsltdonline-order.xsl"
    uri="styles/cpsltdonline-order.xsl" />
    </group>


    <group xml:base="file:///usr/share/xml/">


    <rewriteSystem
    systemIdStartString="http://www.oasis-open.org/docbook/xml/4.5/"
    rewritePrefix="docbook/schema/dtd/4.5/" />


    <rewriteURI
    uriStartString="http://docbook.sourceforge.net/release/xsl/current/"
    rewritePrefix="docbook-xsl-1.73.1/" />




    <system
    systemId="docbook.dtd"
    uri="docbook/schema/dtd/4.5/docbookx.dtd" />


    <uri
    name="fo-docbook.xsl"
    uri="docbook/stylesheet/nwalsh/fo/docbook.xsl" />


    </group>


    </catalog>



  • 3.  Re: [docbook-apps] Catalogs

    Posted 10-13-2008 15:31
    Dean,

    Thanks very much for this pointer, I think I will have do something as you
    have done and come up with a hybrid solution.

    I think this is going to be very quick question, but when I put entities in
    my file and then process it with xsltproc it is not expanding them out, so
    none of my files are being found. I am using Linux. Any ideas?

    Thanks again, Russell


    2008/10/13 DeanNelson <deannelson@aol.com>

    > Russell
    >
    > I struggled with that also. Here what I found worked best for me. I used a
    > relative path (mostly) instead of a fixed one. I also needed this to work
    > for Windows and Linux so I structured it so that I would only adjust the
    > base dir. Here is mine:
    >
    > Regards,
    > Dean Nelson
    >
    >
    > > xml version=*"1.0"* encoding=*"UTF-8"*?>
    >
    > > DOCTYPE catalog PUBLIC "-//OASIS/DTD Entity Resolution XML Catalog
    > V1.0//EN"
    >
    > "http://www.oasis-open.org/committees/entity/release/1.0/catalog.dtd" [
    >
    >
    >
    >
    >
    >
    >
    >
    >
    > ]
    > >
    >
    >
    >
    >
    >
    > <
    > catalog prefer=*"public"* xmlns=*
    > "urn:oasis:names:tc:entity:xmlns:xml:catalog"*>
    >
    >
    >
    > <group xml:base=*"&BASE_DIR;"*>
    >
    >
    >
    >
    >
    > publicId=*"-//OASIS//DTD DocBook XML V4.4//EN"* uri=*
    > "doctools/&DB_VER;/docbookx.dtd"*/>
    >
    > <public publicId=*"-//W3C//DTD MathML 2.0//EN"* uri=*
    > "doctools/MathML2/mathml2.dtd"*/>
    >
    >
    >
    > <rewriteSystem systemIdStartString=*"
    > http://www.oasis-open.org/docbook/xml/4.4/"* rewritePrefix=*
    > "doctools/&DB_VER;/"*/>
    >
    > <rewriteSystem systemIdStartString=*"http://www.docbook.org/xml/4.4/"*
    > rewritePrefix=*"doctools/&DB_VER;/"*/>
    >
    > <rewriteSystem systemIdStartString=*"http://www.docbook.org/xml/4.5/"*
    > rewritePrefix=*"doctools/&DB_VER;/"*/>
    >
    > <rewriteSystem systemIdStartString=*"http://www.w3.org/TR/MathML2/dtd/"*
    > rewritePrefix=*"doctools/&MATHML_VER;/"*/>
    >
    >
    >
    > <rewriteURI uriStartString=*"
    > http://docbook.sourceforge.net/release/xsl/current/"* rewritePrefix=*
    > "doctools/&XSL_VER;/"*/>
    >
    > <rewriteURI uriStartString=*"
    > http://docbook.sourceforge.net/release/slides/current/"* rewritePrefix=*
    > "doctools/&SLIDES_VER;/"*/>
    >
    > <rewriteURI uriStartString=*"
    > http://docbook.sourceforge.net/release/slides/"* rewritePrefix=*
    > "doctools/&SLIDES_VER;/"*/>
    >
    >
    >
    > <uri name=*"html-docbook.xsl"* uri=*"doctools/&XSL_VER;/html/docbook.xsl"*
    > />
    >
    > <uri name=*"chunk.xsl"* uri=*"doctools/&XSL_VER;/html/chunk.xsl"*/>
    >
    > <uri name=*"fo-docbook.xsl"* uri=*"doctools/&XSL_VER;/fo/docbook.xsl"*/>
    >
    > </group>
    >
    >
    >
    >
    >
    > <nextCatalog catalog=*"file:///../../doctools/&DB_VER;/catalog.xml"*/>
    >
    > > catalog>
    >
    >
    >
    > In a message dated 10/13/08 07:12:20 Pacific Daylight Time,
    > russell.seymour@turtlesystems.co.uk writes:
    >
    > Good afternoon all,
    >
    > I am trying to write a catalog file for my DocBook processing so all the
    > paths that I need are in one place. At the moment I have limited success.
    >
    > I have pretty much lifted the Catalog file from
    > 'Example DocBook catalog file' -
    > http://www.sagehill.net/docbookxsl/ExampleCatalog.htmland I have got the
    > system to find my customisation stylesheet in the correct location.
    >
    > However when my file then tries to import the Docbook XSL file, it does it
    > with the same path location as it did when it found my customisation, even
    > though in my catalog I have a different path for this file.
    >
    > I am using xsltproc to produce my FO file, the command I am using is:
    >
    > XML_CATALOG_FILES="catalog.xml" xsltproc -o output.fo cpsltdonline.xsl
    > c815ea1d111988cfc9e630e7feb3b6a6.xml
    >
    > If i re-run this command using fo-docbook.xsl instead it works perfectly
    > and I get the FO, trouble is that it is not what I want. I have appened the
    > Catalog file to the end of this email.
    >
    > Thanks, Russell
    >
    >
    >
    >
    > > PUBLIC "-//OASIS/DTD Entity Resolution XML Catalog V1.0//EN"
    > "http://www.oasis-open.org/committees/entity/release/1.0/catalog.dtd">
    >
    > <catalog xmlns="urn:oasis:names:tc:entity:xmlns:xml:catalog">
    >
    >
    > <group
    > xml:base="file:///home/russells/workspace/cpsltdonline/docbook/">
    > <uri name="cpsltdonline.xsl"
    > uri="custom/cpsltdonline.xsl" />
    >
    > <uri
    > name="cpsltdonline-order.xsl"
    > uri="styles/cpsltdonline-order.xsl" />
    > </group>
    >
    >
    > <group xml:base="file:///usr/share/xml/">
    >
    >
    > <rewriteSystem
    > systemIdStartString="http://www.oasis-open.org/docbook/xml/4.5/"
    > rewritePrefix="docbook/schema/dtd/4.5/" />
    >
    >
    > <rewriteURI
    > uriStartString="
    > http://docbook.sourceforge.net/release/xsl/current/"
    > rewritePrefix="docbook-xsl-1.73.1/" />
    >
    >
    >
    >
    > <system
    > systemId="docbook.dtd"
    > uri="docbook/schema/dtd/4.5/docbookx.dtd" />
    >
    >
    > <uri
    > name="fo-docbook.xsl"
    > uri="docbook/stylesheet/nwalsh/fo/docbook.xsl" />
    >
    >
    > </group>
    >
    >
    > </catalog>*
    > *
    >
    >
    >



  • 4.  Re: [docbook-apps] Catalogs

    Posted 10-13-2008 15:37
    Dean,

    PLease ignore my last email, I am being thick.

    Thanks for your help..

    Russell

    2008/10/13 Russell Seymour <russell.seymour@turtlesystems.co.uk>

    > Dean,
    >
    > Thanks very much for this pointer, I think I will have do something as you
    > have done and come up with a hybrid solution.
    >
    > I think this is going to be very quick question, but when I put entities in
    > my file and then process it with xsltproc it is not expanding them out, so
    > none of my files are being found. I am using Linux. Any ideas?
    >
    > Thanks again, Russell
    >
    >
    > 2008/10/13 DeanNelson <deannelson@aol.com>
    >
    > Russell
    >>
    >> I struggled with that also. Here what I found worked best for me. I used a
    >> relative path (mostly) instead of a fixed one. I also needed this to work
    >> for Windows and Linux so I structured it so that I would only adjust the
    >> base dir. Here is mine:
    >>
    >> Regards,
    >> Dean Nelson
    >>
    >>
    >> >> xml version=*"1.0"* encoding=*"UTF-8"*?>
    >>
    >> >> DOCTYPE catalog PUBLIC "-//OASIS/DTD Entity Resolution XML Catalog
    >> V1.0//EN"
    >>
    >> "http://www.oasis-open.org/committees/entity/release/1.0/catalog.dtd" [
    >>
    >>
    >>
    >>
    >>
    >>
    >>
    >>
    >>
    >> ]
    >> >
    >>
    >>
    >>
    >>
    >>
    >> <
    >> catalog prefer=*"public"* xmlns=*
    >> "urn:oasis:names:tc:entity:xmlns:xml:catalog"*>
    >>
    >>
    >>
    >> <group xml:base=*"&BASE_DIR;"*>
    >>
    >>
    >>
    >>
    >>
    >> publicId=*"-//OASIS//DTD DocBook XML V4.4//EN"* uri=*
    >> "doctools/&DB_VER;/docbookx.dtd"*/>
    >>
    >> <public publicId=*"-//W3C//DTD MathML 2.0//EN"* uri=*
    >> "doctools/MathML2/mathml2.dtd"*/>
    >>
    >>
    >>
    >> <rewriteSystem systemIdStartString=*"
    >> http://www.oasis-open.org/docbook/xml/4.4/"* rewritePrefix=*
    >> "doctools/&DB_VER;/"*/>
    >>
    >> <rewriteSystem systemIdStartString=*"http://www.docbook.org/xml/4.4/"*
    >> rewritePrefix=*"doctools/&DB_VER;/"*/>
    >>
    >> <rewriteSystem systemIdStartString=*"http://www.docbook.org/xml/4.5/"*
    >> rewritePrefix=*"doctools/&DB_VER;/"*/>
    >>
    >> <rewriteSystem systemIdStartString=*"http://www.w3.org/TR/MathML2/dtd/"*
    >> rewritePrefix=*"doctools/&MATHML_VER;/"*/>
    >>
    >>
    >>
    >> <rewriteURI uriStartString=*"
    >> http://docbook.sourceforge.net/release/xsl/current/"* rewritePrefix=*
    >> "doctools/&XSL_VER;/"*/>
    >>
    >> <rewriteURI uriStartString=*"
    >> http://docbook.sourceforge.net/release/slides/current/"* rewritePrefix=*
    >> "doctools/&SLIDES_VER;/"*/>
    >>
    >> <rewriteURI uriStartString=*"
    >> http://docbook.sourceforge.net/release/slides/"* rewritePrefix=*
    >> "doctools/&SLIDES_VER;/"*/>
    >>
    >>
    >>
    >> <uri name=*"html-docbook.xsl"* uri=*"doctools/&XSL_VER;/html/docbook.xsl"
    >> */>
    >>
    >> <uri name=*"chunk.xsl"* uri=*"doctools/&XSL_VER;/html/chunk.xsl"*/>
    >>
    >> <uri name=*"fo-docbook.xsl"* uri=*"doctools/&XSL_VER;/fo/docbook.xsl"*/>
    >>
    >> </group>
    >>
    >>
    >>
    >>
    >>
    >> <nextCatalog catalog=*"file:///../../doctools/&DB_VER;/catalog.xml"*/>
    >>
    >> >> catalog>
    >>
    >>
    >>
    >> In a message dated 10/13/08 07:12:20 Pacific Daylight Time,
    >> russell.seymour@turtlesystems.co.uk writes:
    >>
    >> Good afternoon all,
    >>
    >> I am trying to write a catalog file for my DocBook processing so all the
    >> paths that I need are in one place. At the moment I have limited success.
    >>
    >> I have pretty much lifted the Catalog file from
    >> 'Example DocBook catalog file' -
    >> http://www.sagehill.net/docbookxsl/ExampleCatalog.html and I have got the
    >> system to find my customisation stylesheet in the correct location.
    >>
    >> However when my file then tries to import the Docbook XSL file, it does
    >> it with the same path location as it did when it found my customisation,
    >> even though in my catalog I have a different path for this file.
    >>
    >> I am using xsltproc to produce my FO file, the command I am using is:
    >>
    >> XML_CATALOG_FILES="catalog.xml" xsltproc -o output.focpsltdonline.xsl c815ea1d111988cfc9e630e7feb3b6a6.xml
    >>
    >> If i re-run this command using fo-docbook.xsl instead it works perfectly
    >> and I get the FO, trouble is that it is not what I want. I have appened the
    >> Catalog file to the end of this email.
    >>
    >> Thanks, Russell
    >>
    >>
    >>
    >>
    >> >> PUBLIC "-//OASIS/DTD Entity Resolution XML Catalog V1.0//EN"
    >> "http://www.oasis-open.org/committees/entity/release/1.0/catalog.dtd">
    >>
    >> <catalog xmlns="urn:oasis:names:tc:entity:xmlns:xml:catalog">
    >>
    >>
    >> <group
    >> xml:base="file:///home/russells/workspace/cpsltdonline/docbook/">
    >> <uri name="cpsltdonline.xsl"
    >> uri="custom/cpsltdonline.xsl" />
    >>
    >> <uri
    >> name="cpsltdonline-order.xsl"
    >> uri="styles/cpsltdonline-order.xsl" />
    >> </group>
    >>
    >>
    >> <group xml:base="file:///usr/share/xml/">
    >>
    >>
    >> <rewriteSystem
    >> systemIdStartString="http://www.oasis-open.org/docbook/xml/4.5/"
    >> rewritePrefix="docbook/schema/dtd/4.5/" />
    >>
    >>
    >> <rewriteURI
    >> uriStartString="
    >> http://docbook.sourceforge.net/release/xsl/current/"
    >> rewritePrefix="docbook-xsl-1.73.1/" />
    >>
    >>
    >>
    >>
    >> <system
    >> systemId="docbook.dtd"
    >> uri="docbook/schema/dtd/4.5/docbookx.dtd" />
    >>
    >>
    >> <uri
    >> name="fo-docbook.xsl"
    >> uri="docbook/stylesheet/nwalsh/fo/docbook.xsl" />
    >>
    >>
    >> </group>
    >>
    >>
    >> </catalog>*
    >> *
    >>
    >>
    >>
    >
    >