Working with XPath Data Types

The XPath types Boolean and Number can map either to the corresponding Java primitive types or to the corresponding Java object types. If the XPath processor is looking for a function that accepts XPath parameters 3.2 and true, it looks first for a function that accepts (double, boolean) and then (Double, Boolean). Functions that accept some combination of primitive types and object types are not recognized by the XPath processor.

The XPath processor determines the actual return type of a function at run time. For example, the XPath processor treats the return type of the function in the preceding section as an XPath Number because the object it returns is an instance of the Java class Double. You must declare all functions to return type Object, regardless of the actual type of the return value.

Stylus Studio's Advanced XQuery Mapper Features

Learn how to create an advanced XQuery expression in the XQuery mapper, specifying operations, constants, and ports, for use in conditional blocks and FLWR expressions. Free online video demonstration!

XQuery Talk Blog

Get the latest XQuery news and information at XQuery-Talk - an online community for discussing XQuery technologies, examples, implementations and more. Bookmark this RSS or ATOM feed now!

Internet & eBusiness

Internet & eBusiness

XSLT Mapper

Simplify XSLT mapping with the Stylus Studio XSLT Mapper - supports multiple data sources, round-trip engineering (synchronized editing views), XSLT function blocks, integrated XSLT preview and more.

Stylus Most Wanted

 
Free Stylus Studio XML Training:
W3C Member