Skip to main content
summaryrefslogtreecommitdiffstats
blob: b051d326669a8461cdcee87854411fa1e54eb34f (plain) (blame)
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
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<HTML>
<HEAD>
<META http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
<META name="GENERATOR" content="IBM Software Development Platform">
<link rel="STYLESHEET" href="../../book.css" charset="ISO-8859-1" type="text/css"/>
<TITLE>cardinality XPath function</TITLE>
</HEAD>
<BODY>
<TABLE border="0" cellpadding="0" cellspacing="1" width="100%">
	<TBODY>
		<TR>
			<TH align="left"><P>cardinality()</P></TH>
			<TH align="right"><A href="overview.html">Additional XPath Functions</A></TH>
		</TR>
	</TBODY>
</TABLE>
<HR>
<H2>cardinality</H2>
<P>Returns whether an XPath expression returns zero, one or more than one node</P>
<HR>
<TABLE border="0" width="100%">
	<TBODY>
		<TR>
			<TH colspan="2" align="left">Function Summary<BR>&nbsp;</TH></TR>
		<TR>
			<TD width="20%" valign="top">minimal arguments</TD>
			<TD><SPAN style="font-family: monospace" valign="top">
			Boolean cardinality (XPath expression , String cardinality)<BR>&nbsp;<BR>
			</SPAN></TD>
		</TR>
		<TR>
			<TD width="20%" valign="top">all arguments</TD>
			<TD><SPAN style="font-family: monospace" valign="top">
			Boolean cardinality (XPath expression , String cardinality)<BR>&nbsp;<BR>
			</SPAN></TD>
		</TR>
	</TBODY>
</TABLE>
<HR>
<TABLE border="0" width="100%">
	<TBODY>
		<TR>
			<TH colspan="2" align="left">Required Arguments<BR>&nbsp;</TH>
        </TR>
		<TR>
			<TD width="20%" valign="top"><B>XPath expression</B></TD>
			<TD>an XPath expression that returns some number of nodes</TD>
		</TR>
		<TR>
			<TD width="20%" valign="top"><B>String cardinality</B></TD>
			<TD>Contains any combination of the characters '0', '1' and 'M'.</TD>
		</TR>
	</TBODY>
</TABLE>
<HR>
<TABLE border="0" width="100%">
	<TBODY>
		<TR>
			<TH colspan="2" align="left">There are no optional arguments<BR>&nbsp;</TD>
	</TBODY>
</TABLE>
<HR>
<TABLE border="0" width="100%">
	<TBODY>
		<TR>
			<TH colspan="2" align="left">Example<BR>&nbsp;</TH></TR>
		<TR>
			<TD colspan="2"><SPAN style="font-family: monospace">
<!-- Begin cardinality example -->
			<B>cardinality</B>(/root/plugin , "1M")<br>
			<P>returns true if there are one or more child elements named "plugin" under the top-level node named "root", or false otherwise.</P>
<!-- End cardinality example -->
</SPAN></TD>
		</TR>
	</TBODY>
</TABLE>
<P><BR>
<FONT color="navy" size="-2">&copy; Copyright IBM Corporation 2000,
2006. All Rights Reserved.</FONT></P></P></BODY>
</HTML>

Back to the top