472,796 Members | 1,893 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 472,796 software developers and data experts.

Xquery instead of xslt

I am working to ease updating of a html page by transforming 2 xml files. I
was going to use xslt for this and had bought 2 unopened books, wrox xslt
and o'reilly's xslt cookbook. But am now wondering if I am better of
learning XQuery instead?

Any thought and opinions would be appreciated.

Cheers - Tom.

The Architect: "Hope, it is the quintessential human delusion,
simultaneously the source of your greatest strength, and your greatest
weakness" The Matrix Reloaded (2003)

Jul 20 '05 #1
2 2717
Please see the following from :
http://www.ibiblio.org/xml/slides/sd...xslt2/109.html

=========
What's the difference between XQuery and XSLT?
XSLT is document-driven; XQuery is program driven

XSLT is functional; XQuery is imperative

XSLT is written in XML; XQuery is not

An assertion (unproven): XSLT 2.0 can do everything XQuery can do

=============

I guess for transforming xml to html, xsl would be a better tool.

All the best.

"Tom Corcoran" <to*****************@nospam.btinternet.com> wrote in message
news:bk**********@titan.btinternet.com...
I am working to ease updating of a html page by transforming 2 xml files. I was going to use xslt for this and had bought 2 unopened books, wrox xslt
and o'reilly's xslt cookbook. But am now wondering if I am better of
learning XQuery instead?

Any thought and opinions would be appreciated.

Cheers - Tom.

The Architect: "Hope, it is the quintessential human delusion,
simultaneously the source of your greatest strength, and your greatest
weakness" The Matrix Reloaded (2003)

Jul 20 '05 #2
XSLT is functional; XQuery is imperative Wrong. XML Query is a functional language, like XSLT.
A more correct assertion would be:
XSLT is declarative, XQuery is imperative
XSLT is written in XML; XQuery is not For a human programmer, a non-XML syntax is an advantage IMHO.
Anyway there was and there will be again a XML syntax for XML Query.
An assertion (unproven): XSLT 2.0 can do everything XQuery can do It is almost true, but XQ has a more flexible processing model: you can
build intermediary trees, and work on these trees in the same way as
on input documents.
Conversely, XQ lacks of the template/apply-templates mechanism of XSLT.
It can however be emulated by functions and 'typeswitch'.

So Apart from the syntax, XML Query and XSLT2 are quite
close to each other. They could even be unified in one language.

* XQuery is not yet a stable recommendation. For production
projects it is not advisable to use it.

* Usable up to date open-source implementations:
- Michael Kay's Saxon 7 (http://saxon.sf.net):
XML Query and XSLT 2 (almost complete)
- Qizx/open (http://www.xfra.net/qizxopen/):
XML Query only
strajan wrote: Please see the following from :
http://www.ibiblio.org/xml/slides/sd...xslt2/109.html

=========
What's the difference between XQuery and XSLT?
XSLT is document-driven; XQuery is program driven

XSLT is functional; XQuery is imperative

XSLT is written in XML; XQuery is not

An assertion (unproven): XSLT 2.0 can do everything XQuery can do

=============

I guess for transforming xml to html, xsl would be a better tool.

All the best.

"Tom Corcoran" <to*****************@nospam.btinternet.com> wrote in message
news:bk**********@titan.btinternet.com...
I am working to ease updating of a html page by transforming 2 xml files.


I
was going to use xslt for this and had bought 2 unopened books, wrox xslt
and o'reilly's xslt cookbook. But am now wondering if I am better of
learning XQuery instead?

Any thought and opinions would be appreciated.

Cheers - Tom.

The Architect: "Hope, it is the quintessential human delusion,
simultaneously the source of your greatest strength, and your greatest
weakness" The Matrix Reloaded (2003)



Jul 20 '05 #3

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

2
by: Felix Naumann | last post by:
Hi, I am looking for a Java API to represent/generate XQueries. I would imagine it has a class XQuery.java and other classes such as FLWR.java, ORDER.java etc. and one should be able to add...
1
by: inquirydog | last post by:
Can anyone explain to me why the following XQuery expression (a simple xpath expression) returns a different result than the same expression in xslt? document("document.xml")//a/@b For the...
1
by: Jeff Kish | last post by:
Hi. Can someone tell me when xslt, xpath, xquery are appropriate technologies to consider? I really know nothing about xslt except it is about transforming xml, (but I'm about to embark on a...
8
by: Clamps | last post by:
So I've been reading about XQuery, but cannot find a dll or namespace download to use the technology in vs.net 2002 or 2003. Any directions would be great. -- "If I'm the president, we're going...
1
by: Philipp Schumann | last post by:
Hi .NET XML fans, does anyone know ad hoc whether support for the above standards is planned for .NET 2.0? I suppose this would be extremely valuable for many folks... Thanks, Phil
6
by: Istvan | last post by:
Hello Have anybody an idea how to solve "Some ... in ... satisfies " with standard functions ? For example this: "List the reserves of those open auctions where a certain person issued a...
4
by: ctchrinthry | last post by:
I have some large and complex XML documents. I want to return the whole document with some sections trimmed away. Right now, i read the whole document into some python code, walk the tree, snip...
5
by: CK | last post by:
I have the following XML in an XML column in a SQL 2005 Database. <DeliveryList xmlns="http://schemas.adventure-works.com/DeliverySchedule"> <Delivery SalesOrderID="43659"> <CustomerName>Steve...
3
by: Bloody Viking | last post by:
Namaste, Y'all! I've got a valid XQuery expression that I need to convert to XPath 2.0. This expression will be stored in a resource file and applied to XML by a Java program with saxon8.jar...
0
linyimin
by: linyimin | last post by:
Spring Startup Analyzer generates an interactive Spring application startup report that lets you understand what contributes to the application startup time and helps to optimize it. Support for...
0
by: kcodez | last post by:
As a H5 game development enthusiast, I recently wrote a very interesting little game - Toy Claw ((http://claw.kjeek.com/))。Here I will summarize and share the development experience here, and hope it...
2
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Sept 2023 starting at 18:00 UK time (6PM UTC+1) and finishing at about 19:15 (7.15PM) The start time is equivalent to 19:00 (7PM) in Central...
0
by: Taofi | last post by:
I try to insert a new record but the error message says the number of query names and destination fields are not the same This are my field names ID, Budgeted, Actual, Status and Differences ...
14
DJRhino1175
by: DJRhino1175 | last post by:
When I run this code I get an error, its Run-time error# 424 Object required...This is my first attempt at doing something like this. I test the entire code and it worked until I added this - If...
0
by: Rina0 | last post by:
I am looking for a Python code to find the longest common subsequence of two strings. I found this blog post that describes the length of longest common subsequence problem and provides a solution in...
5
by: DJRhino | last post by:
Private Sub CboDrawingID_BeforeUpdate(Cancel As Integer) If = 310029923 Or 310030138 Or 310030152 Or 310030346 Or 310030348 Or _ 310030356 Or 310030359 Or 310030362 Or...
0
by: lllomh | last post by:
Define the method first this.state = { buttonBackgroundColor: 'green', isBlinking: false, // A new status is added to identify whether the button is blinking or not } autoStart=()=>{
2
by: DJRhino | last post by:
Was curious if anyone else was having this same issue or not.... I was just Up/Down graded to windows 11 and now my access combo boxes are not acting right. With win 10 I could start typing...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.