Package net.sf.saxon.style
Class AttributeValueTemplate
java.lang.Object
net.sf.saxon.style.AttributeValueTemplate
This class represents an attribute value template. The class allows an AVT to be parsed, and
can construct an Expression that returns the effective value of the AVT.
This is an abstract class that is never instantiated, it contains static methods only.
-
Method Summary
Modifier and TypeMethodDescriptionstatic Expression
make
(String avt, StaticContext env) Static factory method to create an AVT from an XSLT string representation.static Expression
makeFirstItem
(Expression exp, StaticContext env) Make an expression that extracts the first item of a sequence, after atomization
-
Method Details
-
make
Static factory method to create an AVT from an XSLT string representation. The method is also used for text value templates.- Parameters:
avt
- the attribute value template (or TVT) as written.env
- the static context- Returns:
- an expression that computes the value of the attribute / content, as a string. In the case of a TVT this must be further processed to create a text node.
- Throws:
XPathException
- if a static error is found
-
makeFirstItem
Make an expression that extracts the first item of a sequence, after atomization- Parameters:
exp
- an expression that evaluates to a sequenceenv
- the static context of the expression- Returns:
- an expression that returns the first item in the sequence returned by
exp
-