Class ProcessorInclude

All Implemented Interfaces:
Serializable, SourceLocator, XSLTVisitable, PrefixResolver, ExpressionNode, WhitespaceStrippingElementMatcher, Document, Element, Node, NodeList
Direct Known Subclasses:
ProcessorImport

public class ProcessorInclude
extends XSLTElementProcessor
TransformerFactory class for xsl:include markup.
See Also:
XSLT DTD, include in XSLT Specification, Serialized Form
  • Constructor Details

    • ProcessorInclude

      public ProcessorInclude()
  • Method Details

    • getHref

      public String getHref()
      Get the base identifier with which this stylesheet is associated.
      Returns:
      non-null reference to the href attribute string, or null if setHref has not been called.
    • setHref

      public void setHref​(String baseIdent)
      Get the base identifier with which this stylesheet is associated.
      Parameters:
      baseIdent - Should be a non-null reference to a valid URL string.
    • getStylesheetType

      protected int getStylesheetType()
      Get the stylesheet type associated with an included stylesheet
      Returns:
      the type of the stylesheet
    • getStylesheetInclErr

      protected String getStylesheetInclErr()
      Get the error number associated with this type of stylesheet including itself
      Returns:
      the appropriate error number
    • startElement

      public void startElement​(StylesheetHandler handler, String uri, String localName, String rawName, Attributes attributes) throws SAXException
      Receive notification of the start of an xsl:include element.
      Overrides:
      startElement in class XSLTElementProcessor
      Parameters:
      handler - The calling StylesheetHandler/TemplatesBuilder.
      uri - The Namespace URI, or the empty string if the element has no Namespace URI or if Namespace processing is not being performed.
      localName - The local name (without prefix), or the empty string if Namespace processing is not being performed.
      rawName - The raw XML 1.0 name (with prefix), or the empty string if raw names are not available.
      attributes - The attributes attached to the element. If there are no attributes, it shall be an empty Attributes object.
      Throws:
      SAXException - Any SAX exception, possibly wrapping another exception.
    • parse

      protected void parse​(StylesheetHandler handler, String uri, String localName, String rawName, Attributes attributes) throws SAXException
      Set off a new parse for an included or imported stylesheet. This will set the StylesheetHandler to a new state, and recurse in with a new set of parse events. Once this function returns, the state of the StylesheetHandler should be restored.
      Parameters:
      handler - non-null reference to current StylesheetHandler that is constructing the Templates.
      uri - The Namespace URI, which should be the XSLT namespace.
      localName - The local name (without prefix), which should be "include" or "import".
      rawName - The qualified name (with prefix).
      attributes - The list of attributes on the xsl:include or xsl:import element.
      Throws:
      SAXException - Any SAX exception, possibly wrapping another exception.
    • processSource

      protected Source processSource​(StylesheetHandler handler, Source source)
      This method does nothing, but a class that extends this class could over-ride it and do some processing of the source.
      Parameters:
      handler - The calling StylesheetHandler/TemplatesBuilder.
      source - The source of the included stylesheet.
      Returns:
      the same or an equivalent source to what was passed in.