@@ -53,8 +53,9 @@ logger.formatter = lambda {|severity, datetime, progname, msg| "#{severity}: #{m
5353
5454parser_options = {
5555 base_uri : nil ,
56- validate : false ,
56+ library : :nokogiri ,
5757 logger : logger ,
58+ validate : false ,
5859}
5960
6061writer_options = {
@@ -85,6 +86,7 @@ OPT_ARGS = [
8586 [ "--help" , "-?" , GetoptLong ::NO_ARGUMENT , "print this message" ] ,
8687 [ "--input-format" , GetoptLong ::REQUIRED_ARGUMENT , "Format of the input file, defaults to ttl" ] ,
8788 [ "--info" , GetoptLong ::NO_ARGUMENT , "Show progress on execution" ] ,
89+ [ "--library" , GetoptLong ::REQUIRED_ARGUMENT , "XML library to use (nokogiri or rexml)" ] ,
8890 [ "--output" , "-o" , GetoptLong ::REQUIRED_ARGUMENT , "Save output to file" ] ,
8991 [ "--quiet" , GetoptLong ::NO_ARGUMENT , "Do not show parser output" ] ,
9092 [ "--stream" , GetoptLong ::NO_ARGUMENT , "Use streaming writer" ] ,
@@ -124,6 +126,7 @@ opts.each do |opt, arg|
124126 when '--format' then options [ :output_format ] = arg . to_sym
125127 when "--help" then usage ( )
126128 when '--input-format' then options [ :input_format ] = arg . to_sym
129+ when '--library' then parser_options [ :library ] = arg . to_sym
127130 when '--output' then options [ :output ] = File . open ( arg , "w" )
128131 when '--rdfstar' then parser_options [ :rdfstar ] = true
129132 when '--quiet'
0 commit comments