Class SAXONHandler

  • All Implemented Interfaces:
    NodeHandler, 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

    public class SAXONHandler
    extends XSLTemplate
    A saxon:handler element in the style sheet: defines a Java nodehandler that can be used to process a node in place of an XSLT template
    • Constructor Detail

      • SAXONHandler

        public SAXONHandler()
    • Method Detail

      • checkUnknownAttribute

        public void checkUnknownAttribute​(int nc)
                                   throws javax.xml.transform.TransformerConfigurationException
        Description copied from class: StyleElement
        Check whether an unknown attribute is permitted.
        Overrides:
        checkUnknownAttribute in class StyleElement
        Parameters:
        nc - The name code of the attribute name
        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 XSLTemplate
        Throws:
        javax.xml.transform.TransformerConfigurationException
      • preprocess

        public void preprocess()
                        throws javax.xml.transform.TransformerConfigurationException
        Preprocess: this registers the node handler with the controller
        Overrides:
        preprocess in class XSLTemplate
        Throws:
        javax.xml.transform.TransformerConfigurationException
      • process

        public void process​(Context context)
                     throws javax.xml.transform.TransformerException
        Process saxon:handler element. This is called while all the top-level nodes are being processed in order, so it does nothing.
        Overrides:
        process in class XSLTemplate
        Parameters:
        context - The context in the source XML document, giving access to the current node, the current variables, etc.
        Throws:
        javax.xml.transform.TransformerException
      • expand

        public void expand​(Context context)
                    throws javax.xml.transform.TransformerException
        Invoke the node handler. Called directly only when doing XSLCallTemplate
        Overrides:
        expand in class XSLTemplate
        Throws:
        javax.xml.transform.TransformerException
      • makeHandler

        protected NodeHandler makeHandler​(java.lang.String className)
                                   throws javax.xml.transform.TransformerConfigurationException
        Load a named node handler and check it is OK.
        Throws:
        javax.xml.transform.TransformerConfigurationException