Questions tagged [xqj]

Questions relating to the use of XQJ, the XQuery API for Java defined in JSR 225, which is implemented in a number of Java-based XQuery products including BaseX and Saxon

12 questions
7
votes
2 answers

Howto refer dynamically to an XML file in XQuery in Saxon

I am using the XQuery processor Saxon. Now we write our XQuery in a ".xqy" file where we refer to the XML file on which we will perform our XQuery. Please see the example below: for $x in doc("books.xml")/books/book where $x/price>30 return…
Rahul ray
  • 191
  • 1
  • 4
  • 12
2
votes
2 answers

String as xml data source in XQJ

I would like to parse my XML string using an XQJ implementation, for example, SAXON. All examples I could find refer to some database connections. Is it possible to use simple String as xml source?
Konstantin Milyutin
  • 11,946
  • 11
  • 59
  • 85
2
votes
1 answer

BaseX XQJ API error on undefined variable, while variable is defined

I'm using BaseX XQJ API to execute xquery queries on XML files within my java application. The following xquery that I constructed nicely generates the output that I want: let $doc := doc("eprints") for $i in distinct-values($doc//issn) let $jn :=…
Niek Tax
  • 841
  • 1
  • 11
  • 30
1
vote
0 answers

Error while using the Base XQJ library in Android

I am trying to use XQuery in an Android environment. & for that, I downloaded & included the Base XQJ library JARs in my project. When I compile the sample code that they provide: import javax.xml.xquery.*; import javax.xml.namespace.QName; import…
Mohammed Aouf Zouag
  • 17,042
  • 4
  • 41
  • 67
1
vote
1 answer

Exception when getting result of xquery

I want to execute simple xquery in java. But i get exception org.springframework.web.util.NestedServletException: Request processing failed; nested exception is javax.xml.xquery.XQException: XQJFOS017 - Can not call getItemType() when Forward Only…
DanStopka
  • 535
  • 5
  • 22
1
vote
1 answer

xquery to find value of a child attribute by giving values for one attibute at same level and parent and one of

I need to find value for a child attribute by giving values for one attibute at the same level and its parent at highere level. Another requirement is find value for a child attribute for which another attribute at same level with maximum value and…
Kuruvi
  • 45
  • 9
0
votes
1 answer

XQuery Saxon Exception (java.lang.IllegalArgumentException)

I am not a XQuery expert. Jut know enough to get by. Recently I had migrated my very Xquery execution code from Saxon 8.4 to 9.9.1.2. So I did some changes in the way the XQ files are executed. The code is error free but during runtime, I get an…
hell_storm2004
  • 1,401
  • 2
  • 33
  • 66
0
votes
1 answer

How to use Xquery 3.1 (new features like Maps and Arrays) in JAVA (in XQJ or in any other way)?

What I already tried :- Saxon XQJ XQJ with BaseX XQJ with Sedna XQJ with eXist I was not able to use XQuery 3.1 in any one of them. Any clues ?
user6276653
  • 140
  • 1
  • 2
  • 11
0
votes
0 answers

Accessing XML using XQuery (within XQJ code) from a column in database table

I have created the following table in my locally installed Oracle database :- CREATE TABLE "SYSTEM"."WAREHOUSES" ( "WAREHOUSE_ID" NUMBER NOT NULL ENABLE, "WAREHOUSE_SPEC" CLOB, CONSTRAINT "WAREHOUSES_PK" PRIMARY KEY…
user6276653
  • 140
  • 1
  • 2
  • 11
0
votes
1 answer

Import XML file in Oracle XML DB Repository

I am new to XML databases. I have the following XML file (employees.xml) :-
user6276653
  • 140
  • 1
  • 2
  • 11
0
votes
1 answer

How to implement XQL Join using JAVA?

I am quite new to XQL and recently studied XQL Joins (join on XML documents) here :- http://www.ibiblio.org/xql/xql-proposal.html#Joins . I was just wondering that if I want to implement an XQL Join in JAVA, how can I do that using JAVA ? Join is a…
user6276653
  • 140
  • 1
  • 2
  • 11
0
votes
1 answer

Invalid XQuery syntax, syntax does not pass static validation

i am getting this error when i am trying to do a query with xqj. Exception in thread "main" javax.xml.xquery.XQException: XQJQS001 - Invalid XQuery syntax, syntax does not pass static validation. Root Cause: XQueryParseException: Encountered…
user3325719
  • 75
  • 4
  • 14