Home. 
.

transparent

transparent

transparent

Altova Mailing List Archives


RE: [xsl] Create a web interface to query a XML database

From: "Michael Kay" <mike@--------.--->
To: <xsl-list@-----.------------.--->
Date: 10/1/2009 9:52:00 PM
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@g...] 
> Sent: 30 September 2009 18:08
> To: xsl-list@l...
> 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)
> 
> --~------------------------------------------------------------------
> XSL-List info and archive:  http://www.mulberrytech.com/xsl/xsl-list
> To unsubscribe, go to: http://lists.mulberrytech.com/xsl-list/
> or e-mail: <mailto:xsl-list-unsubscribe@l...>
> --~--
> 


--~------------------------------------------------------------------
XSL-List info and archive:  http://www.mulberrytech.com/xsl/xsl-list
To unsubscribe, go to: http://lists.mulberrytech.com/xsl-list/
or e-mail: <mailto:xsl-list-unsubscribe@l...>
--~--



transparent
Print
Mail
Like It
Disclaimer
.

These Archives are provided for informational purposes only and have been generated directly from the Altova mailing list archive system and are comprised of the lists set forth on www.altova.com/list/index.html. Therefore, Altova does not warrant or guarantee the accuracy, reliability, completeness, usefulness, non-infringement of intellectual property rights, or quality of any content on the Altova Mailing List Archive(s), regardless of who originates that content. You expressly understand and agree that you bear all risks associated with using or relying on that content. Altova will not be liable or responsible in any way for any content posted including, but not limited to, any errors or omissions in content, or for any losses or damage of any kind incurred as a result of the use of or reliance on any content. This disclaimer and limitation on liability is in addition to the disclaimers and limitations contained in the Website Terms of Use and elsewhere on the site.

.
.

transparent

transparent