Class SAXONFunction

All Implemented Interfaces:
NodeInfo, DOMLocator, Source, SourceLocator, Element, NamedNodeMap, Node, Locator

public class SAXONFunction extends StyleElement
Handler for saxon:function and exslt:function elements in stylesheet.
Attributes:
name gives the name of the function
  • Field Details

    • functionFingerprint

      int functionFingerprint
    • procedure

      Procedure procedure
  • Constructor Details

    • SAXONFunction

      public SAXONFunction()
  • Method Details

    • processExtensionElementAttribute

      protected void processExtensionElementAttribute(int nc) throws TransformerConfigurationException
      Process the [xsl:]extension-element-prefixes attribute. This overrides the standard method because saxon:function and exslt:function implicitly declare saxon/exslt (respectively) as an extension namespace.
      Overrides:
      processExtensionElementAttribute in class StyleElement
      Parameters:
      nc - the name code of the attribute required (ignored)
      Throws:
      TransformerConfigurationException
    • prepareAttributes

      public void prepareAttributes() throws 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:
      TransformerConfigurationException
    • 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
    • validate

      public void validate() throws 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:
      TransformerConfigurationException
    • preprocess

      public void preprocess() throws TransformerConfigurationException
      Description copied from class: StyleElement
      Default preprocessing method does nothing. It is implemented for those top-level elements that can be evaluated before the source document is available, for example xsl:key, xsl:attribute-set, xsl:template, xsl:locale
      Overrides:
      preprocess in class StyleElement
      Throws:
      TransformerConfigurationException
    • process

      public void process(Context context)
      Description copied from class: StyleElement
      Process: called to do the real work of this stylesheet element. This method must be implemented in each subclass.
      Specified by:
      process in class StyleElement
      Parameters:
      context - The context in the source XML document, giving access to the current node, the current variables, etc.
    • getProcedure

      public Procedure getProcedure()
      Get associated Procedure (for details of stack frame)
    • getFunctionFingerprint

      public int getFunctionFingerprint()
    • getNthParameter

      public int getNthParameter(int n)
      Get the name fingerprint of the n'th parameter (starting from 0). Return -1 if there is none such.
    • call

      public Value call(ParameterSet params, Context context) throws TransformerException
      Call this function
      Throws:
      TransformerException