net.sf.saxon.instruct

Class Comment

public final class Comment extends SimpleNodeConstructor

An instruction representing an xsl:comment element in the stylesheet.
Constructor Summary
Comment()
Construct the instruction
Method Summary
protected StringcheckContent(String comment, XPathContext context)
Check the content of the node, and adjust it if necessary
Expressioncopy()
Copy an expression.
voidexplain(ExpressionPresenter out)
Diagnostic print of expression structure.
intgetCardinality()
intgetInstructionNameCode()
Get the instruction name, for diagnostics and tracing return the string "xsl:comment"
ItemTypegetItemType(TypeHierarchy th)
voidlocalTypeCheck(ExpressionVisitor visitor, ItemType contextItemType)
voidprocessValue(CharSequence value, XPathContext context)
Process the value of the node, to create the new node.

Constructor Detail

Comment

public Comment()
Construct the instruction

Method Detail

checkContent

protected String checkContent(String comment, XPathContext context)
Check the content of the node, and adjust it if necessary

Parameters: comment the supplied content context the dynamic context

Returns: the original content, unless adjustments are needed

Throws: XPathException if the content is invalid

copy

public Expression copy()
Copy an expression. This makes a deep copy.

Returns: the copy of the original expression

explain

public void explain(ExpressionPresenter out)
Diagnostic print of expression structure. The abstract expression tree is written to the supplied output destination.

getCardinality

public int getCardinality()

getInstructionNameCode

public int getInstructionNameCode()
Get the instruction name, for diagnostics and tracing return the string "xsl:comment"

getItemType

public ItemType getItemType(TypeHierarchy th)

localTypeCheck

public void localTypeCheck(ExpressionVisitor visitor, ItemType contextItemType)

processValue

public void processValue(CharSequence value, XPathContext context)
Process the value of the node, to create the new node.

Parameters: value the string value of the new node context the dynamic evaluation context

Throws: XPathException