Class Err

java.lang.Object
net.sf.saxon.trans.Err

public class Err extends Object
Class containing utility methods for handling error messages
  • Field Details

  • Constructor Details

    • Err

      public Err()
  • Method Details

    • wrap

      public static String wrap(UnicodeString cs)
      Add delimiters to represent variable information within an error message
      Parameters:
      cs - the variable information to be delimited
      Returns:
      the delimited variable information
    • wrap

      public static String wrap(String cs)
      Add delimiters to represent variable information within an error message
      Parameters:
      cs - the variable information to be delimited
      Returns:
      the delimited variable information
    • wrap

      public static String wrap(String cs, int valueType)
      Add delimiters to represent variable information within an error message
      Parameters:
      cs - the variable information to be delimited
      Returns:
      the delimited variable information
    • wrap

      public static String wrap(UnicodeString cs, int valueType)
      Add delimiters to represent variable information within an error message
      Parameters:
      cs - the variable information to be delimited
      valueType - the type of value, e.g. element name or attribute name
      Returns:
      the delimited variable information
    • depict

      public static String depict(Item item)
      Create a string representation of an item for use in an error message
    • depictCodepoint

      public static String depictCodepoint(int cp)
    • depictSequence

      public static CharSequence depictSequence(Sequence seq)
    • depictSequenceStart

      public static String depictSequenceStart(SequenceIterator seq, int max, int actual)
    • truncate30

      public static UnicodeString truncate30(UnicodeString cs)
    • abbreviateURI

      public static String abbreviateURI(String uri)
      Abbreviate a URI for use in error messages
      Parameters:
      uri - the full URI
      Returns:
      the URI, truncated at the last slash or to the last 15 characters, with a leading ellipsis, as appropriate
    • abbreviateURI

      public static String abbreviateURI(NamespaceUri uri)
    • abbreviateEQName

      public static String abbreviateEQName(String eqName)
    • wrap

      public static String wrap(Expression exp)
    • describeGenre

      public static String describeGenre(Genre genre)
    • describeVisibility

      public static String describeVisibility(Visibility vis)
    • show

      public static String show(Location loc)
    • indefiniteArticleFor

      public static String indefiniteArticleFor(String s, boolean caps)