summaryrefslogtreecommitdiff
path: root/report/xml_report.rb
diff options
context:
space:
mode:
authormguetlein <martin.guetlein@gmail.com>2010-09-13 13:29:09 +0200
committermguetlein <martin.guetlein@gmail.com>2010-09-13 13:29:09 +0200
commiteb5d72a15942b2367c2c1178a0a50d10261c5132 (patch)
tree0487d593ef884e68d87b03a886a7cd19f8d0bd35 /report/xml_report.rb
parentede7b60f62fb4385ce1358f49e92dd325ed251f6 (diff)
fix report dtd - v3
Diffstat (limited to 'report/xml_report.rb')
-rw-r--r--report/xml_report.rb5
1 files changed, 3 insertions, 2 deletions
diff --git a/report/xml_report.rb b/report/xml_report.rb
index 50c9007..110c2a9 100644
--- a/report/xml_report.rb
+++ b/report/xml_report.rb
@@ -1,7 +1,8 @@
require "report/xml_report_util.rb"
-ENV['REPORT_DTD'] = "docbook-xml-4.5/docbookx.dtd" unless ENV['REPORT_DTD']
+ENV['DOCBOOK_DIRECTORY'] = "docbook-xml-4.5" unless ENV['DOCBOOK_DIRECTORY']
+ENV['REPORT_DTD'] = "docbookx.dtd" unless ENV['REPORT_DTD']
#transfer to absolute path
#ENV['REPORT_DTD'] = File.expand_path(ENV['REPORT_DTD']) if File.exist?(ENV['REPORT_DTD'])
@@ -23,7 +24,7 @@ module Reports
@doc = Document.new
decl = XMLDecl.new
@doc << decl
- type = DocType.new('article PUBLIC "-//OASIS//DTD DocBook XML V4.5//EN" "'+$sinatra.url_for('/'+ENV['REPORT_DTD'], :full)+'"')
+ type = DocType.new('article PUBLIC "-//OASIS//DTD DocBook XML V4.5//EN" "'+$sinatra.url_for('/'+ENV['DOCBOOK_DIRECTORY']+'/'+ENV['REPORT_DTD'], :full)+'"')
@doc << type
@root = Element.new("article")