module Nokogiri::XSLT

def parse(string, modules = {})

Parse the stylesheet in +string+, register any +modules+
##
def parse(string, modules = {})
  modules.each do |url, klass|
    XSLT.register(url, klass)
  end
  doc = XML::Document.parse(string, nil, nil, XML::ParseOptions::DEFAULT_XSLT)
  if Nokogiri.jruby?
    Stylesheet.parse_stylesheet_doc(doc, string)
  else
    Stylesheet.parse_stylesheet_doc(doc)
  end
end