[basex-talk] Origami presentation XML Amsterdam
Hi, Anyone on the list coming to Amsterdam the 6th of November? We may have some beers together. I will (finally) be presenting on the Origami templating library. I'm still working on it over on Github (in the unstable branch). After a pause in development it was almost completely rewritten. I intend to cut a new release just before the conference. Here's the anouncement I made for the conference website. XQuery 3.1 is still a candidate for recommendation by the W3C. Nevertheless there are already various implementations ready for use today. The introduction of maps and arrays, and the availability of functional weaponry such as fold and apply may change the way you write XQuery applications. You can still wield the trusty weapons of XPath and the FLWOR expression while, at the same time, adopting a more functional style of programming. Origami is an ongoing exploration of templating in XQuery and it makes heavy use of this functional style. It started with a quest for a more XSLT-like transformation capability and recently took a nice turn with the adoption of a flavor of micro-XML, with a heavy reliance on maps and arrays. Origami's unfolding design tries to honour principles of simplicity and composability. With Origami I aim to decomplect, or disentangle, several aspects common to templating problems and offer them in a powerful library using a couple of simple abstractions. With some practical code examples I will demonstrate how to use Origami to implement different templating styles. --Marc
Re: [basex-talk] crypto module with binary files
Hi Michel, As the function only accepts strings as input, you can either explicitly cast your binary item to string – via xs:string($binary)… or contact the author of the module (Claudius Teodorescu) and issue a feature request. HTH, Christian On Tue, Sep 29, 2015 at 2:22 PM, Michel Banguerski wrote: > Greetings all, > > I would like to perform cryptographic operations with arbitrary binary files > but am unable to figure how to convert the output of file:read-binary() to > something that could be processed by crypto:hmac() for example. > > Can You give me a hint please? > > TIA > Best regards > Michel
Re: [basex-talk] Java access to JSON-to-XML transformation
Hi Hans-Jürgen, Sure, that's possible. This is one of the entry points [1]. As you already indicated, it's not based on any well-defined API, so it is subject to change. Have you already done some testing what's the current bottleneck in terms of performance (e.g. by using the Java flag -Xhrunprof)? Maybe you can already save time by creating instances of the QueryProcessor class (see e.g. [2]). Cheers, Christian [1] https://github.com/BaseXdb/basex/blob/master/basex-core/src/main/java/org/basex/io/parse/json/JsonConverter.java#L71 [2] https://github.com/BaseXdb/basex/blob/master/basex-examples/src/main/java/org/basex/examples/local/RunQueries.java On Mon, Sep 28, 2015 at 2:23 PM, Hans-Juergen Rennau wrote: > Dear BaseX team, > > I have a question concerning the availability of the JSON-to-XML > transformation. Before asking, this remark: I am very glad and grateful that > BaseX offers this functionality (json:parse), as it exposes JSON to XPath, > which enables important evaluations that otherwise would not even be > attempted. And now my question. > > Is it possible - does it appear reasonable - to access the functionality > within a Java application by calling the BaseX code > (org.basex.build.json.JsonParser, I suppose)) immediately, without launching > XQuery? > > I expect that one would be treading dangerous ground, relying on internal > APIs which may change any time, not being meant for external use. If this is > so, a brief confirmation would suffice to make me drop the idea. > > Thank you, and kind regards - > Hans-Jürgen > > PS: Background of my question - I evaluate alternative possibilities how to > validate JSON within Java applications. One (and probably the best) option > is validating against JSON schema (json-schema.org), an alternative would be > a to-XML transformation followed by XSD validation. A first experiment > lettig BaseX via XQJ execute the epic query "json:parse(.)" revealed a > performance which would not be sufficient to be competitive. So I wondered > if removing the overhead of launching BaseX might be an approach to > consider.
[basex-talk] crypto module with binary files
Greetings all, I would like to perform cryptographic operations with arbitrary binary files but am unable to figure how to convert the output of file:read-binary() to something that could be processed by crypto:hmac() for example. Can You give me a hint please? TIA Best regards Michel