Class: Mtk_xslt::XsltProcessor

Inherits:
Xalan show all
Defined in:
lib/ontomde-core/xslt.rb,
lib/ontomde-core/xslt.rb,
lib/ontomde-core/xslt.rb

Overview

class XsltProcessor < Saxon ; end

Constant Summary

Constants inherited from Xalan

Mtk_xslt::Xalan::TRANSFORMER_FACTORY_IMPL

Instance Method Summary collapse

Constructor Details

#initializeXsltProcessor

Returns a new instance of XsltProcessor.

Raises:

  • (Exception)


81
82
83
# File 'lib/ontomde-core/xslt.rb', line 81

def initialize
  raise Exception.new("\n***\n***XSLT is not available on your platform. Currently supported platform are JRUBY and Windows\n***\n***") 
end

Instance Method Details

#nameObject



10
11
12
# File 'lib/ontomde-core/xslt.rb', line 10

def name
		return "msxml"
end

#transform(xslt, infile, outfile) ⇒ Object

Raises:

  • (Exception)


13
14
15
16
17
18
# File 'lib/ontomde-core/xslt.rb', line 13

def transform(xslt,infile,outfile)
 param="#{infile} -o #{outfile} #{xslt}"
 cmd="#{File.dirname(__FILE__)}\\converter-ea\\msxsl.exe "+param.tr('/','\\\\')
 ret=system(cmd)
 raise Exception.new("\n***\n***Error running command\n***\n***#{cmd}\n***Please check that no msxml process is running in background\n***\n") unless ret
end