logo
down
shadow

Xquery with SaxonXQDataSource: NoSuchMethodError


Xquery with SaxonXQDataSource: NoSuchMethodError

By : joaspacce
Date : November 14 2020, 04:48 PM
wish of those help The Saxon 9.1.0.8 does not contain the method in question, nor does the Saxon-HE 9.4. You shouldn't need the former either when you have any of the recent versions of the latter. Remove both and use a newer version of Saxon-HE, preferably the latest.
The latest version should contain the method as shown here. You can find the version details here.
code :


Share : facebook icon twitter icon
XQuery and Zorba: Setting the serialization parameters from inside the XQuery document

XQuery and Zorba: Setting the serialization parameters from inside the XQuery document


By : lsyt
Date : March 29 2020, 07:55 AM
hop of those help? Zorba doesn't implement the XQuery 3.0 prolog options for serialization, yet.
The only way to configure the serializer is using the command line interface (e.g. --omit-xml-declaration) or a host language (e.g. the C++ API).
code :
XQuery_t lQuery = aZorba->compileQuery("for $i in (1 to 3) return <a> { $i } </a>");

Zorba_SerializerOptions lSerOptions;
lSerOptions.omit_xml_declaration = ZORBA_OMIT_XML_DECLARATION_YES;

lQuery->execute(std::cout, &lSerOptions);
fn:serialize($result,
  <output:serialization-parameters>
    <output:indent value="yes"/>
    <output:method value="xml"/>
    <output:omit-xml-declaration value="yes"/>
  </output:serialization-parameters>
)
xquery newbie-how to add support for the custom Xquery functions at xqueryfunctions.com, to my java app

xquery newbie-how to add support for the custom Xquery functions at xqueryfunctions.com, to my java app


By : Bruno Moreira
Date : March 29 2020, 07:55 AM
Hope this helps I would suggest start by downloading the functx .xq file from xqueryfunctions.com/xq/download.html to an area in your workspace. Then include this in your project using :
code :
import module namespace functx = "functx" at "functx-1.0-doc-2007-01.xq"
XQuery - Trying to translate SQL query to Xquery (group by, sum, inner join) and miserably failing

XQuery - Trying to translate SQL query to Xquery (group by, sum, inner join) and miserably failing


By : john
Date : March 29 2020, 07:55 AM
I hope this helps you . XQuery is "less declarative" than SQL in the sense that your code often has to follow the structure of the data more than in a typical SELECT/FROM/WHERE SQL query. Joins can be performed naturally through nested FLWOR expressions, not only by gathering all data in pseudo-tables and then matching those.
For your concrete task it is easiest to iterate over all countries and the continents they are on, gather the relevant lakes and the part of their area for each country-continent combination and then group those by continent:
code :
declare variable $lakes-with-islands :=
    for $lake-id in distinct-values(doc('mondial.xml')//island/@lake)
    return doc('mondial.xml')//lake[@id = $lake-id];

for $country in doc('mondial.xml')//country
let $lakes-in-country :=
    $lakes-with-islands[contains-token(@country, $country/@car_code)]
for $encompassed in $country/encompassed
let $proportional-areas :=
    for $lake in $lakes-in-country
    return $lake/area * $encompassed/@percentage div 100
group by $continent := $encompassed/@continent
return <continent name="{$continent}">{sum($proportional-areas)}</continent>
<continent name="europe">7875.5</continent>
<continent name="asia">24721.34</continent>
<continent name="africa">206610</continent>
<continent name="australia">242.66</continent>
<continent name="america">155036.7</continent>
SaxonParserTest missing SaxonXQDataSource?

SaxonParserTest missing SaxonXQDataSource?


By : user2253958
Date : March 29 2020, 07:55 AM
I wish did fix the issue. The class SaxonXQDataSource is in package com.saxonica.xqj. If you are using Saxon-HE, then you will need to have the JAR file saxon9-xqj.jar on the classpath.
The reason Saxon's XQJ library is treated differently from the rest of Saxon-HE is that the licensing is different. The XQJ interface is published by Oracle, and Oracle claim that implementations are subject to the Oracle licensing conditions (some people dispute that implementing a published API requires a license, but that's a matter for the lawyers). The Oracle licensing conditions don't conform to the accepted standards for open source licensing (for two reasons: (a) they disallow modifications, and (b) they require implementations to pass all the reference tests). For this reason some software companies who redistribute Saxon-HE prefer to exclude XQJ from the distribution, and to make this easy, we put the XQJ classes in a separate JAR file.
SaxonXQDataSource class missing from Saxon-HE 9.5.1-6

SaxonXQDataSource class missing from Saxon-HE 9.5.1-6


By : Abod123
Date : March 29 2020, 07:55 AM
wish help you to fix your issue The XQJ package was deliberately removed from the main saxon-he JAR file because it was pointed out to us by people who care about these things that the XQJ license is not "open source" in the strictest sense of the term; for open-source zealots it does not qualify because Oracle (who license it) insist that the interface cannot be modified, and that it cannot be distributed with an implementation unless the implementation passes all the compatibility tests. While these may seem perfectly sensible rules to you and me, it is a sufficient departure from open source principles for some people (e.g. some of the Lunix distributions) to disqualify the whole of Saxon-HE from getting their open-source stamp of approval.
It was our intent to contrinue to distribute the XQJ support in Saxon as a separate module for those who want it. However, I think that in the 9.5.1.6 build (and certainly in the Maven upload) we got this wrong, which is something we need to fix. In the meantime it remains part of Saxon-PE and Saxon-EE (and you can always use those JAR files, without a license, provided you don't try to use PE- or EE- specific functionality).
shadow
Privacy Policy - Terms - Contact Us © ourworld-yourmove.org