LinuxQuestions.org
Welcome to the most active Linux Forum on the web.
Go Back   LinuxQuestions.org > Forums > Non-*NIX Forums > Programming
User Name
Password
Programming This forum is for all programming questions.
The question does not have to be directly related to Linux and any language is fair game.

Notices


Reply
  Search this Thread
Old 12-15-2007, 04:49 PM   #1
mohtasham1983
Member
 
Registered: Apr 2005
Location: San Jose
Distribution: Fedora 3,4- Ubuntu 6.06 to 8.10, Gentoo and Arch
Posts: 408

Rep: Reputation: 30
xquery or XSLT?


Hi,

I used used to embed html tags inside my php code for developing my website. This approach was the worst possible way of organizing data in a website, so I decided to organize everything using xml so that I can separate presentation from the PHP part. I did a quick research and found out that there are two ways of doing that using XSLT and xquery. I found out that xquery can do anything that XSLT can, but I also found that xquery is not enabled in php-5.2.3.

Basically, I'm having doubt regarding which technology to select so that I can expand the website in future easier.

Right now, website is very small, but this time I'm going to design it in a very well formed structure regardless of if it will grow in future.

I would appreciate your suggestions about what technology to use.

Thanks in advance.
 
Old 12-17-2007, 04:52 AM   #2
bigearsbilly
Senior Member
 
Registered: Mar 2004
Location: england
Distribution: Mint, Armbian, NetBSD, Puppy, Raspbian
Posts: 3,515

Rep: Reputation: 239Reputation: 239Reputation: 239
what are you trying to do?

XSLT is much better suited to formatting XML to HTML output, Xquery is more a
akin to using something like SQL plus, i.e. a query language to mine data.

there are not very many Xquery (open-source) tools out there, the only one I could find was Saxon. It's still very much in it's early stages of take-up.
typically, you use Xquery to filter out the parts of the data you need and then
use XSL to tidy them up.
i.e. I use BOTH.

I wouldn't personally choose to use it for non-trivial stuff, Xquery itself is hopelessly
expensive to run as the documents get larger. Then you get
java.lang.outofmemory errors and you are completely stuffed.



I'm not a fan of XML myself having worked with it for a while.


for instance, we used to have Oracle, and I wrote a price server, where you squirteed price codes to a socket and got the values back, nice and efficient.

now we use XML SOAP requests from an outside contractor, very fahionable.

Now each price must be wrapped in a SOAP envelope and sent individually, so we transfer
about 700 bytes to get a few bytes back.


we have to do that for each price! ridiculous.
but my way is old fashioned!

Last edited by bigearsbilly; 12-17-2007 at 04:54 AM.
 
Old 12-17-2007, 05:47 AM   #3
mohtasham1983
Member
 
Registered: Apr 2005
Location: San Jose
Distribution: Fedora 3,4- Ubuntu 6.06 to 8.10, Gentoo and Arch
Posts: 408

Original Poster
Rep: Reputation: 30
Thanks for responding.

Basically, I didn't find much tools for xquery, either. Since my ubuntu machine and my website server machine both support xslt, I'm working on xslt to transfer my xml files to html.
 
Old 12-17-2007, 06:06 AM   #4
bigearsbilly
Senior Member
 
Registered: Mar 2004
Location: england
Distribution: Mint, Armbian, NetBSD, Puppy, Raspbian
Posts: 3,515

Rep: Reputation: 239Reputation: 239Reputation: 239
yes, well I don't think Xquery is even properly standardised yet.
oracle do an open source XML database that may be worth looking into.

and remember if you plan serious data crunching it's very very expensive.

I like it, it's quite fun but personally I would never use it for serious work.
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
LXer: Process XML using XQuery LXer Syndicated Linux News 0 03-31-2007 12:01 AM
LXer: XQuery Whiteboard for DB2 LXer Syndicated Linux News 0 02-14-2007 08:46 AM
LXer: Build a better mashups with XQuery LXer Syndicated Linux News 0 07-29-2006 06:03 AM
XML / XQuery question... Scrag Programming 1 09-24-2004 01:29 AM
Installing xslt pk21 Linux - Software 0 09-15-2003 10:02 AM

LinuxQuestions.org > Forums > Non-*NIX Forums > Programming

All times are GMT -5. The time now is 11:07 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration