binding-types?

Thursday, 12 September 2019 · 4 messages · last reply 16 Sep 2019
BE
Ben Engbers12 Sep 2019 16:27 #
Hi, While creating a R-package, based on my R client-implementation, I found that the binding function was malfunctioning. After rewriting that function, the following is accepted:
query_txt <- "declare variable $name external; for $i in 1 to 5 return
element { $name } { $i }"
query_obj_1 <- Query(Sess, query_txt)
success <- query_obj_1$queryObject$Bind("name", "number")
print(query_obj_1$queryObject$ExecuteQuery())
results in: "<number>1</number>" "<number>2</number>" "<number>3</number>" "<number>4</number>" "<number>5</number>" When I change the line 'success <- query_obj_1$queryObject$Bind("name", "number")' in success <- query_obj_1$queryObject$Bind("name", "number", "xs:integer") the following error is produced: "[XPST0081] No namespace declared for '\002xs:integer'." What types are accepted? Ben
B
ben.engbers12 Sep 2019 16:49 #
xs:string is neither accepted and says that no namespace is defined for 002xs:string Ben -------- Oorspronkelijk bericht -------- Onderwerp: [basex-talk] binding-types?
Quoted text · Ben Engbers · 28 lines
Van: Ben Engbers Aan: Basex Mail-lijst Cc: > Hi, > > While creating a R-package, based on my R client-implementation, I found > that the binding function was malfunctioning. > > After rewriting that function, the following is accepted: > query_txt <- "declare variable $name external; for $i in 1 to 5 return > element { $name } { $i }" > query_obj_1 <- Query(Sess, query_txt) > success <- query_obj_1$queryObject$Bind("name", "number") > print(query_obj_1$queryObject$ExecuteQuery()) > > results in: > "1" "2" "3" > "4" "5" > > When I change the line > 'success <- query_obj_1$queryObject$Bind("name", "number")' in > success <- query_obj_1$queryObject$Bind("name", "number", "xs:integer") > the following error is produced: > "[XPST0081] No namespace declared for '\002xs:integer'." > > What types are accepted? > > Ben
BD
Bridger Dyson-Smith12 Sep 2019 19:59 #
Hi Ben - Does something like:
declare variable $name external; for $i as xs:integer in 1 to 5 return
element { $name } { $i }
work any differently? Best, Bridger
Quoted text · ben.engbers at be-logical.nl · 42 lines
On Thu, Sep 12, 2019 at 10:49 AM ben.engbers at be-logical.nl < ben.engbers at be-logical.nl> wrote: > xs:string is neither accepted and says that no namespace is defined for > 002xs:string > > Ben > > > -------- Oorspronkelijk bericht -------- > Onderwerp: [basex-talk] binding-types? > Van: Ben Engbers > Aan: Basex Mail-lijst > Cc: > > > Hi, > > While creating a R-package, based on my R client-implementation, I found > that the binding function was malfunctioning. > > After rewriting that function, the following is accepted: > query_txt <- "declare variable $name external; for $i in 1 to 5 return > element { $name } { $i }" > query_obj_1 <- Query(Sess, query_txt) > success <- query_obj_1$queryObject$Bind("name", "number") > print(query_obj_1$queryObject$ExecuteQuery()) > > results in: > "1" "2" "3" > "4" "5" > > When I change the line > 'success <- query_obj_1$queryObject$Bind("name", "number")' in > success <- query_obj_1$queryObject$Bind("name", "number", "xs:integer") > the following error is produced: > "[XPST0081] No namespace declared for '\002xs:integer'." > > What types are accepted? > > Ben > >
CG
Christian Grün16 Sep 2019 12:01 #
Hi Ben,
Quoted text · Bridger Dyson-Smith · 1 line
> What types are accepted?
xs:integer would be an expected type indeed [1]. Could you check for us if the problem occurs with other bindings as well? Best, Christian [1] https://github.com/BaseXdb/basex/blob/master/basex-examples/src/main/java/org/basex/examples/local/BindVariables.java#L44
Quoted text · Bridger Dyson-Smith · 53 lines
On Thu, Sep 12, 2019 at 5:59 PM Bridger Dyson-Smith <bdysonsmith at gmail.com> wrote: > > Hi Ben - > > Does something like: > ``` > declare variable $name external; for $i as xs:integer in 1 to 5 return element { $name } { $i } > ``` > work any differently? > > Best, > Bridger > > On Thu, Sep 12, 2019 at 10:49 AM ben.engbers at be-logical.nl <ben.engbers at be-logical.nl> wrote: >> >> xs:string is neither accepted and says that no namespace is defined for 002xs:string >> >> Ben >> >> >> -------- Oorspronkelijk bericht -------- >> Onderwerp: [basex-talk] binding-types? >> Van: Ben Engbers >> Aan: Basex Mail-lijst >> Cc: >> >> >> Hi, >> >> While creating a R-package, based on my R client-implementation, I found >> that the binding function was malfunctioning. >> >> After rewriting that function, the following is accepted: >> query_txt <- "declare variable $name external; for $i in 1 to 5 return >> element { $name } { $i }" >> query_obj_1 <- Query(Sess, query_txt) >> success <- query_obj_1$queryObject$Bind("name", "number") >> print(query_obj_1$queryObject$ExecuteQuery()) >> >> results in: >> "1" "2" "3" >> "4" "5" >> >> When I change the line >> 'success <- query_obj_1$queryObject$Bind("name", "number")' in >> success <- query_obj_1$queryObject$Bind("name", "number", "xs:integer") >> the following error is produced: >> "[XPST0081] No namespace declared for '\002xs:integer'." >> >> What types are accepted? >> >> Ben

⚡Generated with XQuery