forked from fengbird/JavaWebCoreNote
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathexample9.html
More file actions
131 lines (127 loc) · 8.2 KB
/
example9.html
File metadata and controls
131 lines (127 loc) · 8.2 KB
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
124
125
126
127
128
129
130
131
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<link rel="stylesheet" type="text/css" href="../CSS/tutorial.css">
<title>XPath Tutorial</title>
<link rel="index" href="index.html">
<link rel="previous" href="example8.html">
<link rel="next" href="example10.html">
</head>
<body>
<table xmlns="http://www.w3.org/1999/xhtml" width="100%">
<tr>
<td><span class="mediumText"><b>>> English <<</b> | <a class="naviBlack" target="_self" href="../Output_cze/example9.html">česky</a> | <a class="naviBlack" target="_self" href="../Output_dut/example9.html">Nederlands</a> | <a class="naviBlack" target="_self" href="../Output_fre/example9.html">Français</a> | <a class="naviBlack" target="_self" href="../Output_spa/example9.html">Español</a> | <a class="naviBlack" target="_self" href="../Output_rus/example9.html">По-русски</a> | <a class="naviBlack" target="_self" href="../Output_ger/example9.html">Deutsch</a> | <a class="naviBlack" target="_self" href="../Output_chi/example9.html">中文</a> | <a class="naviBlack" target="_self" href="../Output_ita/example9.html">Italiano</a></span></td>
<td style="text-align:right"><span class="mediumText"><a class="naviBlack" target="_top" href="http://www.zvon.org">ZVON</a>
>
<a class="naviBlack" target="_top" href="http://www.zvon.org/index.php?nav_id=tutorials">Tutorials</a>
>
<b>XPath Tutorial</b></span></td>
</tr>
</table>
<table xmlns="http://www.w3.org/1999/xhtml" class="bar" width="750px" border="0" cellpadding="0" cellspacing="0">
<tr>
<td class="naviBlue"><a class="naviWhite" target="_top" href="../General/examples.html">Intro</a>
/
<a class="naviWhite" target="_top" href="http://zvon.org/search.php">Search</a>
/
<a class="naviWhite" target="_top" href="http://www.zvon.org"> ZVON </a></td>
</tr>
</table>
<table class="hangingMenu" border="0" cellpadding="1" cellspacing="0" width="100%">
<tr>
<td><b>>> Example 9 <<</b>
|
<a class="naviBlack" href="example8.html">Prev</a>
|
<a class="naviBlack" href="example10.html">Next</a></td>
</tr>
</table><br><div class="description">The string-length function returns the number of characters in the string. You must use &lt; as a substitute for < and &gt;
as a substitute for > .
</div>
<div><a name="b9b1c43c29"></a>
</div>
<table border="1" cellpadding="5" width="85%">
<tr>
<th>//*[string-length(name()) = 3]</th>
</tr>
<tr>
<td>Select elements with three-letter name</td>
</tr>
<tr>
<td class="code">
<br> <<span class="elementOn">AAA</span>>
<br> <<span class="element">Q</span>/>
<br> <<span class="element">SSSS</span>/>
<br> <<span class="element">BB</span>/>
<br> <<span class="elementOn">CCC</span>/>
<br> <<span class="element">DDDDDDDD</span>/>
<br> <<span class="element">EEEE</span>/>
<br> </<span class="elementOn">AAA</span>>
</td>
</tr>
<tr>
<td><a target="_top" href="http://www.zvon.org:9001/saxon/cgi-bin/XLab/XML/xpatut_9.html?stylesheetFile=XSLT/xpath.xslt&value=//*[string-length(name())%20=%203]&lang=eng">Open the example in XLab.</a> | <a href="example9_0_png.html">Tree view (JPG)</a></td>
</tr>
</table>
<div><a name="b9b1c43c31"></a>
</div>
<table border="1" cellpadding="5" width="85%">
<tr>
<th>//*[string-length(name()) < 3]</th>
</tr>
<tr>
<td>Select elements name of which has one or two characters</td>
</tr>
<tr>
<td class="code">
<br> <<span class="element">AAA</span>>
<br> <<span class="elementOn">Q</span>/>
<br> <<span class="element">SSSS</span>/>
<br> <<span class="elementOn">BB</span>/>
<br> <<span class="element">CCC</span>/>
<br> <<span class="element">DDDDDDDD</span>/>
<br> <<span class="element">EEEE</span>/>
<br> </<span class="element">AAA</span>>
</td>
</tr>
<tr>
<td><a target="_top" href="http://www.zvon.org:9001/saxon/cgi-bin/XLab/XML/xpatut_9.html?stylesheetFile=XSLT/xpath.xslt&value=//*[string-length(name())%20<%203]&lang=eng">Open the example in XLab.</a> | <a href="example9_1_png.html">Tree view (JPG)</a></td>
</tr>
</table>
<div><a name="b9b1c43c33"></a>
</div>
<table border="1" cellpadding="5" width="85%">
<tr>
<th>//*[string-length(name()) > 3]</th>
</tr>
<tr>
<td>Select elements with name longer than three characters</td>
</tr>
<tr>
<td class="code">
<br> <<span class="element">AAA</span>>
<br> <<span class="element">Q</span>/>
<br> <<span class="elementOn">SSSS</span>/>
<br> <<span class="element">BB</span>/>
<br> <<span class="element">CCC</span>/>
<br> <<span class="elementOn">DDDDDDDD</span>/>
<br> <<span class="elementOn">EEEE</span>/>
<br> </<span class="element">AAA</span>>
</td>
</tr>
<tr>
<td><a target="_top" href="http://www.zvon.org:9001/saxon/cgi-bin/XLab/XML/xpatut_9.html?stylesheetFile=XSLT/xpath.xslt&value=//*[string-length(name())%20>%203]&lang=eng">Open the example in XLab.</a> | <a href="example9_2_png.html">Tree view (JPG)</a></td>
</tr>
</table>
<div><br><br><br><div>_____________________________________________</div>
<div><a class="smallBlackLink" target="_top" href="http://zvon.org/php/Search/codes.php">Reference Search</a> |
<a class="smallBlackLink" target="_top" href="http://zvon.org/index.php?nav_id=zvonindex">Sitemap</a> |
<a class="smallBlackLink" target="_top" href="http://zvon.org/index.php?nav_id=173">XML Glossary</a>
<a class="smallBlackLink" target="_top" href="http://www.zvon.org">ZVON</a> |
<a class="smallBlackLink" target="_top" href="http://www.systinet.com">Systinet</a></div>
</div>
<!--partners-->
<!--advertisement-->
</body>
</html>