Hi! I'm a new Sedna user, programming in Scheme on a MacOS X computer.  
I'm having a problem accessing the se:get-property function, as  
described in http://modis.ispras.ru/sedna/progguide/ProgGuidesu8.html.

I have a function that enables me to execute arbitrary XQuery query  
strings (it's a modification of a function known to work):

;--------------------------
(define (infoml:run-XQuery-query2 the-query)
     (sedna:begin-transaction *infoml:Sedna-connection*)
     (let* ((prefix "declare namespace se = 'http:// 
www.modis.ispras.ru/sedna';\n")
            (result (sedna:result->list
                     (sedna:execute-query *infoml:Sedna-connection*  
(string-append prefix the-query)))))
       (sedna:end-transaction *infoml:Sedna-connection* 'COMMIT)
       result))(define (infoml:run-XQuery-query2 the-query)
     (sedna:begin-transaction *infoml:Sedna-connection*)
     (let* ((prefix "declare namespace se = 'http:// 
www.modis.ispras.ru/sedna';\n")
            (result (sedna:result->list
                     (sedna:execute-query *infoml:Sedna-connection*  
(string-append prefix the-query)))))
       (sedna:end-transaction *infoml:Sedna-connection* 'COMMIT)
       result))
;--------------------------



When I execute various queries, I get two different error codes:

;--------------------------
 > (infoml:run-XQuery-query2 "se:get-property($documents as xs:string)  
as item();")
uncaught exception: ((#<procedure:condition?> (exn message "Server  
reported of an error: SEDNA Message: ERROR XPST0003\nIt is a static  
error if an expression is not a valid instance of the grammar defined  
in A.1 EBNF.\nDetails: unexpected token: 'as', line: 2\n")))

 > (infoml:run-XQuery-query2 "se:get-property($documents);")
uncaught exception: ((#<procedure:condition?> (exn message "Server  
reported of an error: SEDNA Message: ERROR XPST0003\nIt is a static  
error if an expression is not a valid instance of the grammar defined  
in A.1 EBNF.\nDetails: unexpected token: ';', line: 2\n")))

 > (infoml:run-XQuery-query2 "se:get-property($documents)")
uncaught exception: ((#<procedure:condition?> (exn message "Server  
reported of an error: SEDNA Message: ERROR XPST0008\nIt is a static  
error if an expression refers to an element name, attribute name,  
schema type name, namespace prefix, or variable name that is not d...

 > (infoml:run-XQuery-query2 "se:get-property($documents)\n")
uncaught exception: ((#<procedure:condition?> (exn message "Server  
reported of an error: SEDNA Message: ERROR XPST0008\nIt is a static  
error if an expression refers to an element name, attribute name,  
schema type name, namespace prefix, or variable name that is not d...
;--------------------------



As you can see, I am unsure as to whether the query string needs to  
end with either a semicolon or "\n", but neither seems to be the root  
cause of the error.

What am I doing wrong?  Thank you for taking the time to respond.

--Gregg

------------------------------------------------------------------------------
Let Crystal Reports handle the reporting - Free Crystal Reports 2008 30-Day 
trial. Simplify your report design, integration and deployment - and focus on 
what you do best, core application coding. Discover what's new with
Crystal Reports now.  http://p.sf.net/sfu/bobj-july
_______________________________________________
Sedna-discussion mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/sedna-discussion

Reply via email to