As the number of XQuery programs a developer or team of developers works with grows,
and as individual queries begin to grow more complicated, you naturally want to break
the queries down into more modular components. The XQuery modules feature allows you
to group commonly used functions and variables in reusable library modules. You can
import any number of library modules into the main XQuery module that contains the
XQuery body. Library modules can also import other library modules. This ability
allows great flexibility for sharing and reusing XQuery code. Also, the addition of a
XModuleResolver interface to the API allows you to
customize the module resolution process. You can register an implementation of this
interface with the
XStaticContext to override the
default module resolution behaviour. This ability makes it even easier for you to
share code as a user-provided implementation of
XModuleResolver can locate library modules wherever you store them for convenient, optimal sharing and reuse.
The embedded extension functions feature allows you to bind a namespace prefix to a Java class containing one or more extension functions directly within a stylesheet or query. You then can call the functions using standard function call syntax, by combining this prefix with the name of the method to be invoked. The XSLT/XQuery processor uses the information in the function call, including the function name and the number of arguments, to select the method. This approach reduces the amount of explicit Java programming needed to declare and bind extension functions. It also further enhances reusability, as queries or stylesheets that use reusable modules do not need to know about the extension functions that those modules might invoke, other than ensuring that any classes needed by the modules are on the classpath at runtime.
Finally, runtime error messages now include the name of the source file, the line number, and the column number where the error occurred. This feature is especially useful for large modular stylesheets and queries, where locating the source of an error such as "the value 'a' is not valid for the type xs:integer" can be very time consuming. Also, where code is shared (such as in the use of modules), you can direct the problem to the right developer or team much more efficiently, or even the right company or organization in the case of third-party code. Not just for developers, this new feature also makes it much easier to diagnose problems in production environments.
Overall, these three new features work together to enhance the development experience, improve developer efficiency, and reduce maintenance costs.
- Feature Pack for XML 220.127.116.11 Technology Preview: IBM WebSphere Application Server: Explore the latest features for the Feature Pack for XML now.
- Feature Pack for XML, Version 1.0: View the latest Feature Pack for XML documentation.
- Installing and uninstalling the feature pack on distributed operating systems: Install this WebSphere Application Server feature pack with the IBM Installation Manager, a common installer for many IBM software products.
- Installing and configuring the feature pack on z/OS systems: Install the Feature Pack for XML on WebSphere Application Server for z/OS® Version 7.0 with the System Modification Program/Extended (SMP/E).
- XQuery 1.0: An XML Query Language (W3C Recommendation, January 2011): Read more about the XQuery query language and its modules, prologs, and module declaration and import.
- XML area on developerWorks: Get the resources you need to advance your skills in the XML arena.
- WebSphere zone on developerWorks: Explore technical resources for the WebSphere software platform.
- WebSphere Application Server zone on developerWorks: Find information about WebSphere Application Server, the foundation of the IBM WebSphere software platform, and deliver the secure, scalable, resilient application infrastructure that you need for SOA.
- IBM XML certification: Find out how you can become an IBM-Certified Developer in XML and related technologies.
- XML technical library: See the developerWorks XML Zone library for a wide range of technical articles and tips, tutorials, standards, and IBM Redbooks. Also, read more XML tips.
- My developerWorks: Personalize your developerWorks experience.
- developerWorks technical events and webcasts: Stay current with technology in these sessions.
- developerWorks on Twitter: Join today to follow developerWorks tweets.
- developerWorks podcasts: Listen to interesting interviews and discussions for software developers.
- developerWorks on-demand demos: Watch demos ranging from product installation and setup for beginners to advanced functionality for experienced developers.
Get products and technologies
- IBM product evaluation versions: Download or explore the online trials in the IBM SOA Sandbox and get your hands on application development tools and middleware products from DB2®, Lotus®, Rational®, Tivoli®, and WebSphere®.
- XML zone discussion forums: Participate in any of several XML-related discussions.
- The developerWorks community: Connect with other developerWorks users while exploring the developer-driven blogs, forums, groups, and wikis.