The following node functions have been provided:
- ChoosenNode
- CodesetValue
- CodesetValues
- FullCaption
- KeyXPath
- Node
- NodeLabel
- NodeName
- Nodes
- NodeValue
- NodeValues
- Position
- ShortCaption
- TreeHierarchyContext
- TreeIconName
ChoosenNode
Returns the selected type below a choice element.
Syntax |
Return value |
choosenNode(XPath) |
Type |
choosenNode(Type) |
|
Example |
|
Expression: |
Result: |
choosenNode("/purchaseOrder/paymentMethod") |
|
choosenNode(node("/purchaseOrder/paymentMethod")) |
|
CodesetValue
Returns the codeSetValue of the referred type.
Syntax |
Return value |
codeSetValue(XPath) |
String |
codeSetValue(filePath,codesetName,codeId) |
|
Example |
|
Expression: |
Result: |
codeSetValue("/purchaseOrder/deliveryOption") |
|
codeSetValue("c:\\jaxfront_swing\\examples |
|
CodesetValues
For each type, addressed by an XPath expression returns the appropriate code set value.
Syntax |
Return value |
codeSetValues(XPath) |
Vector |
Example |
|
Expression: |
Result: |
codeSetValues("/purchaseOrder/deliveryOption") |
|
FullCaption
Returns the path up to the highest father node (without the root node) including the label of the starting type. For father nodes, which are represented in the tree, the tree label is inserted in the path. If not, then their heading text is used. For list nodes the list index is additionally attached to the label. Labels are separated from each other through " - ". Additionally the length can be limited to a fix character length.
Syntax |
Return value |
fullCaption(XPath) |
String |
fullCaption(Type) |
|
Example |
|
Expression: |
Result: |
fullCaption("/purchaseOrder/items/prize/currency") |
ite... - items[1] - prize - currency |
fullCaption("/purchaseOrder/items/prize/currency",3) |
ite... - ite... - pri... - cur... |
fullCaption(node("/purchaseOrder/items/prize/currency")) |
ite... - items[1] - prize - currency |
KeyXPath
Returns the key XPath of a selected type within a reference definition.
Syntax |
Return value |
keyXPath(XPath) |
String |
Example |
|
Expression: |
Result: |
keyXPath(".") |
|
Node
The node function returns exactly one type element, to which the TypePath applies. If the reference consists of several elements, then the first element of the list is always returned.
Syntax |
Return value |
node(XPath) |
Type |
Example |
|
Expression: |
Result: |
node(„/purchaseOrder/name") |
|
NodeLabel
Returns the label, which was referred over an XPath expression. If necessary the label is translated into the current language. If the addressed type is about a "Complex Type", then the heading text is returned.
Syntax |
Return value |
nodeLabel(XPath) |
String |
nodeLabel(Type) |
|
Example |
|
Expression: |
Result: |
nodeLabel"/purchaseOrder/@date") |
Datum (example for a NLS label in German) |
nodeLabel("/purchaseOrder/items") |
Artikel (example for a NLS caption title in German) |
nodeLabel(node("/purchaseOrder/shipTo")) |
|
NodeName
Returns the name of a type, referred by the XPath.
Syntax |
Return value |
nodeName (XPath) |
String |
nodeName (XPath, expression) |
|
Example |
|
Expression: |
Result: |
nodeName("/purchaseOrder/@orderDate") |
"orderDate" |
Nodes
The Nodes function returns all by a type-path referred values as vector of types. The Nodes function can be used within the count function! Beyond that, you can limit the selection of the referred types over a simple condition. See the following example:
Syntax |
Return value |
nodes (typepath) |
Vector |
nodes(typepath, expression) |
|
Example |
|
Expression: |
Result: |
nodes("/purchaseOrder/item/productName") |
|
nodes("/purchaseOrder/item/productName","=='C'") |
|
NodeValue
NodeValue returns the value of an element. The data type defined in the XML schema is considered and returned as this type. If several types are referred, then the value of the first hit is returned. With NodeValue all defined functions and operations in this section can be carried out.
Syntax |
Return value |
nodeValue(XPath) |
String |
nodeValue(Type) |
Double |
|
Float |
|
Boolean |
Example |
|
Expression: |
Result: |
node(„/purchaseOrder/name") |
|
NodeValues
NodeValues returns all by a type-path referred values as vector. The data types defined in the XML schema are considered and returned. With NodeValues only a few functions and operations can be carried out, that is, Sum, Count, Min, Max, and Average. Beyond that, it is possible to limit the selection of the referred types over a simple condition (See the example).
Syntax |
Return value |
nodeValues (XPath) |
Vector |
nodeValues(XPath, expression) |
|
Example |
|
Expression: |
Result: |
nodeValues("/purchaseOrder/items/name") |
|
nodeValues("/purchaseOrder/items/name","=='Test'") |
|
Position
Position returns the position of the type within a list. If the type is not a part of a list, then the value 1.0 is returned. As argument only the node function can be used!
Syntax |
Return value |
position (Type) |
Integer |
Example |
|
Expression: |
Result: |
position(node(".")) |
3 |
ShortCaption
Returns the path up to the highest father node (without the root node) including the label of the starting type. Only the elements displayed in the tree are included in the path. Labels are separated by " - ".
Syntax |
Return value |
shortCaption(XPath) |
String |
shortCaption(Type) |
|
Example |
|
Expression: |
Result: |
shortCaption("/purchaseOrder/shipToAdress/name") |
shipToAdress - name |
TreeHierarchyContext
Returns the names of a tree entry and the label of the referred node.
Syntax |
Return value |
treeHierarchyContext(XPath) |
String |
treeHierarchyContext(Type) |
|
Example |
|
Expression: |
Result: |
treeHierarchyContext("./anyType") |
|
treeHierarchyContext(node("/purchaseOrder")) |
purchaseOrder |
TreeIconName
Returns the icon name of a tree node, addressed over an XPath expression. Optionally, it can indicate whether the result of the referred node contains an XPath expression. If so, this XPath can be used for the resolution of the „treeIconName".
Syntax |
Return value |
treeIconName(XPath) |
String |
treeIconName(XPath, Boolean) |
|
Example |
|
Expression: |
Result: |
treeIconName("/purchaseOrder/email") |
email.gif |
treeIconName("/purchaseOrder/items/context/path",true) |
productA.gif |