Using DataDirect XQuery™ to Bind External Variables to Dynamic Values

In the examples described in XQuery Operation Examples for an ACORD Insurance Application, we focused only on the kind of XQuery that is required to resolve processing requests received by our hypothetical ACORD-based system. But how do you execute an XQuery using DataDirect XQuery™? How do you bind external XQuery variables to dynamic values?

DataDirect XQuery™ implements the XQJ (XQuery for Java) interface. XQJ is analogous to JDBC, which is used by Java applications in conventional SQL environments. The XQJ API specification (JSR 225) is currently in Public Review, part of the Java Community Process (JCP). You can learn more about this emerging standard here: http://www.jcp.org/en/jsr/detail?id=225.

The examples described in the following pages show how you can use the DataDirect XQuery™ XQJ implementation to execute any of the XQuery examples described in XQuery Operation Examples for an ACORD Insurance Application and which require binding documents to external variables in the Java code. We also show how XQJ can be used in your EJB environment. Finally, we will try to answer a question that is probably on your mind: how difficult is it to achieve the same kinds of results using alternative technologies, like a conventional SQL+DOM approach in your Java application?

Examples in This Section

Prev: "Using DataDirect XQuery™ to Generate PDF"

Next: "DataDirect XQuery™ and XQJ"


Copyright © 1993 - 2008. Progress Software Corporation. All rights reserved. | N. America: 800 876 3101 | World: +44 (0) 1753 218 930