The XML API allows you to access external variables from XPath and XQuery expressions as well a stylesheet parameters from XSLT stylesheets.
External variables are useful when your XML processing depends on information that is not contained in an input document. If you are writing an application that allows users to search for books by title in a library that is stored as XML, for example, you could prepare a single XQuery expression to find books in the library that uses a variable for the book title to be matched. The resulting XQueryExecutable object can be used for each search that the user submits by binding the submitted book title to the variable. The details of using external variables and stylesheet parameters are presented in separate articles for XPath, XQuery, and XSLT.
In this information ... | IBM Redbooks, demos, education, and more(Index) |