Skip to content

Commit

Permalink
fixing xslt
Browse files Browse the repository at this point in the history
  • Loading branch information
cfitz committed Aug 4, 2015
1 parent 5e65466 commit 6a34256
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 6 deletions.
Binary file modified ead2pdf.jar
Binary file not shown.
16 changes: 10 additions & 6 deletions lib/AS_fop.rb
Original file line number Diff line number Diff line change
Expand Up @@ -23,17 +23,21 @@ class ASFop
attr_accessor :source
attr_accessor :xslt

def initialize(source, output= nil, xslt = File.join( File.dirname(__FILE__), '../lib' ,'as-ead-pdf.xsl') )
abort("#{source} not found") unless File.exists?(source)
def initialize(source, output= nil, xslt = nil )
abort("#{source} not found") unless File.exists?(source)
puts source
puts output
@source = source
@xml = IO.read(source)
@output = output.nil? ? "#{source}.pdf" : output
file =File.join( File.dirname(__FILE__), '../lib' ,'as-ead-pdf.xsl').gsub("\\", "/" )
@xslt = File.read( xslt, system_id: file )
# WHAT A HACK! but you can't pass in a URI as a variable? jeezus.
# @xslt.gsub!('<xsl:include href="as-helper-functions.xsl"/>', "<xsl:include href='#{File.join(File.dirname(__FILE__), '../lib', 'as-helper-functions.xsl')}'/>" )

if xslt.nil?
file =File.join( File.dirname(__FILE__), '../lib' ,'as-ead-pdf.xsl').gsub("\\", "/" )
@xslt = File.read( file, system_id: file )
else
@xslt = File.read( xslt )
end

end


Expand Down

0 comments on commit 6a34256

Please sign in to comment.