When you use `File.read`, it reads the file in to a string. Since the
file contents are now in a string, nokogiri has no knowledge about
what directory that file lived in when it was read.
If you pass an open file handle to nokogiri, it will figure out extra
information about the file.
Try like this:
doc = Nokogiri.XML(File.open('some_file.xml', 'rb'))
xslt = Nokogir.XSLT(File.open('some_transformer.xslt', 'rb'))
That way, nokogiri will have the info it needs to find relative files.
Hope that helps!
--
Aaron Patterson
http://tenderlovemaking.com/