net.sf.saxon.instruct
Class Comment

java.lang.Object
  extended bynet.sf.saxon.instruct.Instruction
      extended bynet.sf.saxon.instruct.ExprInstruction
          extended bynet.sf.saxon.instruct.SimpleNodeConstructor
              extended bynet.sf.saxon.instruct.Comment
All Implemented Interfaces:
Expression, java.io.Serializable, javax.xml.transform.SourceLocator

public final class Comment
extends SimpleNodeConstructor

An instruction representing an xsl:comment element in the stylesheet.

See Also:
Serialized Form

Field Summary
 
Fields inherited from class net.sf.saxon.instruct.SimpleNodeConstructor
select, separator
 
Fields inherited from class net.sf.saxon.instruct.Instruction
children
 
Constructor Summary
Comment()
          Construct the instruction
 
Method Summary
 void display(int level, NamePool pool)
          Display this instruction as an expression, for diagnostics
 SequenceType getResultType()
          Get the static type of the value returned by the instruction
 TailCall processLeavingTail(XPathContext context)
          Process this instruction, to output a Comment Node
 void promoteInst(PromotionOffer offer)
          Offer promotion for subexpressions.
 void setInstructionDetails(Controller controller, NamePool namePool, InstructionDetails details)
          Get the instruction name, for diagnostics and tracing return the string "xsl:comment"
 void typeCheck(StaticContext env)
           
 
Methods inherited from class net.sf.saxon.instruct.SimpleNodeConstructor
analyze, evaluateItem, evaluateNameCode, expandChildren, getXPathExpressions, setSelect, setSeparator
 
Methods inherited from class net.sf.saxon.instruct.ExprInstruction
effectiveBooleanValue, evaluateAsString, getCardinality, getDependencies, getItemType, getSpecialProperties, getSubExpressions, iterate, promote, simplify
 
Methods inherited from class net.sf.saxon.instruct.Instruction
assembleParams, assembleTunnelParams, getChildren, getColumnNumber, getInstructionDetails, getInstructionName, getLineNumber, getPublicId, getSystemId, getSystemId, process, processChildren, processChildrenLeavingTail, recoverableError, setChildren, setSourceLocation, styleError, styleError
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

Comment

public Comment()
Construct the instruction

Method Detail

setInstructionDetails

public void setInstructionDetails(Controller controller,
                                  NamePool namePool,
                                  InstructionDetails details)
Get the instruction name, for diagnostics and tracing return the string "xsl:comment"

Specified by:
setInstructionDetails in class Instruction

getResultType

public SequenceType getResultType()
Description copied from class: Instruction
Get the static type of the value returned by the instruction

Overrides:
getResultType in class Instruction
Returns:
the SequenceType that the returned value will conform to.

typeCheck

public void typeCheck(StaticContext env)
Specified by:
typeCheck in class SimpleNodeConstructor

promoteInst

public void promoteInst(PromotionOffer offer)
                 throws XPathException
Offer promotion for subexpressions. The offer will be accepted if the subexpression is not dependent on the factors (e.g. the context item) identified in the PromotionOffer. By default the offer is not accepted - this is appropriate in the case of simple expressions such as constant values and variable references where promotion would give no performance advantage. This method is always called at compile time.

Specified by:
promoteInst in class ExprInstruction
Parameters:
offer - details of the offer, for example the offer to move expressions that don't depend on the context to an outer level in the containing expression
Throws:
XPathException - if any error is detected

processLeavingTail

public TailCall processLeavingTail(XPathContext context)
                            throws javax.xml.transform.TransformerException
Process this instruction, to output a Comment Node

Specified by:
processLeavingTail in class Instruction
Parameters:
context - the dynamic context for this transformation
Returns:
a TailCall representing a call delegated to the caller. Always returns null in this implementation
Throws:
javax.xml.transform.TransformerException

display

public void display(int level,
                    NamePool pool)
Description copied from class: SimpleNodeConstructor
Display this instruction as an expression, for diagnostics

Specified by:
display in interface Expression
Overrides:
display in class SimpleNodeConstructor