lib/onix/normaliser.rb
# uses an XSLT stylesheet provided by edituer to convert
# a file from short tags to long tags.
#
# more detail here:
#   http://www.editeur.org/files/ONIX%203/ONIX%20tagname%20converter%20v2.htm
#
uses an XSLT stylesheet provided by edituer to convert
a file from short tags to long tags.


uses an XSLT stylesheet provided by edituer to convert a file from short tags to long tags .
def to_reference_tags(src, dest)
      inpath = File.expand_path(src)
      outpath = File.expand_path(dest)
      xsltpath = File.dirname(__FILE__) + "/../../support/switch-onix-2.1-short-to-reference.xsl"
      java_jar_file_path = File.dirname(__FILE__) + "/../../support/saxon9he.jar"
      result = system("java -Xms2048m -Xmx2048m -jar #{java_jar_file_path} #{@oldfile} #{xsltpath} > #{@newfile}")
      raise "Error coverting file to reference tags" unless result
    end
def to_reference_tags ( src , dest ) inpath = File . expand_path ( src ) outpath = File . expand_path ( dest ) xsltpath = File . dirname ( __FILE__ ) + "/../../support/switch-onix-2.1-short-to-reference.xsl" java_jar_file_path = File . dirname ( __FILE__ ) + "/../../support/saxon9he.jar" result = system ( "java -Xms2048m -Xmx2048m -jar #{java_jar_file_path} #{@oldfile} #{xsltpath} > #{@newfile}" ) raise "Error coverting file to reference tags" unless result end
uses an XSLT stylesheet provided by edituer to convert
a file from short tags to long tags.
uses an XSLT stylesheet provided by edituer to convert a file from short tags to long tags .
# result = system("xsltproc -o #{outpath} #{xsltpath} #{inpath}") # Using java utility 'saxon.jar (http://saxon.sourceforge.net/)' in place of 'xsltproc'. # As the later one has memory leakage problem for bigger files (size: 300 MB)
src
<not_specific>
dest
<not_specific>