|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.jaxen.function.NormalizeSpaceFunction
public class NormalizeSpaceFunction
4.2 string normalize-space(string)
The normalize-space function returns the argument string with whitespace normalized by stripping leading and trailing whitespace and replacing sequences of whitespace characters by a single space. Whitespace characters are the same as those allowed by the S production in XML. If the argument is omitted, it defaults to the context node converted to a string, in other words the string-value of the context node.
| Constructor Summary | |
|---|---|
NormalizeSpaceFunction()
Create a new NormalizeSpaceFunction object. |
|
| Method Summary | |
|---|---|
java.lang.Object |
call(Context context,
java.util.List args)
Returns the string-value of the first item in args
after removing all leading and trailing white space, and
replacing each other sequence of whitespace by a single space. |
static java.lang.String |
evaluate(java.lang.Object strArg,
Navigator nav)
Returns the string-value of strArg after removing
all leading and trailing white space, and
replacing each other sequence of whitespace by a single space. |
private static boolean |
isXMLSpace(char c)
|
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public NormalizeSpaceFunction()
NormalizeSpaceFunction object.
| Method Detail |
|---|
public java.lang.Object call(Context context,
java.util.List args)
throws FunctionCallException
args
after removing all leading and trailing white space, and
replacing each other sequence of whitespace by a single space.
Whitespace consists of the characters space (0x32), carriage return (0x0D),
linefeed (0x0A), and tab (0x09).
call in interface Functioncontext - the context at the point in the
expression when the function is calledargs - a list that contains exactly one item
String
FunctionCallException - if args does not have length one
public static java.lang.String evaluate(java.lang.Object strArg,
Navigator nav)
strArg after removing
all leading and trailing white space, and
replacing each other sequence of whitespace by a single space.
Whitespace consists of the characters space (0x32), carriage return (0x0D),
linefeed (0x0A), and tab (0x09).
strArg - the object whose string-value is normalizednav - the context at the point in the
expression when the function is called
private static boolean isXMLSpace(char c)
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||