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

What is XQuery doing wrong and why does it get ignored !?

Mike Sokolov sokolov at ifactory.com
Fri Jul 23 16:11:32 PDT 2010

  What is XQuery doing wrong and why does it get
	ignored !?
OK - I may have spoken too soon.  We actually do use xslt for most of 
our heavier transformations.

Still - in the one case you mentioned perhaps

let $thing := /path/to/whatever
where normalize-space($thing)

isn't so terrible

Still I agree that typeswitch is not enough.

It would be better though, if you could have virtual function dispatch based on the argument types

Then you could have something analogous to apply-templates (at least for element types), even if not the full pattern-matching.


On 07/23/2010 02:09 PM, Andrew Welch wrote:
>> Also - I'm quite happy using xquery as a database query / xml transformation
>> language.
> As an xml transformation language xquery is a pain to use... the 3
> main problems I have are:
> 1. If your input xml is in no namespace, and your output xml changes
> the default namespace (such as a bog standard xml ->  xhtml transform)
> then you hit that massive (absolutely massive!) issue of the xpath
> default namespace change.
> 2. In a "process it if its there" scenario which is very common in xml
> transforms, you have to constantly check if the input is there before
> creating the output structure:
> let $thing := /path/to/whatever
> return if (normalize-space($thing)) then
>    <elem>{$thing}</elem>
> else()
> rather than just do xsl:apply-templates.
> 3.  The recursive typeswitch is no substitute for XSLT's recursive descent...
>> I'm less excited about its future as a full-blown web development
>> platform, although for rapid prototyping it is definitely much nicer than
>> having to deal with a Java stack, so it probably has some legs for that
>> race.
> Hopefully that is the future, single-tier end-to-end xml... much more
> fun than your typical java stack.


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.
First Name
Last Name
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-2013 All Rights Reserved.