Class: Saxon::XSLT::StaticContext::DSL Private

Inherits:
Object
  • Object
show all
Includes:
Common
Defined in:
lib/saxon/xslt/static_context.rb

Overview

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

Provides the hooks for constructing a Saxon::XSLT::StaticContext with a DSL.

Class Method Summary collapse

Instance Method Summary collapse

Methods included from Common

#args_hash, #initialize

Class Method Details

.define(block, args = {}) ⇒ Saxon::XPath::StaticContext

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.

Create an instance based on the args hash, and execute the passed in Proc/lambda against it using #instance_exec and return a new Saxon::XSLT::StaticContext with the results

Parameters:

  • block (Proc)

    a Proc/lambda (or to_proc‘d containing DSL calls

Returns:



33
34
35
36
37
# File 'lib/saxon/xslt/static_context.rb', line 33

def self.define(block, args = {})
  dsl = new(args)
  dsl.instance_exec(&block) unless block.nil?
  StaticContext.new(dsl.args_hash)
end

Instance Method Details

#default_collation(collation_uri) ⇒ Object

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.

Set the default Collation to use. This should be one of the special collation URIs Saxon recognises, or one that has been registered using Saxon::Processor#declare_collations on the Processor that created the Compiler this context is for.

Parameters:

  • collation_uri (String)

    The URI of the Collation to set as the default



45
46
47
# File 'lib/saxon/xslt/static_context.rb', line 45

def default_collation(collation_uri)
  @default_collation = collation_uri
end