Pass querystring to XSL through module
I think you just need to parse out the query string, and then use XSLTProcessor::setParameter:

/* generate hook */
function _xml_import_generate()
{
  $p = $_GET['p'];

  $path = drupal_get_path('module', 'xml_import');

  $xsl = new DOMDocument();
  $xsl-&gt;load("{$path}/xml_import.xsl");

  $xslt = new XSLTProcessor();
  $xslt-&gt;importStyleSheet($xsl);

  $xslt-&gt;setParameter("", "p", $p);

  $xml = new DOMDocument();
  $xml-&gt;load("feed.xml");

  return (string) $xslt-&gt;transformToXML($xml);
}


Your parameter should then appears as a &lt;xsl:param /&gt; in your XSLT.