XML Editor
Sign up for a WebBoard account Sign Up Keyword Search Search More Options... Options
Chat Rooms Chat Help Help News News Log in to WebBoard Log in Not Logged in
Show tree view Topic
Go to previous topicPrev TopicGo to next topicNext Topic
Postnext
Adriaan VanderendeSubject: incorrect syntax?
Author: Adriaan Vanderende
Date: 19 Apr 2006 02:16 AM
Hi,

When having this xquery and try to intend it says syntax error ,unexpected namespace:

let $a := (<namespace/>)
return $a/*[name() = "namespace"], $a/namespace


Is it too picky on this namespace field name?
is it a reserved name?

Kind regards
ad van der ende

Postnext
Alberto MassariSubject: incorrect syntax?
Author: Alberto Massari
Date: 19 Apr 2006 03:03 AM
Hi Adriaan,
you have found a bug in the XQuery parser; the "namespace" step in the $a/namespace expression is mistakenly assumed to be part of a "declare namespace" declaration.

Thanks,
Alberto

PS: the correct query would be

let $a := (<wrapper><namespace/></wrapper>)
return ($a/*[name() = "namespace"], $a/namespace)

otherwise the $a is pointing to the element <namespace> and trying to find an element named "namespace" in its child axis will find nothing.

Posttop
Adriaan VanderendeSubject: incorrect syntax?
Author: Adriaan Vanderende
Date: 19 Apr 2006 07:10 AM
Hi,

Thanks for the correction.

But you do got the point!

 
Go to previous topicPrev TopicGo to next topicNext Topic
Download A Free Trial of Stylus Studio 6 XML Professional Edition Today! Powered by Stylus Studio, the world's leading XML IDE for XML, XSLT, XQuery, XML Schema, DTD, XPath, WSDL, XHTML, SQL/XML, and XML Mapping!  
go

Log In Options

Site Map | Privacy Policy | Terms of Use | Trademarks
Stylus Scoop XML Newsletter:
W3C Member
Stylus Studio® and DataDirect XQuery ™are from DataDirect Technologies, is a registered trademark of Progress Software Corporation, in the U.S. and other countries. © 2004-2016 All Rights Reserved.