net.sf.saxon.functions

Class NamePart

public class NamePart extends SystemFunction

This class supports the name(), local-name(), and namespace-uri() functions from XPath 1.0, and also the XSLT generate-id() function
Field Summary
static intDOCUMENT_URI
static intGENERATE_ID
static intLOCAL_NAME
static intNAME
static intNAMESPACE_URI
static intNODE_NAME
Method Summary
intcomputeSpecialProperties()
Determine the special properties of this expression.
ItemevaluateItem(XPathContext c)
Evaluate the function in a string context
static booleanisGenerateIdFunction(Expression exp)
Test whether an expression is a call on the generate-id() function
Expressionsimplify(ExpressionVisitor visitor)
Simplify and validate.

Field Detail

DOCUMENT_URI

public static final int DOCUMENT_URI

GENERATE_ID

public static final int GENERATE_ID

LOCAL_NAME

public static final int LOCAL_NAME

NAME

public static final int NAME

NAMESPACE_URI

public static final int NAMESPACE_URI

NODE_NAME

public static final int NODE_NAME

Method Detail

computeSpecialProperties

public int computeSpecialProperties()
Determine the special properties of this expression. The generate-id() function is a special case: it is considered creative if its operand is creative, so that generate-id(f()) is not taken out of a loop

evaluateItem

public Item evaluateItem(XPathContext c)
Evaluate the function in a string context

isGenerateIdFunction

public static boolean isGenerateIdFunction(Expression exp)
Test whether an expression is a call on the generate-id() function

Parameters: exp the expression to be tested

Returns: true if exp is a call on generate-id(), else false

simplify

public Expression simplify(ExpressionVisitor visitor)
Simplify and validate.

Parameters: visitor an expression visitor