forked from fengbird/JavaWebCoreNote
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathexample6.html
More file actions
120 lines (116 loc) · 7.39 KB
/
example6.html
File metadata and controls
120 lines (116 loc) · 7.39 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
<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="example5.html">
<link rel="next" href="example7.html">
</head>
<body>
<table xmlns="http://www.w3.org/1999/xhtml" width="100%">
<tr>
<td><span class="mediumText"><a class="naviBlack" target="_self" href="../Output/example6.html">English</a> | <a class="naviBlack" target="_self" href="../Output_cze/example6.html">česky</a> | <a class="naviBlack" target="_self" href="../Output_dut/example6.html">Nederlands</a> | <a class="naviBlack" target="_self" href="../Output_fre/example6.html">Français</a> | <a class="naviBlack" target="_self" href="../Output_spa/example6.html">Español</a> | <a class="naviBlack" target="_self" href="../Output_rus/example6.html">По-русски</a> | <a class="naviBlack" target="_self" href="../Output_ger/example6.html">Deutsch</a> | <b>>> 中文 <<</b> | <a class="naviBlack" target="_self" href="../Output_ita/example6.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_chi/examples.html">介绍</a>
/
<a class="naviWhite" target="_top" href="http://zvon.org/search.php">搜索</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>>> 实例 6 <<</b>
|
<a class="naviBlack" href="example5.html">前页</a>
|
<a class="naviBlack" href="example7.html">后页</a></td>
</tr>
</table><br><div class="description">属性的值可以被用来作为选择的准则, normalize-space函数删除了前部和尾部的空格, 并且把连续的空格串替换为一个单一的空格</div>
<div><a name="b9b1c37c27"></a>
</div>
<table border="1" cellpadding="5" width="85%">
<tr>
<th>//BBB[@id='b1']</th>
</tr>
<tr>
<td>选择含有属性id且其值为'b1'的BBB元素</td>
</tr>
<tr>
<td class="code">
<br> <<span class="element">AAA</span>>
<br> <<span class="elementOn">BBB</span><span class="element"> id = "b1"</span>/>
<br> <<span class="element">BBB</span><span class="element"> name = " bbb "</span>/>
<br> <<span class="element">BBB</span><span class="element"> name = "bbb"</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_6.html?stylesheetFile=XSLT/xpath.xslt&value=//BBB[@id='b1']">在XLab中打开实例</a> | <a href="example6_0_png.html">树视图 (JPG)</a></td>
</tr>
</table>
<div><a name="b9b1c37c29"></a>
</div>
<table border="1" cellpadding="5" width="85%">
<tr>
<th>//BBB[@name='bbb']</th>
</tr>
<tr>
<td>选择含有属性name且其值为'bbb'的BBB元素</td>
</tr>
<tr>
<td class="code">
<br> <<span class="element">AAA</span>>
<br> <<span class="element">BBB</span><span class="element"> id = "b1"</span>/>
<br> <<span class="element">BBB</span><span class="element"> name = " bbb "</span>/>
<br> <<span class="elementOn">BBB</span><span class="element"> name = "bbb"</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_6.html?stylesheetFile=XSLT/xpath.xslt&value=//BBB[@name='bbb']">在XLab中打开实例</a> | <a href="example6_1_png.html">树视图 (JPG)</a></td>
</tr>
</table>
<div><a name="b9b1c37c31"></a>
</div>
<table border="1" cellpadding="5" width="85%">
<tr>
<th>//BBB[normalize-space(@name)='bbb']</th>
</tr>
<tr>
<td>选择含有属性name且其值(在用normalize-space函数去掉前后空格后)为'bbb'的BBB元素</td>
</tr>
<tr>
<td class="code">
<br> <<span class="element">AAA</span>>
<br> <<span class="element">BBB</span><span class="element"> id = "b1"</span>/>
<br> <<span class="elementOn">BBB</span><span class="element"> name = " bbb "</span>/>
<br> <<span class="elementOn">BBB</span><span class="element"> name = "bbb"</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_6.html?stylesheetFile=XSLT/xpath.xslt&value=//BBB[normalize-space(@name)='bbb']">在XLab中打开实例</a> | <a href="example6_2_png.html">树视图 (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>