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
122 lines (118 loc) · 7.5 KB
/
example6.html
File metadata and controls
122 lines (118 loc) · 7.5 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
<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"><b>>> English <<</b> | <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> | <a class="naviBlack" target="_self" href="../Output_chi/example6.html">中文</a> | <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/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 6 <<</b>
|
<a class="naviBlack" href="example5.html">Prev</a>
|
<a class="naviBlack" href="example7.html">Next</a></td>
</tr>
</table><br><div class="description">Values of attributes can be used as selection criteria. Function normalize-space removes leading and trailing spaces and replaces
sequences of whitespace characters by a single space.
</div>
<div><a name="b9b1c37c27"></a>
</div>
<table border="1" cellpadding="5" width="85%">
<tr>
<th>//BBB[@id='b1']</th>
</tr>
<tr>
<td>Select BBB elements which have attribute id with value b1</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']&lang=eng">Open the example in XLab.</a> | <a href="example6_0_png.html">Tree view (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>Select BBB elements which have attribute name with value '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']&lang=eng">Open the example in XLab.</a> | <a href="example6_1_png.html">Tree view (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>Select BBB elements which have attribute name with value bbb, leading and trailing spaces are removed before comparison</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']&lang=eng">Open the example in XLab.</a> | <a href="example6_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>