Package net.sf.saxon.expr
Class ItemTypeCheckingFunction<T extends Item<?>>
- java.lang.Object
-
- net.sf.saxon.expr.ItemTypeCheckingFunction<T>
-
- All Implemented Interfaces:
ItemMappingFunction<T,T>
public class ItemTypeCheckingFunction<T extends Item<?>> extends Object implements ItemMappingFunction<T,T>
A mapping function for use in conjunction with anItemMappingIteratorthat checks that all the items in a sequence are instances of a given item type
-
-
Constructor Summary
Constructors Constructor Description ItemTypeCheckingFunction(ItemType requiredItemType, RoleDiagnostic role, Expression failingExpression, Configuration config)Create the type-checking functionItemTypeCheckingFunction(ItemType requiredItemType, RoleDiagnostic role, Location locator, Configuration config)
-
-
-
Constructor Detail
-
ItemTypeCheckingFunction
public ItemTypeCheckingFunction(ItemType requiredItemType, RoleDiagnostic role, Expression failingExpression, Configuration config)
Create the type-checking function- Parameters:
requiredItemType- the item type that all items in the sequence must conform torole- information for error messagesfailingExpression- the location of the expression for error messagesconfig- the Saxon configuration
-
ItemTypeCheckingFunction
public ItemTypeCheckingFunction(ItemType requiredItemType, RoleDiagnostic role, Location locator, Configuration config)
-
-
Method Detail
-
mapItem
public T mapItem(T item) throws XPathException
Description copied from interface:ItemMappingFunctionMap one item to another item.- Specified by:
mapItemin interfaceItemMappingFunction<T extends Item<?>,T extends Item<?>>- Parameters:
item- The input item to be mapped.- Returns:
- either the output item, or null.
- Throws:
XPathException- if a dynamic error occurs
-
-