Class PackageVersionRanges

java.lang.Object
net.sf.saxon.style.PackageVersionRanges

public class PackageVersionRanges extends Object
A class to handle a set of package version ranges

This implements the semantics given in http://www.w3.org/TR/xslt-30/#package-versions, where a comma-separated sequence of package-version ranges are declared as one of:

  • '*' - any version
  • package-version - an exact match
  • package-version'.*' - any package whose version starts with the given prefix
  • package-version'+' - any package whose version orders equal or later than the given version
  • 'to 'package-version - any package whose version orders equal or earlier than the given version
  • package-version' to 'package-version - any package whose version orders equal to or between the given versions
  • Constructor Details

  • Method Details

    • contains

      public boolean contains(PackageVersion version)
      Test whether a given package version lies within any of the ranges described in this PackageVersionRanges
      Parameters:
      version - The version to be checked
      Returns:
      true if the version is contained in any of the ranges, false otherwise
    • toString

      public String toString()
      Overrides:
      toString in class Object