Menu

Working with docbook 5 sources

Anonymous
2016-06-02
2016-06-06
  • Anonymous

    Anonymous - 2016-06-02

    After running daps on DocBook 5 sources getting the error
    ERROR: Could not determine the DocBook stylesheet location by resolving "http://docbook.sourceforge.net/release/xsl-ns/current/" via xmlcatalog

    This URL looks perfectly valid, so what could be the problem?
    I'm on openSUSE Leap (42.1) with daps-2.1.5 and did not have this problem with Tumbleweed with an older version of daps (in Dec 2015).

    Since i don't have the problem with an auto-generated document from daps-init, i tried to find a minimal variation causing the problem: I found this be caused by just adding

      xmlns="http://docbook.org/ns/docbook" version="5.0"
    

    to the

     
    • Frank Sundermeyer

      Not sure if DocBook5 requires

       xmlns="http://docbook.org/ns/docbook" version="5.0"
      

      to be declared in the root element of an XML file, but at least DAPS does. There is no easy way to determine whether a DocBook document is version 4 or version 5 (however, DAPS needs to know in order to apply the correct stylesheets). So what DAPS is doing, is to look for this namespace declaration - if it is there, version 5 is assumed.

      Does this answer your question (I am not sure whether I correctly understood your problem)?

       

      Last edit: Frank Sundermeyer 2016-06-02
    • Thomas Schraitle

      Ok, here is another try. :-)

      Try the following:

      1. Check if the following command returns without errors:

        $ xmlcatalog /etc/xml/catalog "http://docbook.sourceforge.net/release/xsl-ns/current/"
        
      2. If you get an error, install the docbook5-xsl-stylesheets package.

       

      Last edit: Thomas Schraitle 2016-06-03
      • Anonymous

        Anonymous - 2016-06-03

        Thanks, this is a good suggestion.
        It looks I have to learn about XML catalogs.

        $ rpm -q docbook5-xsl-stylesheets
        docbook5-xsl-stylesheets-1.78.1-10.6.noarch
        
        $ xmlcatalog /etc/xml/catalog "http://docbook.sourceforge.net/release/xsl/current/"
        file:///usr/share/xml/docbook/stylesheet/nwalsh/current/
        
        $ xmlcatalog /etc/xml/catalog "http://docbook.sourceforge.net/release/xsl-ns/current/"
        No entry for SYSTEM http://docbook.sourceforge.net/release/xsl-ns/current/                                       
        No entry for URI http://docbook.sourceforge.net/release/xsl-ns/current/
        

        This is confusing since /etc/xml contains proper catalog files stemming from various packages liek sgml-skel,
        docbook_4, docbook_5, docbook-xsl-stylesheets, docbook5-xsl-stylesheets, suse-xsl-stylesheets and daps.
        Particularily in /etc/xml/docbook5-xsl-stylesheets.xml i see seemingly proper entries with -ns like

        <catalog xmlns="urn:oasis:names:tc:entity:xmlns:xml:catalog">
          <rewriteSystem systemIdStartString="http://docbook.sourceforge.net/release/xsl-ns/1.78.1" rewritePrefix="file:///usr/share/xml/docbook/stylesheet/nwalsh5/1.78.1"/>
          <rewriteURI uriStartString="http://docbook.sourceforge.net/release/xsl-ns/1.78.1" rewritePrefix="file:///usr/share/xml/docbook/stylesheet/nwalsh5/1.78.1"/>
        
         
        • Frank Sundermeyer

          Hi,

          works for me on Leap 42.1. Looks like your catalog files are broken. Could you please attach the following files:

          • /etc/xml/catalog
          • /etc/xml/suse-catalog.xml
          • /etc/xml/docbook5-xsl-stylesheets.xml

          plus, if existing, any .rpmsave/.rpmorig versions of these files.

          We are also owning the DocBook packages, so we are very interested in finding out what caused the error in the catalogs (I do not assume that you edited them manually).

          How did you install Leap? A fresh installation or an update from a previous openSUSE version (which)?

          Thanks,
          Frank

           
          • Anonymous

            Anonymous - 2016-06-03

            Could you please attach the following files:

            Ok, i just conserved my whole /etc/xml and send you attached as TBZ.

            How did you install Leap?

            This is a fresh and recent installation from October 2015.
            Catalogs were never edited manually and there are no .rpmsave/.rpmorig files.

            The original daps installation happened in March and already had three errors, due to missing 'edit-xml-catalog' according to /var/log/zypp/history, like e.g.

            # 2016-03-11 11:56:22 daps-2.1.2-10.9.noarch.rpm installed ok
            # Additional rpm output:
            # /var/tmp/rpm-tmp.CVfjc8: line 13: edit-xml-catalog: command not found
            2016-03-11 11:56:22|install|daps|2.1.2-10.9|noarch|root@linux-3si3|repo-oss|c286ca52086a8c0e867b22f0ea776bd8851a9d84|
            
             
            • Anonymous

              Anonymous - 2016-06-03

              The original daps installation happened in March and already had three errors, due to missing 'edit-xml-catalog' according to /var/log/zypp/history, ...

              /usr/bin/edit-xml-catalog is provided by package sgml-skel.
              When installing daps the edit-xml-catalog command is used before sgml-skel gets installed. Hence I'd say there is just a problem with package dependency definitions.

              Pardon for spamming with duplicated posts, the sourceforge site did not show them after posting, so i thought they were lost (like it happened with another post before).

               
              • Thomas Schraitle

                /usr/bin/edit-xml-catalog is provided by package sgml-skel.

                Yes, that's correct.

                When installing daps the edit-xml-catalog command is used before sgml-skel gets installed. Hence I'd say there is just a problem with package dependency definitions.

                Hmn... however the daps.spec file contains a PreReq: sgml-skel line. So the dependency should be there.

                 
              • Stefan Knorr

                Stefan Knorr - 2016-06-03

                Pardon for spamming with duplicated posts, the sourceforge site did not show them after posting

                This forum is moderated -- one of Thomas, Frank, or me has to moderate your post in. I've deleted the dupes now.

                 

                Last edit: Stefan Knorr 2016-06-03
              • Frank Sundermeyer

                Hi,

                a few more questions to make it easier for me to find out what happened:

                Did you install DocBook5 and the DocBook5 stylesheets during the installation, or later?
                Did you install it separately from DAPS or were these packages pulled in during the DAPS installation?
                If installed separately, was DocBook4 and/or DAPS already installed?

                Thanks,
                Frank

                 
                • Anonymous

                  Anonymous - 2016-06-03

                  I thought again about my system installation and found that it has taken place at march 11th.
                  But when looking at my /var/log/zypp/history i find an initial 'burst' of log entries spanning 8 minutes at 2015-10-29, which is the initial installation procedure.
                  The timestamp is misleading, i gues it is the Leap packaging date (release was at Nov 4th): Next entries commence not before 2016-03-11 which is the correct timestamp of the installation.

                  Later at this date I did an install of daps-2.1.2 (and gcc and others, totally 39 packages) from zypper which did not pull any docbook packages and resulted in a /usr/bin/edit-xml-catalog: No such file or directory
                  Only after that I also installed docbook_5 (and many others).
                  Interestingly according to the history file installation of sgml-skel does not happen before 2016-05-25, triggered by a yast command.

                  Since the initial log burst also contains "|remove|" entries I interpreted that for a while as a downgrading installation of an original (cloned to a new disk) tumbleweed installation to openSUSE 42.1 Leap, but i think this is not the case: The version of the removed packages is the same as the corresponding "|install|" entry in that burst.

                  Hence it seems to be a fresh install.

                  Thanks for your help
                  Stefan

                   
            • Frank Sundermeyer

              Hi,

              all catalog entries for DocBook5 and the DocBook5 stylesheets are missing in /etc/xml/suse-catalog.xml (the DAPS entries are there). Looks like something went really wrong during the installation. I will try to find out what.

              To fix your catalog, please reinstall the DocBook 5 packages:

              sudo zypper in -f docbook5-xsl-stylesheets docbook_5
              

              This will hopefully add the missing entries (make sure, sgml-skel is installed).
              To test whether this has fixed the issue, rerun the xmlcatalog command from a few posts above.

              If that does not fix it, please let us know and add the catalogs snippets manually:

              edit-xml-catalog --group --catalog /etc/xml/suse-catalog.xml \
                --add /etc/xml/for-catalog-docbook_5-5.1CR3.xml
               edit-xml-catalog --group --catalog /etc/xml/suse-catalog.xml \
                 --add /etc/xml/for-catalog-docbook5-xsl-stylesheets-1.78.1.xml
              

              Bye,
              Frank

               
              • Stefan Quandt

                Stefan Quandt - 2016-06-06

                To fix your catalog, please reinstall the DocBook 5 packages:
                This indeed resolves my catalog problems.
                An attempt to build PDF from a simple DocBook5 XML gave me several java.lang.NoClassDefFoundError: errors though, I had to install additional packages xmlgraphics-common xmlgraphics-batik apache-commons-io avalon-framework to resolve these.

                 
  • Thomas Schraitle

    Hi,

    thanks for the report! Maybe check first what is your version and where it came from. You can do that with rpm:

    $ rpm -qi daps
    Name        : daps
    Version     : 2.1.5
    [...]
    Distribution: Documentation:Tools / openSUSE_Leap_42.1
    

    If you version is older than 2.1.5 or from a different repository, upgrade daps from the Documentation:Tools repository and try again.

    Hope this helps.

     
    • Frank Sundermeyer

      Just look at the original post - it's daps 2.1.5

       

Anonymous
Anonymous

Add attachments
Cancel





Want the latest updates on software, tech news, and AI?
Get latest updates about software, tech news, and AI from SourceForge directly in your inbox once a month.