Subject: RE: [xsl] Create a web interface to query a XML database From: "Michael Kay" <mike@xxxxxxxxxxxx> Date: Thu, 1 Oct 2009 22:51:23 +0100 |
If your data is in XML, then unless it is trivially small, I would recommend using an XML database to store it, to save the effort of converting it to tables and back again. You can then use XQuery to query it. I would also recommend adding XSLT to the mix, to control the rendition of the results - although XQuery can do this in principle, it is best to separate data access from presentation in your application architecture. You can write a web page that accepts parameters from an HTML form and invokes the query using many different technologies, you have mentioned PHP but Java would work equally well. If you want a higher-level approach, use XForms, which will submit the data in XML. A useful technology that ties all these together is Orbeon: it includes an XForms engine and a pipeline processor capable of invoking XSLT and XQuery tasks and feeding the results down the pipeline. This enables you to write the whole application using high-level languages without dropping into procedural coding. Regards, Michael Kay http://www.saxonica.com/ http://twitter.com/michaelhkay > -----Original Message----- > From: Manuel Souto Pico [mailto:m.soutopico@xxxxxxxxx] > Sent: 30 September 2009 18:08 > To: xsl-list@xxxxxxxxxxxxxxxxxxxxxx > Subject: [xsl] Create a web interface to query a XML database > > Dear all, > > I would like to explore whether XSLT or any other XML-based > language (XQuery, I guess) would provide an alternative way > to create an online dictionary where the user can send > queries to a database and receive an HTML page with the results. > > Using a LAMP environment I can create a webpage in PHP that > offers a search box and which, after the query is submitted > to the MySQL database, generates an HTML page with the > results. This[1] is a rudimentary example so you can see > straightaway what I mean (but I'm sure it's clear enough > without examples). > > Now I have the term data in one TBX file (which is > XML-based). I could convert that to a MySQL database and > create a PHP-based search interface as I have done in the > past, but I thought perhaps it's worth exploring other ways > of querying the XML document directly. > > Well, I just wanted to let you know what I intend to you, > perhaps you can advice me some way to go. Am I on the right > path? Is XSLT/XQuery easier or better than PHP-MySQL if my > data is already in XML format? > Can you suggest some useful resource for this? > > My knowledge of XSLT is pretty basic, but with effort, > research and help I normally manage to do what I need. > > [1] http://dvtg.msoutopico.es/ > > My best regards to you. > > - > Manuel Souto Pico > Linguistic Services (en/fr/pt/ca > gl/es)
Current Thread |
---|
|
<- Previous | Index | Next -> |
---|---|---|
Re: [xsl] Create a web interface to, Manuel Souto Pico | Thread | RE: [xsl] Required cardinality chec, Michael Kay |
Re: [xsl] Correct way to test for n, Wendell Piez | Date | [xsl] RandomList.xsl from FXSL-xslt, Jesper Tverskov |
Month |