https://bugzilla.novell.com/show_bug.cgi?id=856416 https://bugzilla.novell.com/show_bug.cgi?id=856416#c0 Summary: saxon6 and saxon9 do not properly resolve URIs by catalog Classification: openSUSE Product: openSUSE 13.1 Version: Final Platform: Other OS/Version: Other Status: NEW Severity: Major Priority: P5 - None Component: Other AssignedTo: mvyskocil@suse.com ReportedBy: fs@suse.com QAContact: qa-bugs@suse.de CC: jw@suse.com, thomas.schraitle@suse.com, sknorr@suse.de Found By: Documentation Blocker: --- Created an attachment (id=572641) --> (http://bugzilla.novell.com/attachment.cgi?id=572641) Stylesheet saxon6 and saxon9 do not properly resolve URIs by catalog because they do not perform the switches to delegate catalogs. Setting severity to "Major" because this error is a major issue for Documentation. This bug has the following impacts: * performance: catalog resolving is done by internet lookups * wrong results: local files and "internet files" may differ as the following example shows * lookup errors: Catalog URIs are often pseudo URIs which do not really exist. When not being able to resolve them locally, saxon will wrongly quit with a "Failure reading ..." error This error is also present on older openSUSE versions and most probably in Factory, too. The attached stylesheet extracts the version number from the URI "http://docbook.sourceforge.net/release/xsl/currRSION.xsl". This URI is supposed to resolve to file:/usr/share/xml/docbook/stylesheet/nwalsh/1.78.1/VERSION.xsl: ~> xml-resolver12 -s \ http://docbook.sourceforge.net/release/xsl/current/VERSION.xsl system Resolve SYSTEM (systemid): system id: http://docbook.sourceforge.net/release/xsl/current/VERSION.xsl Result: file:/usr/share/xml/docbook/stylesheet/nwalsh/1.78.1/VERSION.xsl If you run the following command from a directory with a CatalogManager.properties file that has verbosity=5, you see the following result (shortened): ~> saxon6 http://docbook.sourceforge.net/release/xsl/current/VERSION.xsl \ /local/svn/daps/trunk/daps/daps-xslt/common/get-dbxslt-version.xsl [...] delegateSystem: http://docbook.sourceforge.net/release/xsl/ file:///etc/xml/docbook-xsl-stylesheets.xml DELEGATE_SYSTEM: http://docbook.sourceforge.net/release/xsl/ file:/etc/xml/docbook-xsl-stylesheets.xml resolveURI(http://docbook.sourceforge.net/release/xsl/current/VERSION.xsl) Resolved URI: http://docbook.sourceforge.net/release/xsl/current/VERSION.xsl http://docbook.sourceforge.net/release/xsl/current/VERSION.xsl 1.78.1 Although the delegateSystem statement is correctly identified, saxon does _not_ switch to the delegated catalog (/etc/xml/docbook-xsl-stylesheets.xml) to resolve the URI. This becomes apparent when installing an older version of the docbook-xsl-stylesheets package. The command reports the wrong version number, because it extracts it from the file on sourceforge rather than from the local file. ~> rpm -q docbook-xsl-stylesheets docbook-xsl-stylesheets-1.77.1-4.1.1.noarch ~> xsltproc /local/svn/daps/trunk/daps/daps-xslt/common/get-dbxslt-version.xsl \ http://docbook.sourceforge.net/release/xsl/current/VERSION.xsl 1.77.1 ~> saxon6 http://docbook.sourceforge.net/release/xsl/current/VERSION.xsl \ /local/svn/daps/trunk/daps/daps-xslt/common/get-dbxslt-version.xsl 1.78.1 The same error occurs with saxon9. xml-commons-resolver12 is installed. Resolving the URI with the xml-commons-resolver works correctly, because the switch to the delegated catalog is correctly made: ~> xml-resolver12 -s \ http://docbook.sourceforge.net/release/xsl/current/VERSION.xsl system [...] delegateSystem: http://docbook.sourceforge.net/release/xsl/ file:///etc/xml/docbook-xsl-stylesheets.xml DELEGATE_SYSTEM: http://docbook.sourceforge.net/release/xsl/ file:/etc/xml/docbook-xsl-stylesheets.xml Resolve SYSTEM (systemid): system id: http://docbook.sourceforge.net/release/xsl/current/VERSION.xsl resolveSystem(http://docbook.sourceforge.net/release/xsl/current/VERSION.xsl) Switching to delegated catalog(s): file:/etc/xml/docbook-xsl-stylesheets.xml Parse catalog: file:/etc/xml/docbook-xsl-stylesheets.xml Loading catalog: file:/etc/xml/docbook-xsl-stylesheets.xml Default BASE: file:/etc/xml/docbook-xsl-stylesheets.xml rewriteSystem: http://docbook.sourceforge.net/release/xsl/1.77.1 file:///usr/share/xml/docbook/stylesheet/nwalsh/1.77.1 REWRITE_SYSTEM: http://docbook.sourceforge.net/release/xsl/1.77.1 file:/usr/share/xml/docbook/stylesheet/nwalsh/1.77.1 rewriteURI: http://docbook.sourceforge.net/release/xsl/1.77.1 file:///usr/share/xml/docbook/stylesheet/nwalsh/1.77.1 REWRITE_URI: http://docbook.sourceforge.net/release/xsl/1.77.1 file:/usr/share/xml/docbook/stylesheet/nwalsh/1.77.1 rewriteSystem: http://docbook.sourceforge.net/release/xsl/current file:///usr/share/xml/docbook/stylesheet/nwalsh/1.77.1 REWRITE_SYSTEM: http://docbook.sourceforge.net/release/xsl/current file:/usr/share/xml/docbook/stylesheet/nwalsh/1.77.1 rewriteURI: http://docbook.sourceforge.net/release/xsl/current file:///usr/share/xml/docbook/stylesheet/nwalsh/1.77.1 REWRITE_URI: http://docbook.sourceforge.net/release/xsl/current file:/usr/share/xml/docbook/stylesheet/nwalsh/1.77.1 resolveSystem(http://docbook.sourceforge.net/release/xsl/current/VERSION.xsl) Result: file:/usr/share/xml/docbook/stylesheet/nwalsh/1.77.1/VERSION.xsl The only way to make saxon6/9 correctly resolve the URI is to directly specify the catalog: ~> ADDITIONAL_FLAGS="-Dxml.catalog.files=/etc/xml/docbook-xsl-stylesheets.xml" \ saxon6 http://docbook.sourceforge.net/release/xsl/current/VERSION.xsl \ /local/svn/daps/trunk/daps/daps-xslt/common/get-dbxslt-version.xsl Parse catalog: /etc/xml/docbook-xsl-stylesheets.xml Loading catalog: /etc/xml/docbook-xsl-stylesheets.xml Default BASE: file:/etc/xml/docbook-xsl-stylesheets.xml [...] Resolved URI: http://docbook.sourceforge.net/release/xsl/current/VERSION.xsl file:/usr/share/xml/docbook/stylesheet/nwalsh/1.77.1/VERSION.xsl 1.77.1 -- Configure bugmail: https://bugzilla.novell.com/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are on the CC list for the bug.