APIdia Launch Partner
Top Description Fields Constructors Methods
com.sun.org.apache.xml.internal.security.transforms.implementations

public Class FuncHere

extends Function
Class Inheritance
Imports
javax.xml.transform.TransformerException, com.sun.org.apache.xml.internal.dtm.DTM, com.sun.org.apache.xml.internal.security.utils.I18n, .XMLUtils, com.sun.org.apache.xml.internal.utils.QName, com.sun.org.apache.xpath.internal.NodeSetDTM, .XPathContext, com.sun.org.apache.xpath.internal.functions.Function, com.sun.org.apache.xpath.internal.objects.XNodeSet, .XObject, com.sun.org.apache.xpath.internal.res.XPATHErrorResources, org.w3c.dom.Document, .Node, java.util.List

The 'here()' function returns a node-set containing the attribute or processing instruction node or the parent element of the text node that directly bears the XPath expression. This expression results in an error if the containing XPath expression does not appear in the same XML document against which the XPath expression is being evaluated. Mainpart is stolen from FuncId.java This does crash under Xalan2.2.D7 and works under Xalan2.2.D9 To get this baby to work, a special trick has to be used. The function needs access to the Node where the XPath expression has been defined. This is done by constructing a FuncHere which has this Node as 'owner'.
See Also
http://www.w3.org/Signature/Drafts/xmldsig-core/Overview.html#function-here

Field Summary

Modifier and TypeField and Description
private static final long

Constructor Summary

AccessConstructor and Description
public

Method Summary

Modifier and TypeMethod and Description
public XObject

Returns:

the xobject
execute
(XPathContext xctxt)

Overrides com.sun.org.apache.xpath.internal.functions.Function.execute.

The here function returns a node-set containing the attribute or processing instruction node or the parent element of the text node that directly bears the XPath expression.

public void
fixupVariables(List<QName> vars, int globalsSize)

Implements abstract com.sun.org.apache.xpath.internal.Expression.fixupVariables.

No arguments to process, so this does nothing.

Inherited from com.sun.org.apache.xpath.internal.functions.Function:
callArgVisitorscallVisitorscheckNumberArgsdeepEqualspostCompileStepreportWrongNumberArgssetArg

Field Detail

serialVersionUIDback to summary
private static final long serialVersionUID

Hides com.sun.org.apache.xpath.internal.functions.Function.serialVersionUID.

Constructor Detail

FuncHereback to summary
public FuncHere()

Method Detail

executeback to summary
public XObject execute(XPathContext xctxt) throws TransformerException

Overrides com.sun.org.apache.xpath.internal.functions.Function.execute.

The here function returns a node-set containing the attribute or processing instruction node or the parent element of the text node that directly bears the XPath expression. This expression results in an error if the containing XPath expression does not appear in the same XML document against which the XPath expression is being evaluated.

Returns:XObject

the xobject

Exceptions
TransformerException:

Doc from com.sun.org.apache.xpath.internal.Expression.execute.

if a runtime exception occurs.

fixupVariablesback to summary
public void fixupVariables(List<QName> vars, int globalsSize)

Implements abstract com.sun.org.apache.xpath.internal.Expression.fixupVariables.

No arguments to process, so this does nothing.