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
Tony ServaSubject: Error at line 1, column 126. Unexpected token "" for step expression.
Author: Tony Serva
Date: 11 Dec 2007 09:09 PM
Hi,
Trying to use xquery and when I try to preview the result it stops and gives this error: [DataDirect][XQuery][err:XPST0003]Error at line 1, column 126. Unexpected token "<end of expression>" for step expression.

Any ideas to help a struggling newbie
Thanks,
Tony

Postnext
Minollo I.Subject: Error at line 1, column 126. Unexpected token
Author: Minollo I.
Date: 11 Dec 2007 09:15 PM
It's difficult to give you an answer without seeing the query you are trying to run... Now, using my crystal ball I tend to guess that you have an XPath expression at the end of the line which ends with "/", like in "$a/b/"; maybe what you are trying to do is "$a/b"? Or "$a/b/*"? The crystal ball is unclear about that...

Postnext
Tony ServaSubject: Error at line 1, column 126. Unexpected token
Author: Tony Serva
Date: 12 Dec 2007 11:24 AM
Originally Posted: 12 Dec 2007 11:23 AM
I guess I was thinking that it had more to do with the data and a special character was causing it. Sorry I did not give you more to work with.
I was following the training video on xquery. I was using my own data source.I was trying to create a simple FLWOR query by dragging and dropping the table onto the xquey window.
But I get the same error using the customers table in Northwind.

The query is this. It is the one SS created when I tried to create a FLWOR
for $vListings_Trulia_Export in collection("myDatabase.dbo.myTable")/s:sequence/myTable return

for $Customers in collection("Northwind.dbo.Customers")/Customers return

What am I doing wrong?

Postnext
Minollo I.Subject: Error at line 1, column 126. Unexpected token
Author: Minollo I.
Date: 12 Dec 2007 11:34 AM
The query just needs to be completed with what you need; a simple test can be:
for $Customers in collection("Northwind.dbo.Customers")/Customers return $Customers

How did you create the one that mentions s:sequence? You shouldn't need to do that.

Postnext
Tony ServaSubject: Error at line 1, column 126. Unexpected token
Author: Tony Serva
Date: 12 Dec 2007 11:47 AM
Originally Posted: 12 Dec 2007 11:44 AM
I was just following the video. In it the guy dragged the Customers item over to the XQuery source window, selected the FLWOR option, and hit the green run arrow. The "/s:sequence" was created automatically. It is in the tree in the file explorer.
It goes:
Customers
s:sequence
xmlsn:s
Customers
field names...

BTW your suggestion worked. I removed the s:sequence and added the $Customers at the end.
for $Customers in collection("Northwind.dbo.Customers")/s:sequence/Customers return $Customers

Thank you.

Posttop
Ivan PedruzziSubject: Error at line 1, column 126. Unexpected token
Author: Ivan Pedruzzi
Date: 12 Dec 2007 01:24 PM
Hi Mike,


Did you d&d the table name or one of the element below the table level from File Explorer?

I was not able to reproduce the behaviour you have described unless performing a "Read Structure" and then drag & drop from the document structure.

The video tutorial should show the correct operation. Could you please point us to the exact tutorial you were watching?


Thanks
Ivan Pedruzzi
Stylus Studio Team


 
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.