[XSL-LIST Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message]

RE: Create a web interface to query a XML database

Subject: RE: Create a web interface to query a XML database
From: "Michael Kay" <mike@xxxxxxxxxxxx>
Date: Thu, 1 Oct 2009 22:51:23 +0100
RE:  Create a web interface to query a XML database
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:  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

PURCHASE STYLUS STUDIO ONLINE TODAY!

Purchasing Stylus Studio from our online shop is Easy, Secure and Value Priced!

Buy Stylus Studio Now

Download The World's Best XML IDE!

Accelerate XML development with our award-winning XML IDE - Download a free trial today!

Don't miss another message! Subscribe to this list today.
Email
First Name
Last Name
Company
Subscribe in XML format
RSS 2.0
Atom 0.3
Site Map | Privacy Policy | Terms of Use | Trademarks
Free Stylus Studio XML Training:
W3C Member
Stylus Studio® and DataDirect XQuery ™are products from DataDirect Technologies, is a registered trademark of Progress Software Corporation, in the U.S. and other countries. © 2004-2011 All Rights Reserved.