com.sun.tdk.specdiff.config

## Class XsltUtils

- java.lang.Object
- - com.sun.tdk.specdiff.config.XsltUtils

-     public class XsltUtils
      extends java.lang.Object

  Class with a number of static functions to be used in XSLT scripts

- - ### Constructor Summary

    Constructors
    Constructor and Description
    `XsltUtils()`

  - ### Method Summary

    All Methods Static Methods Concrete Methods
    Modifier and Type | Method and Description
    --- | ---
    `static boolean` | `fileExists(java.lang.String f)` Checks if the given file exists
    `static java.lang.String` | `fixRelativeHref(java.lang.String href, java.lang.String ext, java.lang.String suffix)`
    `static java.lang.String` | `fixTarget(java.lang.String href)`
    `static java.lang.String` | `getOutputDir()`
    `static boolean` | `outputFileExists(java.lang.String f)` Checks that given file exists in the output directory.
    `static java.lang.String` | `replace(java.lang.String str, java.lang.String what, java.lang.String with)` Replaces 'what' with 'with' in the given string 'str'
    `static void` | `setOutputDir(java.lang.String dir)` Sets output directory specified for the tool.

    - ### Methods inherited from class java.lang.Object

      `clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

- - ### Constructor Detail

    - #### XsltUtils

          public XsltUtils()

  - ### Method Detail

    - #### fileExists

          public static boolean fileExists(java.lang.String f)

      Checks if the given file exists
      Parameters:
        `f` - - name of file to check
      Returns:
        true, if file exists

    - #### outputFileExists

          public static boolean outputFileExists(java.lang.String f)

      Checks that given file exists in the output directory. Output directory could be set invoking setOutputDir() method.
      Parameters:
        `f` - - path relative to the output directory.
      Returns:
        true of false

    - #### setOutputDir

          public static void setOutputDir(java.lang.String dir)

      Sets output directory specified for the tool.
      Parameters:
        `dir` -

    - #### getOutputDir

          public static java.lang.String getOutputDir()

      Returns:
        the output dir set by setOutputDir() or default one.

    - #### fixRelativeHref

          public static java.lang.String fixRelativeHref(java.lang.String href,
                                                         java.lang.String ext,
                                                         java.lang.String suffix)

    - #### fixTarget

          public static java.lang.String fixTarget(java.lang.String href)

    - #### replace

          public static java.lang.String replace(java.lang.String str,
                                                 java.lang.String what,
                                                 java.lang.String with)

      Replaces 'what' with 'with' in the given string 'str'
      Parameters:
        `str` - - string
        `what` - - substring to be replaced
        `with` - - new value
      Returns:
        updated string