[XQuery Talk Mailing List Archive Home] [By Date] [By Thread] [By Subject] [By Author] [Recent Entries] [Reply To This Message]

replacing a node in in-memory XML

John Snelson john.snelson at oracle.com
Wed Nov 7 12:58:13 PST 2007


  replacing a node in in-memory XML
Andrew Welch wrote:
> On 06/11/2007, John Snelson <http://x-query.com/mailman/listinfo/talk> wrote:
>> Maybe there's not a lot of difference in the two examples given - but I
>> guess my preference will always be for a non-XML syntax for my code if I
>> have a choice.
> 
> that's interesting - even when the code contains XML fragments?
> 
> I there a reason behind your preference or is it just a personal
> preference?  I've always considered XSLT's XML syntax to be an
> advantage when you're adding XML to the result...

Or course it's just personal preference, but I think it's a preference 
shared by the majority of programmers in the world - otherwise people 
would be writing their Java or C++ in XML.

I think XQuery has it right in a lot of ways. You can use a nice human 
readable syntax for your code, but still embed XML (like) syntax when 
dealing with nodes.

If you compare any non-trivial logic written with XSLT instructions with 
that written in XQuery, I'm sure most people would find the XQuery 
easier to read.

Sam Wilmott wrote an interesting paper on this a while back [1], 
although I'm not sure I like the alternative XSLT syntax he proposes. I 
think something like XQuery extended with templates would be much nicer 
to read and write. In fact, I've got a prototype of that up and running 
at the moment - and I'm playing with it to see how little I need to add 
to XQuery to make it functional as a good alternative to XSLT.

John

[1] http://www.wilmott.ca/rxslt/rxslt.html

-- 
John Snelson, Oracle Corporation
Berkeley DB XML:        http://www.oracle.com/database/berkeley-db/xml
XQilla:                                  http://xqilla.sourceforge.net


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-2007 All Rights Reserved.