XMLSpy provides native support for XQuery 1.0 and XQuery 3.1 development and execution with its built-in, standards-conformant XQuery engine powered by RaptorXML. RaptorXML delivers hyper-fast XQuery processing to speed development and test functionality prior to deployment to RaptorXML Server.
The XQuery editor has built-in knowledge of XQuery syntax and provides you with context-sensitive entry helpers at all times, including a list of variables that is updated dynamically as you edit the document. Using the XQuery editor in advanced text view provides intelligent editing features such as syntax coloring, automatic code completion, and many other time-saving utilities to help you create and edit XQuery documents quickly and easily.
Support for schema-awareness in the XQuery editor allows you to harness the full power of XQuery through mechanisms for error isolation, simplified debugging, and enhanced code performance.
XQuery tools in XMLSpy include context-sensitive entry helpers in drop-down menus that open as you type. Entry helpers are also listed in three entry helper windows, as shown in the screenshot above. The color of items in the three Entry Helpers are different and correspond to the syntax coloring used in the text for easy reference.
The XQuery Keywords and XQuery Functions entry helpers are those supported by the XMLSpy XQuery engine. The variables are defined in the XQuery document itself. When a $ and a character are entered in the XQuery document, the character is listed in the Variables entry helper. As soon as a variable name that is being entered matches a variable name that already exists, the newly entered variable name disappears from the Entry Helper.
These entry helpers make it easier to edit XQuery documents by providing valid choices and options as you type, and are also available in the XQuery builder/evaluator window, as described below.
XQuery execution in XMLSpy is powered by the built-in RaptorXML engine, which was written from the ground up to provide the closest possible standards conformance coupled with fast speeds. Still, transformation rates achieved are limited to single-core execution on the CPU available in the developer's machine.
RaptorXML Server, on the other hand, benefits from the substantial increase in processing power afforded by multi-CPU, multi-core servers, which allow it to deliver hyper-performance through increased throughput and efficient memory utilization. You can harness these advantages by utilizing a RaptorXML Server installed on your network for executing XQuery, XSLT, and XML validation jobs. In fact, large XQuery jobs run up to 9x faster when run on RaptorXML Server from inside XMLSpy*.
* To measure this performance increase, we compared execution speeds in XMLSpy alone on a typical developer's machine: Win7 32bit, Core2 Duo E8600 3.3GHz (2 cores), 4GB RAM, against validation speeds using a common RaptorXML Server configuration: Linux server 64bit, Xeon E5-2630 2.3GHz (12 cores), 128GB RAM, from inside XMLSpy over a 1 GB network. Performance results based on Altova internal tests. Your results may vary.
The XPath/XQuery window provides numerous helpful tools for building and testing XQuery expressions, including a builder mode with helpful tools for developing XQuery expressions and evaluator mode for real-time results testing. The XPath/XQuery Builder mode provides:
Built into the XPath/XQuery window is the Evaluator tab, which let you test the results of your XPath/XQuery expressions as you work. Once you’re finished building an expression, click over to Evaluator mode to test the results. You can evaluate the expression against one or more files: the active document, all open files, a folder, or an entire XMLSpy project.
The XQuery Evaluator speeds XQuery development considerably, because you can immediately see the results generated by each expression and adjust as needed. The nine separate tabs come in handy here, as well, because you can see the results of each new expression as you work.
XMLSpy supports XQuery Update Facility 1.0 and 3.0, making it easy to implement the five types of update expressions: insert, delete, replace, rename, and transform. The XPath/XQuery tab provides advanced functionality for composing XQuery Update Facility expressions with full syntax coloring, intelligent code completion, and error message reporting.
The results pane lets you preview the results of the changes, and clicking on a result in the preview pane highlights the affected node in your instance document. Then, you can execute the updates with one click, either in the current file or across all open files, a folder, or an entire XMLSpy project.