Getting Started with XSLT - Appendix: XPath Function -

xiaoxiao2021-03-06  63

record

--1

XPath function

--2

Node collection function

--3

String function

--4

Boolean function

--5

Numerical function

1 xpath function

XPath provides a library to calculate an expression. The function is divided into node functions, string functions, Boolean functions, and numerical functions. Here will introduce several functions that XPath inevitably supported. See References [5] for parameters and return values.

2 Node Collection Functions

last

Returns the length of the context.

Position

Returns the current location of the context.

count

Returns the number of nodes.

3 text list

String

Convert objects into strings.

Concat

Connect strings.

START-with

The string specified by the first parameter starts with the string specified by the second parameter begins.

Contains

The first parameter specified by the string contains the string specified by the second parameter, returns true.

Substring-before

If the string specified by the second parameter is found in the string specified by the first parameter, the portion before the first parameter is first discovered in the first parameter.

Substring -After

If the string specified by the second parameter is found in the string specified by the first parameter, the portion after the first parameter is first discovered in the first parameter.

4 Boolean function

Boolean

Convert objects into Boolean values.

NOT

Reverse the true and false value.

True

Return true.

False

Return.

5 numeric functions

Number

Convert objects to values.

Sum

Convert the string of the strings of each node within the node set specified by the parameter, then return them and.

Round

Returns the closest integer that is closest to the value specified by the parameter.

转载请注明原文地址:https://www.9cbs.com/read-112554.html

New Post(0)