|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectjd.xml.xpath.XPathContext
jd.xml.xslt.XsltContext
A XSLT transformation context.
Nested Class Summary |
Nested classes inherited from class jd.xml.xpath.XPathContext |
XPathContext.State |
Field Summary | |
static PrintStream |
trace
|
Constructor Summary | |
XsltContext(ModelCache modelCache,
MessageListener messageListener,
XsltSecurityManager securityManager,
Hashtable decimalFormatSymbols,
ExtensionHandler[] extensionHandlers,
Hashtable keys,
int warningLevel,
int maxLocalVariableCount,
XObject[] globalParamValues,
OutputFormat outputFormat,
boolean measureMemory)
Create a XsltContext. |
Method Summary | |
static XsltContext |
cast(XPathContext context)
Cast the XPathContext to a XsltContext. |
XPathNode |
clearCurrentNode()
Set the current node to null. |
static DecimalFormatSymbols |
createDefaultSymbols()
Create a DecimalFormatSymbols object with the default settings defined by XSLT. |
boolean |
doTailRecursion(Object rule,
Variable[] params,
int suppliedParamCount)
|
XPathNode |
getCurrentNode()
Return the current node. |
DecimalFormat |
getDecimalFormat(String pattern,
String formatUri,
String formatName)
Return the decimal format for the given pattern and name. |
Function |
getExtensionFunction(String namespaceUri,
String functionName,
Expression[] arguments)
Return an extension function. |
ExtensionHandler |
getExtensionHandler(String namespaceUri)
|
XObject |
getGlobalVariable(int index)
Return a global variable value. |
XNodeSet |
getKeyNodes(String keyName,
String value)
Retrieve all nodes of a key with the specified value. |
XObject |
getLocalVariable(int index)
Return a global variable value. |
VariableFrame |
getLocalVariableFrame()
|
XObject[] |
getLocalVariableValues()
|
long |
getMaxMemory()
Return the debug mode. |
XPathRootNode |
getModel(String href,
String baseUri)
Get a document. |
ModelCache |
getModelCache()
Return the ModelCache. |
static String |
getNamespaceUri(NamespaceContext nscontext,
String prefix)
Map a prefix to a namespace uri. |
static String |
getNamespaceUri(NamespaceContext nscontext,
String prefix,
boolean mustExist)
Map a prefix to a namespace uri. |
NumberingFormat |
getNumberingFormat(String definition,
int groupingSize,
char groupingSeparator)
Return a NumberingFormat for the definition. |
OutputFormat |
getOutputFormat()
Return the OutputFormat of the transformation. |
ResultTextRecorder |
getResultTextRecorder()
|
XsltSecurityManager |
getSecurityManager()
Return the security manager for the |
Variable[] |
getTailRecParams()
|
int |
getTailRecSuppliedParams()
|
XObject[] |
getTempVariableValues()
Returns an array for temporary variable values. |
XObject |
getVariable(VariableName name)
Return a variable value for the name. |
boolean |
inTailRecursion()
|
void |
putResultTextRecorder(ResultTextRecorder recorder)
|
Object |
replaceCurrentTemplateRule(Object rule)
Replace the current template rule. |
void |
reportRecoverableError(String message,
Throwable e)
|
void |
setCurrentNode(XPathNode node)
Set the current node. |
void |
setCurrentTemplateRule(Object rule)
Set the current template rule. |
void |
setGlobalVariable(int variableIndex,
XObject value)
Set the value of a global variable. |
void |
setInTailRecursion(boolean mode)
|
void |
setLocalVariable(int variableIndex,
XObject value)
Set the value of a local variable. |
void |
setLocalVariableFrame(VariableFrame frame,
XObject[] values)
|
void |
setNextLocalVariableFrame()
|
void |
setPrevLocalVariableFrame()
|
void |
setTempVariableValues(XObject[] values)
|
void |
showMessage(String message)
Show a message. |
Methods inherited from class jd.xml.xpath.XPathContext |
getNode, getPosition, getSize, restoreState, setNextNode, setNode, setPosition, setSize, startNewState, startNewState |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
public static final PrintStream trace
Constructor Detail |
public XsltContext(ModelCache modelCache, MessageListener messageListener, XsltSecurityManager securityManager, Hashtable decimalFormatSymbols, ExtensionHandler[] extensionHandlers, Hashtable keys, int warningLevel, int maxLocalVariableCount, XObject[] globalParamValues, OutputFormat outputFormat, boolean measureMemory)
Method Detail |
public static XsltContext cast(XPathContext context) throws XsltException
XsltException
- if the context is not a XsltContextpublic final void setCurrentNode(XPathNode node)
public final XPathNode clearCurrentNode()
public final XPathNode getCurrentNode()
public Object replaceCurrentTemplateRule(Object rule)
public void setCurrentTemplateRule(Object rule)
public ResultTextRecorder getResultTextRecorder()
public void putResultTextRecorder(ResultTextRecorder recorder)
public DecimalFormat getDecimalFormat(String pattern, String formatUri, String formatName) throws XsltException
formatName
- the name of a XSLT decimal-format element or null
if the default format should be applied
XsltException
- thrown if the format name is not validpublic static DecimalFormatSymbols createDefaultSymbols()
public NumberingFormat getNumberingFormat(String definition, int groupingSize, char groupingSeparator)
public XObject getVariable(VariableName name)
getVariable
in class XPathContext
public XObject getGlobalVariable(int index)
public XObject getLocalVariable(int index)
public void setLocalVariable(int variableIndex, XObject value)
public void setGlobalVariable(int variableIndex, XObject value)
public void setPrevLocalVariableFrame()
public void setNextLocalVariableFrame()
public void setLocalVariableFrame(VariableFrame frame, XObject[] values)
public VariableFrame getLocalVariableFrame()
public XObject[] getLocalVariableValues()
public XObject[] getTempVariableValues()
public void setTempVariableValues(XObject[] values)
public ExtensionHandler getExtensionHandler(String namespaceUri)
public Function getExtensionFunction(String namespaceUri, String functionName, Expression[] arguments)
namespaceUri
- the namespace uri of the function. If null the function
is a standard xslt or xpath function, else it is a extension functionfunctionName
- the function namearguments
- the function argumentspublic static String getNamespaceUri(NamespaceContext nscontext, String prefix) throws XsltException
XsltException
- thrown if the prefix is not mapped to an uripublic static String getNamespaceUri(NamespaceContext nscontext, String prefix, boolean mustExist) throws XsltException
XsltException
- thrown if the prefix is not mapped to an uri
and mustExist is set to truepublic ModelCache getModelCache()
public XPathRootNode getModel(String href, String baseUri)
baseUri
- if uri is a relative uri, the baseUri parameter will be used
to build an valid absolute uri.
XsltException
- thrown if the document cannot be read
but errors should not be ignoredpublic XNodeSet getKeyNodes(String keyName, String value)
public void showMessage(String message)
public void reportRecoverableError(String message, Throwable e)
public OutputFormat getOutputFormat()
public XsltSecurityManager getSecurityManager()
public boolean doTailRecursion(Object rule, Variable[] params, int suppliedParamCount)
public Variable[] getTailRecParams()
public int getTailRecSuppliedParams()
public boolean inTailRecursion()
public void setInTailRecursion(boolean mode)
public long getMaxMemory()
|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |