Class: Saxon::XSLT::Transformation
- Inherits:
-
Object
- Object
- Saxon::XSLT::Transformation
- Defined in:
- lib/saxon/xslt/executable.rb
Instance Attribute Summary collapse
-
#opts ⇒ Object
readonly
Returns the value of attribute opts.
-
#s9_transformer ⇒ Object
readonly
Returns the value of attribute s9_transformer.
Instance Method Summary collapse
- #apply_templates(source) ⇒ Object
- #call_template(template_name) ⇒ Object
-
#initialize(args) ⇒ Transformation
constructor
A new instance of Transformation.
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
#opts ⇒ Object (readonly)
Returns the value of attribute opts.
86 87 88 |
# File 'lib/saxon/xslt/executable.rb', line 86 def opts @opts end |
#s9_transformer ⇒ Object (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 |