|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--org.apache.xalan.xsltc.runtime.BasisLibrary
Standard XSLT functions. All standard functions expect the current node and the DOM as their last two arguments.
Field Summary | |
static java.lang.String |
AXIS_SUPPORT_ERR
|
static java.lang.String |
CANT_RESOLVE_RELATIVE_URI_ERR
|
static java.lang.String |
DATA_CONVERSION_ERR
|
static java.lang.String |
DOM_ADAPTER_INIT_ERR
|
static java.lang.String |
EQUALITY_EXPR_ERR
|
static java.lang.String |
ERROR_MESSAGES_KEY
|
static java.lang.String |
EXTERNAL_FUNC_ERR
|
static java.lang.String |
FORMAT_NUMBER_ERR
|
static java.lang.String |
INVALID_ARGUMENT_ERR
|
static java.lang.String |
INVALID_NCNAME_ERR
|
static java.lang.String |
INVALID_QNAME_ERR
|
static java.lang.String |
ITERATOR_CLONE_ERR
|
static java.lang.String |
NAMESPACE_PREFIX_ERR
|
static java.lang.String |
NAMESPACES_SUPPORT_ERR
|
static java.lang.String |
PARSER_DTD_SUPPORT_ERR
|
static java.lang.String |
RUN_TIME_COPY_ERR
|
static java.lang.String |
RUN_TIME_INTERNAL_ERR
|
static java.lang.String |
STRAY_ATTRIBUTE_ERR
|
static java.lang.String |
STRAY_NAMESPACE_ERR
|
static java.lang.String |
TYPED_AXIS_SUPPORT_ERR
|
static java.lang.String |
UNALLOWED_EXTENSION_ELEMENT_ERR
|
static java.lang.String |
UNALLOWED_EXTENSION_FUNCTION_ERR
|
static java.lang.String |
UNKNOWN_TRANSLET_VERSION_ERR
|
static java.lang.String |
UNSUPPORTED_EXT_ERR
|
static java.lang.String |
UNSUPPORTED_XSL_ERR
|
Constructor Summary | |
BasisLibrary()
|
Method Summary | |
static boolean |
booleanF(java.lang.Object obj)
XSLT Standard function boolean() |
static void |
checkAttribQName(java.lang.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 |
static void |
checkNCName(java.lang.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 |
static void |
checkQName(java.lang.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 |
static boolean |
compare(DTMAxisIterator left,
double rnumber,
int op,
DOM dom)
Utility function: node-set/number compare. |
static boolean |
compare(DTMAxisIterator left,
DTMAxisIterator right,
int op,
DOM dom)
Utility function: node-set/node-set compare. |
static boolean |
compare(DTMAxisIterator left,
java.lang.String rstring,
int op,
DOM dom)
Utility function: node-set/string comparison. |
static boolean |
compare(int node,
DTMAxisIterator iterator,
int op,
DOM dom)
|
static boolean |
compare(java.lang.Object left,
java.lang.Object right,
int op,
DOM dom)
|
static void |
consoleOutput(java.lang.String msg)
|
static void |
copy(java.lang.Object obj,
SerializationHandler handler,
int node,
DOM dom)
|
static int |
countF(DTMAxisIterator iterator)
Standard function count(node-set) |
static java.lang.String |
expandStylesheetQNameRef(java.lang.String lexicalQName,
int stylesheetNodeID,
int[] ancestorNodeIDs,
int[] prefixURIsIndex,
java.lang.String[] prefixURIPairs,
boolean ignoreDefault)
Look up the namespace for a lexical QName using the namespace declarations available at a particular location in the stylesheet and return the expanded QName |
static java.lang.String |
formatNumber(double number,
java.lang.String pattern,
java.text.DecimalFormat formatter)
|
static java.lang.String |
generate_idF(int node)
XSLT Standard function generate-id(). |
static java.lang.String |
generatePrefix()
|
static java.lang.String |
getLocalName(java.lang.String value)
utility function for calls to local-name(). |
static java.lang.String |
getPrefix(java.lang.String qname)
This function is used in the execution of xsl:element |
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). |
static java.lang.String |
lookupStylesheetQNameNamespace(java.lang.String lexicalQName,
int stylesheetNodeID,
int[] ancestorNodeIDs,
int[] prefixURIsIndex,
java.lang.String[] prefixURIPairs,
boolean ignoreDefault)
Look up the namespace for a lexical QName using the namespace declarations available at a particular location in the stylesheet. |
static java.lang.String |
mapQNameToJavaName(java.lang.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 |
static java.lang.String |
namespace_uriF(DTMAxisIterator iter,
DOM dom)
XSLT Standard function namespace-uri(node-set). |
static java.lang.String |
namespace_uriF(int node,
DOM dom)
XSLT Standard function namespace-uri(). |
static DTMAxisIterator |
node2Iterator(Node node,
Translet translet,
DOM dom)
Utility function used to convert a w3c Node into an internal DOM iterator. |
static DTMAxisIterator |
nodeList2Iterator(NodeList nodeList,
Translet translet,
DOM dom)
Utility function used to convert a w3c NodeList into a internal DOM iterator. |
static DTMAxisIterator |
nodesetF(java.lang.Object obj)
Implements the nodeset() extension function. |
static java.lang.String |
normalize_spaceF(int node,
DOM dom)
XSLT Standard function normalize-space(). |
static java.lang.String |
normalize_spaceF(java.lang.String value)
XSLT Standard function normalize-space(string). |
static double |
numberF(int node,
DOM dom)
XSLT Standard function number() |
static double |
numberF(java.lang.Object obj,
DOM dom)
XSLT Standard function number(value) |
static java.lang.String |
objectTypeF(java.lang.Object obj)
Implements the object-type() extension function. |
static int |
positionF(DTMAxisIterator iterator)
Deprecated. This method exists only for backwards compatibility with old translets. New code should not reference it. |
static int |
realToInt(double d)
Utility function: used in RealType to convert a real to an integer |
static java.lang.String |
realToString(double d)
Utility function: used in RealType to convert a real to a string. |
static boolean |
referenceToBoolean(java.lang.Object obj)
Utility function: used to convert reference to boolean. |
static double |
referenceToDouble(java.lang.Object obj)
Utility function: used to convert reference to double. |
static long |
referenceToLong(java.lang.Object obj)
Utility function: used to convert reference to long. |
static Node |
referenceToNode(java.lang.Object obj,
DOM dom)
Utility function: used to convert reference to org.w3c.dom.Node. |
static NodeList |
referenceToNodeList(java.lang.Object obj,
DOM dom)
Utility function: used to convert reference to org.w3c.dom.NodeList. |
static DTMAxisIterator |
referenceToNodeSet(java.lang.Object obj)
Utility function: used to convert references to node-sets. |
static DOM |
referenceToResultTree(java.lang.Object obj)
Utility function used to convert references to DOMs. |
static java.lang.String |
referenceToString(java.lang.Object obj,
DOM dom)
Utility function: used to convert reference to String. |
static java.lang.String |
replace(java.lang.String base,
char ch,
java.lang.String str)
Replace a certain character in a string with a new substring. |
static java.lang.String |
replace(java.lang.String base,
java.lang.String delim,
java.lang.String[] str)
|
static double |
roundF(double d)
XSLT Standard function round() |
static void |
runTimeError(java.lang.String code)
Print a run-time error message. |
static void |
runTimeError(java.lang.String code,
java.lang.Object arg0)
|
static void |
runTimeError(java.lang.String code,
java.lang.Object[] args)
|
static void |
runTimeError(java.lang.String code,
java.lang.Object arg0,
java.lang.Object arg1)
|
static java.lang.String |
startXslElement(java.lang.String qname,
java.lang.String namespace,
SerializationHandler handler,
DOM dom,
int node)
Utility function for the implementation of xsl:element. |
static java.lang.String |
stringF(int node,
DOM dom)
XSLT Standard function string() |
static java.lang.String |
stringF(java.lang.Object obj,
DOM dom)
XSLT Standard function string(value) |
static java.lang.String |
stringF(java.lang.Object obj,
int node,
DOM dom)
XSLT Standard function string(value) |
static int |
stringToInt(java.lang.String s)
Utility function: used in StringType to convert a string to an int. |
static double |
stringToReal(java.lang.String s)
Utility function: used in StringType to convert a string to a real. |
static java.lang.String |
substring_afterF(java.lang.String value,
java.lang.String substring)
XSLT Standard function substring-after(). |
static java.lang.String |
substring_beforeF(java.lang.String value,
java.lang.String substring)
XSLT Standard function substring-before(). |
static java.lang.String |
substringF(java.lang.String value,
double start)
XSLT Standard function substring(). |
static java.lang.String |
substringF(java.lang.String value,
double start,
double length)
XSLT Standard function substring(). |
static double |
sumF(DTMAxisIterator iterator,
DOM dom)
XSLT Standard function sum(node-set). |
static java.lang.String |
system_propertyF(java.lang.String name)
XSLT Standard function system-property(name) |
static boolean |
testLanguage(java.lang.String testLang,
DOM dom,
int node)
Utility function: used to test context node's language |
static java.lang.String |
translateF(java.lang.String value,
java.lang.String from,
java.lang.String to)
XSLT Standard function translate(). |
static void |
unallowed_extension_elementF(java.lang.String name)
Utility function to throw a runtime error on the use of an extension element when the secure processing feature is set to true. |
static void |
unallowed_extension_functionF(java.lang.String name)
Utility function to throw a runtime error on the use of an extension function when the secure processing feature is set to true. |
static void |
unresolved_externalF(java.lang.String name)
External functions that cannot be resolved are replaced with a call to this method. |
static void |
unsupported_ElementF(java.lang.String qname,
boolean isExtension)
Utility function to throw a runtime error for an unsupported element. |
Methods inherited from class java.lang.Object |
equals,
getClass,
hashCode,
notify,
notifyAll,
toString,
wait,
wait,
wait |
Field Detail |
public static final java.lang.String RUN_TIME_INTERNAL_ERR
public static final java.lang.String RUN_TIME_COPY_ERR
public static final java.lang.String DATA_CONVERSION_ERR
public static final java.lang.String EXTERNAL_FUNC_ERR
public static final java.lang.String EQUALITY_EXPR_ERR
public static final java.lang.String INVALID_ARGUMENT_ERR
public static final java.lang.String FORMAT_NUMBER_ERR
public static final java.lang.String ITERATOR_CLONE_ERR
public static final java.lang.String AXIS_SUPPORT_ERR
public static final java.lang.String TYPED_AXIS_SUPPORT_ERR
public static final java.lang.String STRAY_ATTRIBUTE_ERR
public static final java.lang.String STRAY_NAMESPACE_ERR
public static final java.lang.String NAMESPACE_PREFIX_ERR
public static final java.lang.String DOM_ADAPTER_INIT_ERR
public static final java.lang.String PARSER_DTD_SUPPORT_ERR
public static final java.lang.String NAMESPACES_SUPPORT_ERR
public static final java.lang.String CANT_RESOLVE_RELATIVE_URI_ERR
public static final java.lang.String UNSUPPORTED_XSL_ERR
public static final java.lang.String UNSUPPORTED_EXT_ERR
public static final java.lang.String UNKNOWN_TRANSLET_VERSION_ERR
public static final java.lang.String INVALID_QNAME_ERR
public static final java.lang.String INVALID_NCNAME_ERR
public static final java.lang.String UNALLOWED_EXTENSION_FUNCTION_ERR
public static final java.lang.String UNALLOWED_EXTENSION_ELEMENT_ERR
public static final java.lang.String ERROR_MESSAGES_KEY
Constructor Detail |
public BasisLibrary()
Method Detail |
public static int countF(DTMAxisIterator iterator)
public static int positionF(DTMAxisIterator iterator)
public static double sumF(DTMAxisIterator iterator, DOM dom)
public static java.lang.String stringF(int node, DOM dom)
public static java.lang.String stringF(java.lang.Object obj, DOM dom)
public static java.lang.String stringF(java.lang.Object obj, int node, DOM dom)
public static double numberF(int node, DOM dom)
public static double numberF(java.lang.Object obj, DOM dom)
public static double roundF(double d)
public static boolean booleanF(java.lang.Object obj)
public static java.lang.String substringF(java.lang.String value, double start)
public static java.lang.String substringF(java.lang.String value, double start, double length)
public static java.lang.String substring_afterF(java.lang.String value, java.lang.String substring)
public static java.lang.String substring_beforeF(java.lang.String value, java.lang.String substring)
public static java.lang.String translateF(java.lang.String value, java.lang.String from, java.lang.String to)
public static java.lang.String normalize_spaceF(int node, DOM dom)
public static java.lang.String normalize_spaceF(java.lang.String value)
public static java.lang.String generate_idF(int node)
public static java.lang.String getLocalName(java.lang.String value)
public static void unresolved_externalF(java.lang.String name)
public static void unallowed_extension_functionF(java.lang.String name)
public static void unallowed_extension_elementF(java.lang.String name)
public static void unsupported_ElementF(java.lang.String qname, boolean isExtension)
public static java.lang.String namespace_uriF(DTMAxisIterator iter, DOM dom)
public static java.lang.String system_propertyF(java.lang.String name)
public static java.lang.String namespace_uriF(int node, DOM dom)
public static java.lang.String objectTypeF(java.lang.Object obj)
public static DTMAxisIterator nodesetF(java.lang.Object obj)
public static boolean compare(DTMAxisIterator left, DTMAxisIterator right, int op, DOM dom)
public static boolean compare(int node, DTMAxisIterator iterator, int op, DOM dom)
public static boolean compare(DTMAxisIterator left, double rnumber, int op, DOM dom)
public static boolean compare(DTMAxisIterator left, java.lang.String rstring, int op, DOM dom)
public static boolean compare(java.lang.Object left, java.lang.Object right, int op, DOM dom)
public static boolean testLanguage(java.lang.String testLang, DOM dom, int node)
public static double stringToReal(java.lang.String s)
public static int stringToInt(java.lang.String s)
public static java.lang.String realToString(double d)
public static int realToInt(double d)
public static java.lang.String formatNumber(double number, java.lang.String pattern, java.text.DecimalFormat formatter)
public static DTMAxisIterator referenceToNodeSet(java.lang.Object obj)
public static NodeList referenceToNodeList(java.lang.Object obj, DOM dom)
public static Node referenceToNode(java.lang.Object obj, DOM dom)
public static long referenceToLong(java.lang.Object obj)
public static double referenceToDouble(java.lang.Object obj)
public static boolean referenceToBoolean(java.lang.Object obj)
public static java.lang.String referenceToString(java.lang.Object obj, DOM dom)
public static DTMAxisIterator node2Iterator(Node node, Translet translet, DOM dom)
public static DTMAxisIterator nodeList2Iterator(NodeList nodeList, Translet translet, DOM dom)
public static DOM referenceToResultTree(java.lang.Object obj)
public static DTMAxisIterator getSingleNode(DTMAxisIterator iterator)
public static void copy(java.lang.Object obj, SerializationHandler handler, int node, DOM dom)
public static void checkAttribQName(java.lang.String name)
public static void checkNCName(java.lang.String name)
public static void checkQName(java.lang.String name)
public static java.lang.String startXslElement(java.lang.String qname, java.lang.String namespace, SerializationHandler handler, DOM dom, int node)
public static java.lang.String lookupStylesheetQNameNamespace(java.lang.String lexicalQName, int stylesheetNodeID, int[] ancestorNodeIDs, int[] prefixURIsIndex, java.lang.String[] prefixURIPairs, boolean ignoreDefault)
Look up the namespace for a lexical QName using the namespace declarations available at a particular location in the stylesheet.
See org.apache.xalan.xsltc.compiler.Stylesheet#compileStaticInitializer(org.apache.xalan.xsltc.compiler.util.ClassGenerator)
for more information about the ancestorNodeIDs
,
prefixURIsIndex
and prefixURIPairs
lexicalQName
- The QName as a java.lang.String
stylesheetNodeID
- An int
representing the element in
the stylesheet relative to which the namespace of
the lexical QName is to be determinedancestorNodeIDs
- An int
array, indexed by stylesheet
node IDs, containing the ID of the nearest ancestor
node in the stylesheet that has namespace
declarations, or -1
if there is no
such ancestorprefixURIsIndex
- An int
array, indexed by stylesheet
node IDs, containing the index into the
prefixURIPairs
array of the first
prefix declared on that stylesheet nodeprefixURIPairs
- A java.lang.String
array that contains
pairs ofignoreDefault
- A boolean
indicating whether any
default namespace decarlation should be consideredpublic static java.lang.String expandStylesheetQNameRef(java.lang.String lexicalQName, int stylesheetNodeID, int[] ancestorNodeIDs, int[] prefixURIsIndex, java.lang.String[] prefixURIPairs, boolean ignoreDefault)
Look up the namespace for a lexical QName using the namespace declarations available at a particular location in the stylesheet and return the expanded QName
See org.apache.xalan.xsltc.compiler.Stylesheet#compileStaticInitializer(org.apache.xalan.xsltc.compiler.util.ClassGenerator)
for more information about the ancestorNodeIDs
,
prefixURIsIndex
and prefixURIPairs
lexicalQName
- The QName as a java.lang.String
stylesheetNodeID
- An int
representing the element in
the stylesheet relative to which the namespace of
the lexical QName is to be determinedancestorNodeIDs
- An int
array, indexed by stylesheet
node IDs, containing the ID of the nearest ancestor
node in the stylesheet that has namespace
declarations, or -1
if there is no
such ancestorprefixURIsIndex
- An int
array, indexed by stylesheet
node IDs, containing the index into the
prefixURIPairs
array of the first
prefix declared on that stylesheet nodeprefixURIPairs
- A java.lang.String
array that contains
pairs ofignoreDefault
- A boolean
indicating whether any
default namespace decarlation should be consideredpublic static java.lang.String getPrefix(java.lang.String qname)
public static java.lang.String generatePrefix()
public static void runTimeError(java.lang.String code)
public static void runTimeError(java.lang.String code, java.lang.Object[] args)
public static void runTimeError(java.lang.String code, java.lang.Object arg0)
public static void runTimeError(java.lang.String code, java.lang.Object arg0, java.lang.Object arg1)
public static void consoleOutput(java.lang.String msg)
public static java.lang.String replace(java.lang.String base, char ch, java.lang.String str)
public static java.lang.String replace(java.lang.String base, java.lang.String delim, java.lang.String[] str)
public static java.lang.String mapQNameToJavaName(java.lang.String base)
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |