wmsigler 0 Newbie Poster

Is it possible to apply XSLT on XML output from a Perl CGI script?

I.e. I have a registration form, when submitted it makes an Ajax request, building a query string from the form inputs. The request is made to a Perl CGI script.

This script can be called two ways, both using Ajax. The first simply reads an XML file, and outputs the file, and Ajax sticks it in a div container. The other way (via form submission and the query string), actually appends the form data to the XML file, e.g.:

<root>
  <entry>data</entry>
</root>

now becomes:

<root>
  <entry>data</entry>
  <entry>moredata</entry>
</root>

Now, at the top of the XML file I have a link to an XSLT stylesheet. My original intentions were to output the XML file to the div container, but have it apply the XSLT templates so it would be formatted like an HTML table. However, it seems to be ignoring the XSLT completely, simply outputting the raw XML output returned from the CGI program.

Is there a way to fix this, and have it use my XSLT formatting? Much thanks in advance! :)