Download Altova XMLSpy 2010
Transcript
XSLT and XQuery XQuery 127 To insert a variable after the $ character (when typing), or to replace a selected variable, double-click the variable you want in the pop-up menu. Functions Just as with keywords and variables, a pop-up menu of built-in functions is displayed when you select a function (displayed in olive) and press Ctrl+Space. (A function is selected when you place the cursor within a function name, or immediately before or after a function name. The cursor must not be placed between the parentheses that follow the function's name.) Double-clicking a function name in the pop-up menu replaces the selected function name with the function from the pop-up menu. To display a tip containing the signature of a function (screenshot below), place the cursor immediately after the opening parenthesis and press Ctrl+Space. Please note: The signature can be displayed only for standard XQuery functions. The downward-pointing arrowhead indicates that there is more than one function with the same name but with different arguments or return types. Click on the signature to display the signature of the next function (if available); click repeatedly to cycle through all the functions with that name. Alternatively, you can use the Ctrl+Shift+Up or Ctrl+Shift+Down key-combinations to move through a sequence. 7.2.5 XQuery Validation and Execution Validating XQuery documents To validate an XQuery document: 1. Make the XQuery document the active document. 2. Select XML | Validate, or press the F8 key, or click the toolbar icon. The document will be validated for correct XQuery syntax. Executing XQuery documents XQuery documents are executed within XMLSpy using the built-in XQuery 1.0 engine. The output is displayed in a window in XMLSpy. Typically, an XQuery document is not associated with any single XML document. This is because XQuery expressions can select any number of XML documents with the doc() function. In XMLSpy, however, before executing individual XQuery documents you can select a source XML document for the execution. In such cases, the document node of the selected XML source is the starting context item available at the root level of the XQuery document. Paths that begin with a leading slash are resolved with this document node as its context item. © 2010 Altova GmbH User Manual