Class ComponentDeclaration

java.lang.Object
net.sf.saxon.style.ComponentDeclaration

public class ComponentDeclaration extends Object
The object represents a declaration (that is, a top-level element) in a stylesheet. A declaration exists within a stylesheet module and takes its import precedence from that of the module. The declaration corresponds to a source element in a stylesheet document. However, if a stylesheet module is imported twice with different precedences, then two declarations may share the same source element.
  • Constructor Details

    • ComponentDeclaration

      public ComponentDeclaration(StylesheetModule module, StyleElement source)
      Create a ComponentDeclaration as the combination of a stylesheet module and a declaration within that module
      Parameters:
      module - the stylesheet module
      source - the source declaration within that module
  • Method Details

    • getModule

      public StylesheetModule getModule()
      Get the module in which this ComponentDeclaration appears
      Returns:
      the module
    • getSourceElement

      public StyleElement getSourceElement()
      Get the source declaration of this component
      Returns:
      the element in the stylesheet tree corresponding to the declaration
    • getPrecedence

      public int getPrecedence()
      Get the import precedence of the declaration, which is the same as the import precedence of the module in which it appears
      Returns:
      the import precedence