Class AttributeCreator

    • Constructor Detail

      • AttributeCreator

        public AttributeCreator()
    • Method Detail

      • setInstruction

        public void setInstruction​(boolean inst)
        Say whether this attribute creator originates as an XSLT instruction
        inst - true if this is an xsl:attribute instruction
      • isInstruction

        public boolean isInstruction()
        Ask whether this expression is an instruction. In XSLT streamability analysis this is used to distinguish constructs corresponding to XSLT instructions from other constructs.
        isInstruction in class Instruction
        true if this construct originates as an XSLT instruction
      • setSchemaType

        public void setSchemaType​(SimpleType type)
        Set the required schema type of the attribute
        type - the required schema type, if validation against a specific type is required, or null if no validation is required
      • getSchemaType

        public SimpleType getSchemaType()
        Return the required schema type of the attribute
        Specified by:
        getSchemaType in interface ValidatingInstruction
        if validation against a schema type was requested, return the schema type (always a simple type). Otherwise, if validation against a specific type was not requested, return null
      • setValidationAction

        public void setValidationAction​(int action)
        Set the validation action required
        action - the validation action required, for example strict or lax
      • getValidationAction

        public int getValidationAction()
        Get the validation action requested
        Specified by:
        getValidationAction in interface ValidatingInstruction
        the validation action, for example strict or lax
      • setOptions

        public void setOptions​(int options)
        Set the options to be used on the attribute event
        options - Options to be used. The only option currently defined is ReceiverOption.REJECT_DUPLICATES, which controls whether or not it is an error to create two attributes with the same name for the same element. (This is an error in XQuery but not in XSLT).
      • setRejectDuplicates

        public void setRejectDuplicates()
        Indicate that two attributes with the same name are not acceptable. (This option is set in XQuery, but not in XSLT)
      • setNoSpecialChars

        public void setNoSpecialChars()
        Indicate that the attribute value contains no special characters that might need escaping
      • getOptions

        public int getOptions()
        Get the options to be used on the attribute event
        the option flags to be used
      • computeSpecialProperties

        protected int computeSpecialProperties()
        Get the static properties of this expression (other than its type). The result is bit-signficant. These properties are used for optimizations. In general, if property bit is set, it is true, but if it is unset, the value is unknown.
        computeSpecialProperties in class SimpleNodeConstructor
        a set of flags indicating static properties of this expression
      • getItemType

        public ItemType getItemType()
        Get the static type of this expression
        getItemType in class Instruction
        the static type of the item returned by this expression
      • validateOrphanAttribute

        protected void validateOrphanAttribute​(Orphan orphan,
                                               XPathContext context)
                                        throws XPathException
        Validate a newly-constructed parentless attribute using the type and validation attributes. Note, this is XSLT-only: XQuery does not allow validation of individual attributes
        orphan - the new attribute node
        context - the dynamic evaluation context
        XPathException - if validation fails