bea.com | products | dev2dev | support | askBEA

Download Docs | Site Map | Glossary
Search

Building Queries and Data Views

Accessor and Node Functions

Accessor and node functions operate on different types of nodes and node values. They accept single node input and return a value based on the node type. These function are not available in the XQuery functions section of the Data View Builder, but the Data View Builder will, in some circumstances, generate queries that use these functions. The functions avaiulable are:

- xf:data

- xf:local-name

xf:data

Returns the typed-value of each input node. This function is not available in the XQuery functions section of the Data View Builder.

Data Types

- Input data type: xsext:node?

- Returned data type: xsext:anyValue?

Notes

The xf:data function is available to Liquid Data, but you cannot explicitly map a node in the Data View Builder, so you therefore cannot construct a query in the Data View Builder that uses the xf:data function. In some cases, however, the Data View Builder will implicitly generate queries that use the xf:data function. The typical case when the Data View Builder generates the xf:data function is when it does not know the name of the elements at query generation time, and it uses the xf:data function in a variable expression containing wildcard characters.

If the source value is not a node, the function returns an error.

XQuery Specification Compliance

- Liquid Data does not use a list of nodes; it uses only an optional node.

- Liquid Data does not generate an error when you specify a document node. It returns an empty list.

Examples

- xf:data(<a>{3}</a>) returns the numeric value 3.

- xf:data(<a/>) returns an empty list ().

- xf:data((<a>{3}</a>, <a>{7}</a>)) generates a compile-time error because the parameter is a list of nodes.

- xf:data(<date location="SD">2002-07-12</date>) returns the string value "2002-07-12.".

- xf:data(3) generates a compile-time error because 3 is not a node.

xf:local-name

Returns a string value that corresponds to the local name of the specified node. This function is not available in the XQuery functions section of the Data View Builder.

Data Types

- Input data type: xsext:node

- Returned data type: xs:string?

Notes

The xf:local-name function is available to Liquid Data, but you cannot explicitly map a node in the Data View Builder, so you therefore cannot construct a query in the Data View Builder that uses the xf:local-name function. In some cases, however, the Data View Builder will implicitly generate queries that use the xf:local-name function. The typical case when the Data View Builder generates the xf:local-name function is when it does not know the name of the elements at query generation time, and it uses the xf:local-name function in a variable expression containing wildcard characters.

XQuery Specification Compliance

- Liquid Data does not support the format that accepts no input parameters.

- Liquid Data supports an optional string as the returned value instead of a required string.

Examples

- xf:local-name(<db:homes/>) returns the string value "homes."

- xf:local-name(73) generates a compile-time error because the parameter is a number and not a node.