XML XSLT AJAX and Database Advice Pls
Question 1: I need to get info from a database... I would like this information in XML so I can process it with XSLT and use that in the browser. The current plan is to use a server side scripting language (PHP) to generate the XML file. My question is, is there an easier way to do this? Do SQL servers have modules/methods to go directly to XML output... (not really XSLT question, but this next one is..)
Question 2: I would like to keep the SQL queries as simple as possible and add the processing of the database results to XSLT files... (for the sorting / filtering through XPATH) ... my question is, how can I pass parameters from my AJAX load script directly to the XSLT file? Would I again need to generate the XSLT file through server side script?
Example:
goal: loadandtranslate("file.xml","file2.xsl?sort=artist ");
expected: loadandtranslate("file.xml","file2.php?sort=artist ");
or do you think it would just be most efficient to generate the XML file instead of the XSLT file?
so...
loadandtranslate("file.php?filterby=someconstraint ","file2.xsl");
any advice is appreciated
|