Class XSLGeneralVariable

  • All Implemented Interfaces:
    NodeInfo, javax.xml.transform.dom.DOMLocator, javax.xml.transform.Source, javax.xml.transform.SourceLocator, org.w3c.dom.Element, org.w3c.dom.NamedNodeMap, org.w3c.dom.Node, org.xml.sax.Locator
    Direct Known Subclasses:
    SAXONAssign, SAXONReturn, SQLColumn, XSLParam, XSLVariable, XSLWithParam

    public abstract class XSLGeneralVariable
    extends StyleElement
    This class defines common behaviour across xsl:variable, xsl:param, and xsl:with-param
    • Field Detail

      • variableFingerprint

        protected int variableFingerprint
      • simpleText

        protected java.lang.String simpleText
      • global

        protected boolean global
      • assignable

        protected boolean assignable
      • redundant

        protected boolean redundant
    • Constructor Detail

      • XSLGeneralVariable

        public XSLGeneralVariable()
    • Method Detail

      • mayContainTemplateBody

        public boolean mayContainTemplateBody()
        Determine whether this type of element is allowed to contain a template-body
        Overrides:
        mayContainTemplateBody in class StyleElement
        Returns:
        true: yes, it may contain a template-body
      • isGlobal

        public boolean isGlobal()
      • isAssignable

        public boolean isAssignable()
        Test whether it is permitted to assign to the variable using the saxon:assign extension element. This will only be true if the extra attribute saxon:assignable="yes" is present.
      • getOwningProcedure

        public Procedure getOwningProcedure()
                                     throws javax.xml.transform.TransformerConfigurationException
        Get the owning Procedure definition, if this is a local variable
        Throws:
        javax.xml.transform.TransformerConfigurationException
      • preprocess

        public void preprocess()
                        throws javax.xml.transform.TransformerConfigurationException
        Preprocess: this ensures space is available for local variables declared within this global variable
        Overrides:
        preprocess in class StyleElement
        Throws:
        javax.xml.transform.TransformerConfigurationException
      • getVariableName

        public java.lang.String getVariableName()
        Get the display name of the variable.
      • getVariableFingerprint

        public int getVariableFingerprint()
        Get the fingerprint of the variable name
      • prepareAttributes

        public void prepareAttributes()
                               throws javax.xml.transform.TransformerConfigurationException
        Description copied from class: StyleElement
        Set the attribute list for the element. This is called to process the attributes (note the distinction from processAttributes in the superclass). Must be supplied in a subclass
        Specified by:
        prepareAttributes in class StyleElement
        Throws:
        javax.xml.transform.TransformerConfigurationException
      • validate

        public void validate()
                      throws javax.xml.transform.TransformerConfigurationException
        Description copied from class: StyleElement
        Check that the element is valid. This is called once for each element, after the entire tree has been built. As well as validation, it can perform first-time initialisation. The default implementation does nothing; it is normally overriden in subclasses.
        Overrides:
        validate in class StyleElement
        Throws:
        javax.xml.transform.TransformerConfigurationException
      • checkDuplicateDeclaration

        public void checkDuplicateDeclaration()
                                       throws javax.xml.transform.TransformerConfigurationException
        Check whether this declaration duplicates another one
        Throws:
        javax.xml.transform.TransformerConfigurationException
      • getSelectValue

        protected Value getSelectValue​(Context context)
                                throws javax.xml.transform.TransformerException
        Get the value of the select expression if present or the content of the element otherwise
        Throws:
        javax.xml.transform.TransformerException
      • getProcedure

        public Procedure getProcedure()
        Get associated Procedure (for details of stack frame, if this is a global variable containing local variable declarations)