Module: Saxon::XSLT::ParameterHelper

Defined in:
lib/saxon/xslt/evaluation_context.rb

Overview

parameter shorthand name/value-to-full QName/XDM::Value helper module

Class Method Summary collapse

Class Method Details

.process_parameters(parameters) ⇒ Hash<Saxon::QName => Saxon::XDM::Value>

process shorthand parameter hash into fully-qualified QName / Value hash

Parameters:

Returns:

See Also:

  • for more about the QName resolution process
  • for more about the conversion of Object into XDM Values


179
180
181
182
183
# File 'lib/saxon/xslt/evaluation_context.rb', line 179

def self.process_parameters(parameters)
  parameters.map { |qname, value|
    [Saxon::QName.resolve(qname), Saxon::XDM.Value(value)]
  }.to_h
end

.to_java(parameters) ⇒ Object

generate Java Map from fully qualified parameter hash



186
187
188
# File 'lib/saxon/xslt/evaluation_context.rb', line 186

def self.to_java(parameters)
  Hash[parameters.map { |k,v| [k.to_java, v.to_java] }].to_java
end