Class: Saxon::XSLT::Executable

Inherits:
Object
  • Object
show all
Defined in:
lib/saxon/xslt/executable.rb

Overview

Represents a compiled XPaGth query ready to be executed

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(s9_xslt_executable, static_context) ⇒ Executable

This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.

Returns a new instance of Executable.

Parameters:

  • s9_xslt_executable (net.sf.saxon.s9api.XsltExecutable)

    the Saxon compiled XPath object

  • static_context (XPath::StaticContext)

    the XPath’s static context



18
19
20
# File 'lib/saxon/xslt/executable.rb', line 18

def initialize(s9_xslt_executable, static_context)
  @s9_xslt_executable, @static_context = s9_xslt_executable, static_context
end

Instance Attribute Details

#static_contextXSLT::StaticContext (readonly)

Returns the XPath’s static context.

Returns:



11
12
13
# File 'lib/saxon/xslt/executable.rb', line 11

def static_context
  @static_context
end

Instance Method Details

#apply_templates(source, opts = {}) ⇒ Object



22
23
24
# File 'lib/saxon/xslt/executable.rb', line 22

def apply_templates(source, opts = {})
  transformation(opts).apply_templates(source)
end

#call_template(template_name, opts = {}) ⇒ Object



26
27
28
# File 'lib/saxon/xslt/executable.rb', line 26

def call_template(template_name, opts = {})
  transformation(opts).call_template(template_name)
end

#to_javanet.sf.saxon.s9api.XsltExecutable

Returns the underlying Saxon XsltExecutable.

Returns:

  • (net.sf.saxon.s9api.XsltExecutable)

    the underlying Saxon XsltExecutable



32
33
34
# File 'lib/saxon/xslt/executable.rb', line 32

def to_java
  @s9_xslt_executable
end