Class: Saxon::XSLT::Transformation

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

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(args) ⇒ Transformation

Returns a new instance of Transformation.



88
89
90
91
92
93
94
95
# File 'lib/saxon/xslt/executable.rb', line 88

def initialize(args)
  @s9_transformer = args.fetch(:s9_transformer)
  @destination = args.fetch(:destination, nil)
  @opts = args.reject { |opt, _|
    [:s9_transformer, :destination].include?(opt)
  }
  @raw = false
end

Instance Attribute Details

#optsObject (readonly)

Returns the value of attribute opts.



86
87
88
# File 'lib/saxon/xslt/executable.rb', line 86

def opts
  @opts
end

#s9_transformerObject (readonly)

Returns the value of attribute s9_transformer.



86
87
88
# File 'lib/saxon/xslt/executable.rb', line 86

def s9_transformer
  @s9_transformer
end

Instance Method Details

#apply_templates(source) ⇒ Object



97
98
99
# File 'lib/saxon/xslt/executable.rb', line 97

def apply_templates(source)
  transformation_result(:applyTemplates, source)
end

#call_template(template_name) ⇒ Object



101
102
103
# File 'lib/saxon/xslt/executable.rb', line 101

def call_template(template_name)
  transformation_result(:callTemplate, Saxon::QName.resolve(template_name))
end