-
Notifications
You must be signed in to change notification settings - Fork 22.5k
/
index.md
123 lines (93 loc) · 4.27 KB
/
index.md
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
---
title: EXSLT
slug: Web/EXSLT
page-type: landing-page
---
EXSLT is a set of extensions to [XSLT](/en-US/docs/Web/XSLT). There are a number of modules; those that are supported by Firefox are listed below:
{{SubpagesWithSummaries}}
## EXSLT modules
To use an EXSLT function, you need to declare the namespace the function is in, and then use the appropriate prefix when calling the function. For example, to use the regular expressions package:
```xml
<xsl:stylesheet version="1.0"
xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
xmlns:regexp="http://exslt.org/regular-expressions">
<xsl:template match="/">
…
<xsl:value-of select="regexp:replace(/root/@value, 'before', 'gi', 'AFTER')"/>
…
</xsl:template>
</xsl:stylesheet>
```
### Common
The EXSLT Common package provides basic functions that expand upon the capabilities of XSLT. The namespace for the Common package is `http://exslt.org/common`.
#### Functions
- [`exsl:node-set()`](/en-US/docs/Web/EXSLT/exsl/node-set)
- [`exsl:object-type()`](/en-US/docs/Web/EXSLT/exsl/object-type)
### Math
The EXSLT Math package provides functions for working with numeric values and comparing nodes. The namespace for the Math package is `http://exslt.org/math`.
#### Functions
- [`math:highest()`](/en-US/docs/Web/EXSLT/math/highest)
- [`math:lowest()`](/en-US/docs/Web/EXSLT/math/lowest)
- [`math:max()`](/en-US/docs/Web/EXSLT/math/max)
- [`math:min()`](/en-US/docs/Web/EXSLT/math/min)
### Regular expressions
The EXSLT Regular Expressions package provides functions that allow testing, matching, and replacing text using JavaScript style regular expressions.
The EXSLT Regular Expressions namespace is `http://exslt.org/regular-expressions`.
#### Functions
- [`regexp:match()`](/en-US/docs/Web/EXSLT/regexp/match)
- [`regexp:replace()`](/en-US/docs/Web/EXSLT/regexp/replace)
- [`regexp:test()`](/en-US/docs/Web/EXSLT/regexp/test)
### Sets
The EXSLT Sets package offers functions that let you perform set manipulation. The namespace for these functions is `http://exslt.org/sets`.
#### Functions
- [`set:difference()`](/en-US/docs/Web/EXSLT/set/difference)
- [`set:distinct()`](/en-US/docs/Web/EXSLT/set/distinct)
- [`set:intersection()`](/en-US/docs/Web/EXSLT/set/intersection)
- [`set:has-same-node()`](/en-US/docs/Web/EXSLT/set/has-same-node)
- [`set:leading()`](/en-US/docs/Web/EXSLT/set/leading)
- [`set:trailing()`](/en-US/docs/Web/EXSLT/set/trailing)
### Strings
The EXSLT Strings package provides functions that allow the manipulation of strings. The namespace for the Strings package is `http://exslt.org/strings`.
#### Functions
- [`str:concat()`](/en-US/docs/Web/EXSLT/str/concat)
- [`str:split()`](/en-US/docs/Web/EXSLT/str/split)
- [`str:tokenize()`](/en-US/docs/Web/EXSLT/str/tokenize)
## See also
- [EXSLT website](https://exslt.github.io/)
<section id="Quick_links">
<ol>
<li><strong><a href="/en-US/docs/Web/XSLT">XSLT</a></strong></li>
<li><strong><a href="/en-US/docs/Web/XPath">XPath</a></strong></li>
<li><strong><a href="/en-US/docs/Web/EXSLT">EXSLT</a></strong></li>
<li class="toggle">
<details open>
<summary><a href="/en-US/docs/Web/EXSLT/exsl">Common (exsl)</a></summary>
{{ListSubpagesForSidebar("/en-US/docs/Web/EXSLT/exsl", "", "", "exsl:", ")")}}
</details>
</li>
<li class="toggle">
<details open>
<summary><a href="/en-US/docs/Web/EXSLT/math">Math (math)</a></summary>
{{ListSubpagesForSidebar("/en-US/docs/Web/EXSLT/math", "", "", "math:", ")")}}
</details>
</li>
<li class="toggle">
<details open>
<summary><a href="/en-US/docs/Web/EXSLT/regexp">Regular expressions (regexp)</a></summary>
{{ListSubpagesForSidebar("/en-US/docs/Web/EXSLT/regexp", "", "", "regexp:", ")")}}
</details>
</li>
<li class="toggle">
<details open>
<summary><a href="/en-US/docs/Web/EXSLT/set">Sets (set)</a></summary>
{{ListSubpagesForSidebar("/en-US/docs/Web/EXSLT/set", "", "", "set:", ")")}}
</details>
</li>
<li class="toggle">
<details open>
<summary><a href="/en-US/docs/Web/EXSLT/str">Strings (str)</a></summary>
{{ListSubpagesForSidebar("/en-US/docs/Web/EXSLT/str", "", "", "str:", ")")}}
</details>
</li>
</ol>
</section>