001: package net.sf.saxon;
002:
003: /**
004: * The Version class holds the SAXON version information.
005: */
006:
007: public final class Version {
008:
009: private static final String VERSION = "8.6.1";
010: private static final String BUILD = "112212"; //mmddhh
011: private static final String RELEASE_DATE = "2005-11-24";
012:
013: private Version() {
014: // class is never instantiated
015: }
016:
017: /**
018: * Return the name of this product. Supports the XSLT 2.0 system property xsl:product-name
019: * @return the string "SAXON"
020: */
021:
022: public static final String getProductName() {
023: return "SAXON";
024: }
025:
026: /**
027: * Get the version number of the schema-aware version of the product
028: * @return the version number of this version of Saxon, as a string
029: */
030:
031: public static final String getSchemaAwareProductVersion() {
032: return "SA " + getProductVersion();
033: }
034:
035: /**
036: * Get the version number of this version of the product
037: * @return the version number of this version of Saxon, as a string
038: */
039:
040: public static final String getProductVersion() {
041: return VERSION;
042: }
043:
044: /**
045: * Get the issue date of this version of the product
046: * @return the release date, as an ISO 8601 string
047: */
048:
049: public static final String getReleaseDate() {
050: return RELEASE_DATE;
051: }
052:
053: /**
054: * Get the version of the XSLT specification that this product supports
055: * @return the string 2.0
056: */
057:
058: public static final String getXSLVersionString() {
059: return "2.0";
060: }
061:
062: /**
063: * Get a message used to identify this product when a transformation is run using the -t option
064: * @return A string containing both the product name and the product
065: * version
066: */
067:
068: public static final String getProductTitle() {
069: return getProductName() + ' ' + getProductVersion()
070: + " from Saxonica";
071: }
072:
073: /**
074: * Return a web site address containing information about the product. Supports the XSLT system property xsl:vendor-url
075: * @return the string "http://saxon.sf.net/"
076: */
077:
078: public static final String getWebSiteAddress() {
079: return "http://www.saxonica.com/";
080: }
081:
082: /**
083: * Invoking net.sf.saxon.Version from the command line outputs the build number
084: * @param args not used
085: */
086: public static void main(String[] args) {
087: System.err
088: .println(getProductTitle() + " (build " + BUILD + ')');
089: }
090: }
091:
092: //
093: // The contents of this file are subject to the Mozilla Public License Version 1.0 (the "License");
094: // you may not use this file except in compliance with the License. You may obtain a copy of the
095: // License at http://www.mozilla.org/MPL/
096: //
097: // Software distributed under the License is distributed on an "AS IS" basis,
098: // WITHOUT WARRANTY OF ANY KIND, either express or implied.
099: // See the License for the specific language governing rights and limitations under the License.
100: //
101: // The Original Code is: all this file.
102: //
103: // The Initial Developer of the Original Code is Michael H. Kay.
104: //
105: // Portions created by (your name) are Copyright (C) (your legal entity). All Rights Reserved.
106: //
107: // Contributor(s): none.
108: //
|