Standard XSLT functions. All standard functions expect the current node
and the DOM as their last two arguments.
AXIS_SUPPORT_ERR
public static final String AXIS_SUPPORT_ERR
CANT_RESOLVE_RELATIVE_URI_ERR
public static final String CANT_RESOLVE_RELATIVE_URI_ERR
DATA_CONVERSION_ERR
public static final String DATA_CONVERSION_ERR
DOM_ADAPTER_INIT_ERR
public static final String DOM_ADAPTER_INIT_ERR
EQUALITY_EXPR_ERR
public static final String EQUALITY_EXPR_ERR
ERROR_MESSAGES_KEY
public static final String ERROR_MESSAGES_KEY
EXTERNAL_FUNC_ERR
public static final String EXTERNAL_FUNC_ERR
FORMAT_NUMBER_ERR
public static final String FORMAT_NUMBER_ERR
INVALID_ARGUMENT_ERR
public static final String INVALID_ARGUMENT_ERR
INVALID_NCNAME_ERR
public static final String INVALID_NCNAME_ERR
INVALID_QNAME_ERR
public static final String INVALID_QNAME_ERR
ITERATOR_CLONE_ERR
public static final String ITERATOR_CLONE_ERR
NAMESPACES_SUPPORT_ERR
public static final String NAMESPACES_SUPPORT_ERR
NAMESPACE_PREFIX_ERR
public static final String NAMESPACE_PREFIX_ERR
PARSER_DTD_SUPPORT_ERR
public static final String PARSER_DTD_SUPPORT_ERR
RUN_TIME_COPY_ERR
public static final String RUN_TIME_COPY_ERR
RUN_TIME_INTERNAL_ERR
public static final String RUN_TIME_INTERNAL_ERR
STRAY_ATTRIBUTE_ERR
public static final String STRAY_ATTRIBUTE_ERR
STRAY_NAMESPACE_ERR
public static final String STRAY_NAMESPACE_ERR
TYPED_AXIS_SUPPORT_ERR
public static final String TYPED_AXIS_SUPPORT_ERR
UNKNOWN_TRANSLET_VERSION_ERR
public static final String UNKNOWN_TRANSLET_VERSION_ERR
UNSUPPORTED_EXT_ERR
public static final String UNSUPPORTED_EXT_ERR
UNSUPPORTED_XSL_ERR
public static final String UNSUPPORTED_XSL_ERR
booleanF
public static boolean booleanF(Object obj)
XSLT Standard function boolean()
checkAttribQName
public static void checkAttribQName(String name)
Utility function to check if xsl:attribute has a valid qname
This method should only be invoked if the name attribute is an AVT
checkNCName
public static void checkNCName(String name)
Utility function to check if a name is a valid ncname
This method should only be invoked if the attribute value is an AVT
checkQName
public static void checkQName(String name)
Utility function to check if a name is a valid qname
This method should only be invoked if the attribute value is an AVT
compare
public static boolean compare(Object left,
Object right,
int op,
DOM dom)
compare
public static boolean compare(DTMAxisIterator left,
String rstring,
int op,
DOM dom)
Utility function: node-set/string comparison.
compare
public static boolean compare(DTMAxisIterator left,
double rnumber,
int op,
DOM dom)
Utility function: node-set/number compare.
consoleOutput
public static void consoleOutput(String msg)
countF
public static int countF(DTMAxisIterator iterator)
Standard function count(node-set)
formatNumber
public static String formatNumber(double number,
String pattern,
DecimalFormat formatter)
generatePrefix
public static String generatePrefix()
generate_idF
public static String generate_idF(int node)
XSLT Standard function generate-id().
getLocalName
public static String getLocalName(String value)
utility function for calls to local-name().
getPrefix
public static String getPrefix(String qname)
This function is used in the execution of xsl:element
getSingleNode
public static DTMAxisIterator getSingleNode(DTMAxisIterator iterator)
Utility function: used with nth position filters to convert a sequence
of nodes to just one single node (the one at position n).
mapQNameToJavaName
public static String mapQNameToJavaName(String base)
Utility method to allow setting parameters of the form
{namespaceuri}localName
which get mapped to an instance variable in the class
Hence a parameter of the form "{http://foo.bar}xyz"
will be replaced with the corresponding values
by the BasisLibrary's utility method mapQNametoJavaName
and thus get mapped to legal java variable names
namespace_uriF
public static String namespace_uriF(int node,
DOM dom)
XSLT Standard function namespace-uri().
namespace_uriF
public static String namespace_uriF(DTMAxisIterator iter,
DOM dom)
XSLT Standard function namespace-uri(node-set).
node2Iterator
public static DTMAxisIterator node2Iterator(Node node,
Translet translet,
DOM dom)
Utility function used to convert a w3c Node into an internal DOM iterator.
nodeList2Iterator
public static DTMAxisIterator nodeList2Iterator(NodeList nodeList,
Translet translet,
DOM dom)
Utility function used to convert a w3c NodeList into a internal
DOM iterator.
nodesetF
public static DTMAxisIterator nodesetF(Object obj)
Implements the nodeset() extension function.
normalize_spaceF
public static String normalize_spaceF(String value)
XSLT Standard function normalize-space(string).
normalize_spaceF
public static String normalize_spaceF(int node,
DOM dom)
XSLT Standard function normalize-space().
numberF
public static double numberF(Object obj,
DOM dom)
XSLT Standard function number(value)
numberF
public static double numberF(int node,
DOM dom)
XSLT Standard function number()
objectTypeF
public static String objectTypeF(Object obj)
Implements the object-type() extension function.
EXSLT
positionF
public static int positionF(DTMAxisIterator iterator)
This method exists only for backwards compatibility with old
translets. New code should not reference it.
Standard function position()
realToInt
public static int realToInt(double d)
Utility function: used in RealType to convert a real to an integer
realToString
public static String realToString(double d)
Utility function: used in RealType to convert a real to a string.
Removes the decimal if null.
referenceToBoolean
public static boolean referenceToBoolean(Object obj)
Utility function: used to convert reference to boolean.
referenceToDouble
public static double referenceToDouble(Object obj)
Utility function: used to convert reference to double.
referenceToLong
public static long referenceToLong(Object obj)
Utility function: used to convert reference to long.
referenceToNode
public static Node referenceToNode(Object obj,
DOM dom)
Utility function: used to convert reference to org.w3c.dom.Node.
referenceToNodeList
public static NodeList referenceToNodeList(Object obj,
DOM dom)
Utility function: used to convert reference to org.w3c.dom.NodeList.
referenceToNodeSet
public static DTMAxisIterator referenceToNodeSet(Object obj)
Utility function: used to convert references to node-sets. If the
obj is an instanceof Node then create a singleton iterator.
referenceToResultTree
public static DOM referenceToResultTree(Object obj)
Utility function used to convert references to DOMs.
referenceToString
public static String referenceToString(Object obj,
DOM dom)
Utility function: used to convert reference to String.
replace
public static String replace(String base,
String delim,
String[] str)
replace
public static String replace(String base,
char ch,
String str)
Replace a certain character in a string with a new substring.
roundF
public static double roundF(double d)
XSLT Standard function round()
runTimeError
public static void runTimeError(String code)
Print a run-time error message.
runTimeError
public static void runTimeError(String code,
Object arg0)
runTimeError
public static void runTimeError(String code,
Object arg0,
Object arg1)
runTimeError
public static void runTimeError(String code,
Object[] args)
startXslElement
public static String startXslElement(String qname,
String namespace,
SerializationHandler handler,
DOM dom,
int node)
Utility function for the implementation of xsl:element.
stringF
public static String stringF(Object obj,
int node,
DOM dom)
XSLT Standard function string(value)
stringF
public static String stringF(Object obj,
DOM dom)
XSLT Standard function string(value)
stringF
public static String stringF(int node,
DOM dom)
XSLT Standard function string()
stringToInt
public static int stringToInt(String s)
Utility function: used in StringType to convert a string to an int.
stringToReal
public static double stringToReal(String s)
Utility function: used in StringType to convert a string to a real.
substringF
public static String substringF(String value,
double start)
XSLT Standard function substring(). Must take a double because of
conversions resulting into NaNs and rounding.
substringF
public static String substringF(String value,
double start,
double length)
XSLT Standard function substring(). Must take a double because of
conversions resulting into NaNs and rounding.
substring_afterF
public static String substring_afterF(String value,
String substring)
XSLT Standard function substring-after().
substring_beforeF
public static String substring_beforeF(String value,
String substring)
XSLT Standard function substring-before().
sumF
public static double sumF(DTMAxisIterator iterator,
DOM dom)
XSLT Standard function sum(node-set).
stringToDouble is inlined
system_propertyF
public static String system_propertyF(String name)
XSLT Standard function system-property(name)
testLanguage
public static boolean testLanguage(String testLang,
DOM dom,
int node)
Utility function: used to test context node's language
translateF
public static String translateF(String value,
String from,
String to)
XSLT Standard function translate().
unresolved_externalF
public static void unresolved_externalF(String name)
External functions that cannot be resolved are replaced with a call
to this method. This method will generate a runtime errors. A good
stylesheet checks whether the function exists using conditional
constructs, and never really tries to call it if it doesn't exist.
But simple stylesheets may result in a call to this method.
The compiler should generate a warning if it encounters a call to
an unresolved external function.
unsupported_ElementF
public static void unsupported_ElementF(String qname,
boolean isExtension)
Utility function to throw a runtime error for an unsupported element.
This is only used in forward-compatibility mode, when the control flow
cannot be determined. In 1.0 mode, the error message is emitted at
compile time.