Class Comment

    • Constructor Detail

      • Comment

        public Comment()
        Construct the instruction
    • Method Detail

      • getInstructionNameCode

        public int getInstructionNameCode()
        Get the instruction name, for diagnostics and tracing return the string "xsl:comment"
        Overrides:
        getInstructionNameCode in class Instruction
      • getCardinality

        public int getCardinality()
        Description copied from class: ComputedExpression
        Determine the static cardinality of the expression. This establishes how many items there will be in the result of the expression, at compile time (i.e., without actually evaluating the result.
        Specified by:
        getCardinality in interface Expression
        Overrides:
        getCardinality in class ComputedExpression
        Returns:
        one of the values Cardinality.ONE_OR_MORE, Cardinality.ZERO_OR_MORE, Cardinality.EXACTLY_ONE, Cardinality.ZERO_OR_ONE, Cardinality.EMPTY. This default implementation returns ZERO_OR_MORE (which effectively gives no information).
      • checkContent

        protected java.lang.String checkContent​(java.lang.String comment,
                                                XPathContext context)
                                         throws DynamicError
        Check the content of the node, and adjust it if necessary
        Overrides:
        checkContent in class SimpleNodeConstructor
        Parameters:
        comment - the supplied content
        context - the dynamic context
        Returns:
        the original content, unless adjustments are needed
        Throws:
        DynamicError - if the content is invalid