Package net.sf.saxon.trans
Class Err
- java.lang.Object
-
- net.sf.saxon.trans.Err
-
public class Err extends Object
Class containing utility methods for handling error messages
-
-
Constructor Summary
Constructors Constructor Description Err()
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static String
abbreviateEQName(String eqName)
static String
abbreviateURI(String uri)
Abbreviate a URI for use in error messagesstatic String
abbreviateURI(NamespaceUri uri)
static String
depict(Item item)
Create a string representation of an item for use in an error messagestatic String
depictCodepoint(int cp)
static CharSequence
depictSequence(Sequence seq)
static String
depictSequenceStart(SequenceIterator seq, int max, int actual)
static String
describeGenre(Genre genre)
static String
describeVisibility(Visibility vis)
static String
indefiniteArticleFor(String s, boolean caps)
static String
show(Location loc)
static UnicodeString
truncate30(UnicodeString cs)
static String
wrap(String cs)
Add delimiters to represent variable information within an error messagestatic String
wrap(String cs, int valueType)
Add delimiters to represent variable information within an error messagestatic String
wrap(Expression exp)
static String
wrap(UnicodeString cs)
Add delimiters to represent variable information within an error messagestatic String
wrap(UnicodeString cs, int valueType)
Add delimiters to represent variable information within an error message
-
-
-
Field Detail
-
ELEMENT
public static final int ELEMENT
- See Also:
- Constant Field Values
-
ATTRIBUTE
public static final int ATTRIBUTE
- See Also:
- Constant Field Values
-
FUNCTION
public static final int FUNCTION
- See Also:
- Constant Field Values
-
VALUE
public static final int VALUE
- See Also:
- Constant Field Values
-
VARIABLE
public static final int VARIABLE
- See Also:
- Constant Field Values
-
GENERAL
public static final int GENERAL
- See Also:
- Constant Field Values
-
URI
public static final int URI
- See Also:
- Constant Field Values
-
EQNAME
public static final int EQNAME
- See Also:
- Constant Field Values
-
-
Method Detail
-
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 delimitedvalueType
- 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)
-
wrap
public static String wrap(Expression exp)
-
describeVisibility
public static String describeVisibility(Visibility vis)
-
-