Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

provide backward compatibility for system identifier change #201

Open
petere opened this issue Jul 18, 2020 · 2 comments
Open

provide backward compatibility for system identifier change #201

petere opened this issue Jul 18, 2020 · 2 comments

Comments

@petere
Copy link
Contributor

petere commented Jul 18, 2020

In docbook-xsl 1.79.2, the system identifier was changed from

 http://docbook.sourceforge.net/release/xsl/current/...

to

 http://cdn.docbook.org/release/xsl/current/...

However, this was done in a backward-incompatible way. So now, in your customization layer or build system, you have to pick one of these URLs, and users who have a different docbook-xsl version installed locally will suffer, either because the stylesheets have to be fetched from a remote server, or the build will fail entirely.

This didn't use to be a real problem in practice because 1.79.2 saw very little adoption, but it's now trickling into various distributions and packagings, and it's becoming a real source of frequent build problems.

This should be fixed by making the supplied catalog files include backward-compatible mappings. For example, the currently built catalog file

<?xml version="1.0" encoding="utf-8"?>
<catalog xmlns="urn:oasis:names:tc:entity:xmlns:xml:catalog">
  <!-- XML Catalog file for DocBook XSL Stylesheets vsnapshot -->
  <rewriteURI uriStartString="https://cdn.docbook.org/release/xsl/current/" rewritePrefix="./"/>
  <rewriteSystem systemIdStartString="https://cdn.docbook.org/release/xsl/current/" rewritePrefix="./"/>
  <rewriteURI uriStartString="https://cdn.docbook.org/release/xsl/snapshot/" rewritePrefix="./"/>
  <rewriteSystem systemIdStartString="https://cdn.docbook.org/release/xsl/snapshot/" rewritePrefix="./"/>
</catalog>

could be expanded to contain the old URI as well, like:

<?xml version="1.0" encoding="utf-8"?>
<catalog xmlns="urn:oasis:names:tc:entity:xmlns:xml:catalog">
  <!-- XML Catalog file for DocBook XSL Stylesheets vsnapshot -->
  <rewriteURI uriStartString="https://cdn.docbook.org/release/xsl/current/" rewritePrefix="./"/>
  <rewriteSystem systemIdStartString="https://cdn.docbook.org/release/xsl/current/" rewritePrefix="./"/>
  <rewriteURI uriStartString="https://cdn.docbook.org/release/xsl/snapshot/" rewritePrefix="./"/>
  <rewriteSystem systemIdStartString="https://cdn.docbook.org/release/xsl/snapshot/" rewritePrefix="./"/>

  <rewriteURI uriStartString="http://docbook.sourceforge.net/release/xsl/current/" rewritePrefix="./"/>
  <rewriteSystem systemIdStartString="http://docbook.sourceforge.net/release/xsl/current/" rewritePrefix="./"/>
  <rewriteURI uriStartString="http://docbook.sourceforge.net/release/xsl/snapshot/" rewritePrefix="./"/>
  <rewriteSystem systemIdStartString="http://docbook.sourceforge.net/release/xsl/snapshot/" rewritePrefix="./"/>
</catalog>
@ryandesign
Copy link

In docbook-xsl 1.79.2, the system identifier was changed from

 http://docbook.sourceforge.net/release/xsl/current/...

to

 http://cdn.docbook.org/release/xsl/current/...

Be very careful! The old non-namespaced URL

http://docbook.sourceforge.net/release/xsl/current/

must map to the new non-namespaced URL

https://cdn.docbook.org/release/xsl-nons/current/

while the old namespaced URL

http://docbook.sourceforge.net/release/xsl-ns/current/

must map to the new namespaced URL

https://cdn.docbook.org/release/xsl/current/

The request to provide backward compatibility with the old URLs was already made in #65.

@ryandesign
Copy link

I also want to point out that in 1.79.2, the CDN URLs are http, not https. I don't know whether the URL matching cares about differences in protocol. If it does, then http CDN backward compatibility URLs are needed as well, now that the CDN URLs were changed to https.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants