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 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 304 305 306 307 308 309 310 311 312 313 314 315 316 317 318 319 320 321 322 323 324 325 326 327 328 329 330 331 332 333 334 335 336 337 338 339 340 341 342 343 344 345 346 347 348 349 350 351 352 353 354 355 356 357 358 359 360 361 362 363 364 365 366 367 368 369 370 371 372 373 374 375 376 377 378 379 380 381 382 383 384 385 386 387 388 389 390 391 392 393 394 395 396 397 398 399 400 401 402 403 404 405 406 407 408 409 410 411 412 413 414 415 416 417 418 419 420 421 422 423 424 425 426 427 428 429 430 431 432 433 434 435 436 437 438 439 440 441 442 443 444 445 446 447 448 449 450 451 452 453 454 455 456 457 458 459 460 461 462 463 464 465 466 467 468 469 470 471 472 473 474 475 476 477 478 479 480 481 482 483 484 485 486 487 488 489 490 491 492 493 494 495 496 497 498 499 500 501 502 503 504 505 506 507 508 509 510 511 512 513 514 515 516 517 518 519 520 521 522 523 524 525 526 527 528 529 530 531 532 533 534 535 536 537 538 539 540 541 542 543 544 545 546 547 548 549 550 551 552 553 554 555 556 557 558 559 560 561 562 563 564 565 566 567 568 569 570 571 572 573 574 575 576 577 578 579 580 581 582 583 584 585 586 587 588 589 590 591 592 593 594 595 596 597 598 599 600 601 602 603 604 605 606 607 608 609 610 611 612 613 614 615 616 617 618 619 620 621 622 623 624 625 626 627 628 629 630 631 632 633 634 635 636 637 638 639 640 641 642 643 644 645 646 647
|
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0//EN">
<!--NewPage-->
<HTML>
<HEAD>
<!-- Generated by javadoc on Thu Mar 15 14:18:29 EST 2001 -->
<TITLE>
Xalan-Java 2: Class XPath
</TITLE>
<LINK REL ="stylesheet" TYPE="text/css" HREF="../../../stylesheet.css" TITLE="Style">
</HEAD>
<BODY BGCOLOR="white">
<!-- ========== START OF NAVBAR ========== -->
<A NAME="navbar_top"><!-- --></A>
<TABLE BORDER="0" WIDTH="100%" CELLPADDING="1" CELLSPACING="0">
<TR>
<TD COLSPAN=2 BGCOLOR="#EEEEFF" CLASS="NavBarCell1">
<A NAME="navbar_top_firstrow"><!-- --></A>
<TABLE BORDER="0" CELLPADDING="0" CELLSPACING="3">
<TR ALIGN="center" VALIGN="top">
<TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../overview-summary.html"><FONT ID="NavBarFont1"><B>Overview</B></FONT></A> </TD>
<TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="package-summary.html"><FONT ID="NavBarFont1"><B>Package</B></FONT></A> </TD>
<TD BGCOLOR="#FFFFFF" CLASS="NavBarCell1Rev"> <FONT CLASS="NavBarFont1Rev"><B>Class</B></FONT> </TD>
<TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="class-use/XPath.html"><FONT ID="NavBarFont1"><B>Use</B></FONT></A> </TD>
<TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="package-tree.html"><FONT ID="NavBarFont1"><B>Tree</B></FONT></A> </TD>
<TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../deprecated-list.html"><FONT ID="NavBarFont1"><B>Deprecated</B></FONT></A> </TD>
<TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../index-all.html"><FONT ID="NavBarFont1"><B>Index</B></FONT></A> </TD>
<TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../help-doc.html"><FONT ID="NavBarFont1"><B>Help</B></FONT></A> </TD>
</TR>
</TABLE>
</TD>
<TD ALIGN="right" VALIGN="top" ROWSPAN=3><EM>
</EM>
</TD>
</TR>
<TR>
<TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2">
<A HREF="../../../org/apache/xpath/VariableStack.html"><B>PREV CLASS</B></A>
<A HREF="../../../org/apache/xpath/XPathAPI.html"><B>NEXT CLASS</B></A></FONT></TD>
<TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2">
<A HREF="../../../index.html" TARGET="_top"><B>FRAMES</B></A>
<A HREF="XPath.html" TARGET="_top"><B>NO FRAMES</B></A></FONT></TD>
</TR>
<TR>
<TD VALIGN="top" CLASS="NavBarCell3"><FONT SIZE="-2">
SUMMARY: INNER | <A HREF="#field_summary">FIELD</A> | <A HREF="#constructor_summary">CONSTR</A> | <A HREF="#method_summary">METHOD</A></FONT></TD>
<TD VALIGN="top" CLASS="NavBarCell3"><FONT SIZE="-2">
DETAIL: <A HREF="#field_detail">FIELD</A> | <A HREF="#constructor_detail">CONSTR</A> | <A HREF="#method_detail">METHOD</A></FONT></TD>
</TR>
</TABLE>
<!-- =========== END OF NAVBAR =========== -->
<HR>
<!-- ======== START OF CLASS DATA ======== -->
<H2>
<FONT SIZE="-1">
org.apache.xpath</FONT>
<BR>
Class XPath</H2>
<PRE>
java.lang.Object
|
+--<B>org.apache.xpath.XPath</B>
</PRE>
<HR>
<DL>
<DT>public class <B>XPath</B><DT>extends java.lang.Object<DT>implements java.io.Serializable</DL>
<P>
<i><font size="-1" color="#00FF00">**For advanced use only** </font></i><meta name="usage" content="advanced"/>
The XPath class wraps an expression object and provides general services
for execution of that expression.
<P>
<DL>
<DT><B>See Also: </B><DD><A HREF="../../../serialized-form.html#org.apache.xpath.XPath">Serialized Form</A></DL>
<HR>
<P>
<!-- ======== INNER CLASS SUMMARY ======== -->
<!-- =========== FIELD SUMMARY =========== -->
<A NAME="field_summary"><!-- --></A>
<TABLE BORDER="1" CELLPADDING="3" CELLSPACING="0" WIDTH="100%">
<TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor">
<TD COLSPAN=2><FONT SIZE="+2">
<B>Field Summary</B></FONT></TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>static int</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../org/apache/xpath/XPath.html#MATCH">MATCH</A></B></CODE>
<BR>
Represents a match type expression.</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>static double</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../org/apache/xpath/XPath.html#MATCH_SCORE_NODETEST">MATCH_SCORE_NODETEST</A></B></CODE>
<BR>
<i><font size="-1" color="#00FF00">**For advanced use only** </font></i><meta name="usage" content="advanced"/>
The match score if the pattern consists of just a NodeTest.</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>static double</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../org/apache/xpath/XPath.html#MATCH_SCORE_NONE">MATCH_SCORE_NONE</A></B></CODE>
<BR>
<i><font size="-1" color="#00FF00">**For advanced use only** </font></i><meta name="usage" content="advanced"/>
The match score if no match is made.</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>static double</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../org/apache/xpath/XPath.html#MATCH_SCORE_NSWILD">MATCH_SCORE_NSWILD</A></B></CODE>
<BR>
<i><font size="-1" color="#00FF00">**For advanced use only** </font></i><meta name="usage" content="advanced"/>
The match score if the pattern pattern has the form NCName:*.</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>static double</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../org/apache/xpath/XPath.html#MATCH_SCORE_OTHER">MATCH_SCORE_OTHER</A></B></CODE>
<BR>
<i><font size="-1" color="#00FF00">**For advanced use only** </font></i><meta name="usage" content="advanced"/>
The match score if the pattern consists of something
other than just a NodeTest or just a qname.</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>static double</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../org/apache/xpath/XPath.html#MATCH_SCORE_QNAME">MATCH_SCORE_QNAME</A></B></CODE>
<BR>
<i><font size="-1" color="#00FF00">**For advanced use only** </font></i><meta name="usage" content="advanced"/>
The match score if the pattern has the form
of a QName optionally preceded by an @ character.</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>static int</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../org/apache/xpath/XPath.html#SELECT">SELECT</A></B></CODE>
<BR>
Represents a select type expression.</TD>
</TR>
</TABLE>
<!-- ======== CONSTRUCTOR SUMMARY ======== -->
<A NAME="constructor_summary"><!-- --></A>
<TABLE BORDER="1" CELLPADDING="3" CELLSPACING="0" WIDTH="100%">
<TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor">
<TD COLSPAN=2><FONT SIZE="+2">
<B>Constructor Summary</B></FONT></TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD><CODE><B><A HREF="../../../org/apache/xpath/XPath.html#XPath(java.lang.String, javax.xml.transform.SourceLocator, org.apache.xml.utils.PrefixResolver, int)">XPath</A></B>(java.lang.String exprString,
<A HREF="../../../javax/xml/transform/SourceLocator.html">SourceLocator</A> locator,
<A HREF="../../../org/apache/xml/utils/PrefixResolver.html">PrefixResolver</A> prefixResolver,
int type)</CODE>
<BR>
Construct an XPath object.</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD><CODE><B><A HREF="../../../org/apache/xpath/XPath.html#XPath(java.lang.String, javax.xml.transform.SourceLocator, org.apache.xml.utils.PrefixResolver, int, javax.xml.transform.ErrorListener)">XPath</A></B>(java.lang.String exprString,
<A HREF="../../../javax/xml/transform/SourceLocator.html">SourceLocator</A> locator,
<A HREF="../../../org/apache/xml/utils/PrefixResolver.html">PrefixResolver</A> prefixResolver,
int type,
<A HREF="../../../javax/xml/transform/ErrorListener.html">ErrorListener</A> errorListener)</CODE>
<BR>
Construct an XPath object.</TD>
</TR>
</TABLE>
<!-- ========== METHOD SUMMARY =========== -->
<A NAME="method_summary"><!-- --></A>
<TABLE BORDER="1" CELLPADDING="3" CELLSPACING="0" WIDTH="100%">
<TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor">
<TD COLSPAN=2><FONT SIZE="+2">
<B>Method Summary</B></FONT></TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE> void</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../org/apache/xpath/XPath.html#assert(boolean, java.lang.String)">assert</A></B>(boolean b,
java.lang.String msg)</CODE>
<BR>
Tell the user of an assertion error, and probably throw an
exception.</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE> void</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../org/apache/xpath/XPath.html#error(org.apache.xpath.XPathContext, org.w3c.dom.Node, int, java.lang.Object[])">error</A></B>(<A HREF="../../../org/apache/xpath/XPathContext.html">XPathContext</A> xctxt,
<A HREF="../../../org/w3c/dom/Node.html">Node</A> sourceNode,
int msg,
java.lang.Object[] args)</CODE>
<BR>
Tell the user of an error, and probably throw an
exception.</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE> <A HREF="../../../org/apache/xpath/objects/XObject.html">XObject</A></CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../org/apache/xpath/XPath.html#execute(org.apache.xpath.XPathContext, org.w3c.dom.Node, org.apache.xml.utils.PrefixResolver)">execute</A></B>(<A HREF="../../../org/apache/xpath/XPathContext.html">XPathContext</A> xctxt,
<A HREF="../../../org/w3c/dom/Node.html">Node</A> contextNode,
<A HREF="../../../org/apache/xml/utils/PrefixResolver.html">PrefixResolver</A> namespaceContext)</CODE>
<BR>
<i><font size="-1" color="#0000FF">**Experimental** </font></i><meta name="usage" content="experimental"/>
Given an expression and a context, evaluate the XPath
and call the callback as nodes are found.</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE> <A HREF="../../../org/apache/xpath/Expression.html">Expression</A></CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../org/apache/xpath/XPath.html#getExpression()">getExpression</A></B>()</CODE>
<BR>
Get the raw Expression object that this class wraps.</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE> <A HREF="../../../javax/xml/transform/SourceLocator.html">SourceLocator</A></CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../org/apache/xpath/XPath.html#getLocator()">getLocator</A></B>()</CODE>
<BR>
Get the SourceLocator on the expression object.</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE> double</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../org/apache/xpath/XPath.html#getMatchScore(org.apache.xpath.XPathContext, org.w3c.dom.Node)">getMatchScore</A></B>(<A HREF="../../../org/apache/xpath/XPathContext.html">XPathContext</A> xctxt,
<A HREF="../../../org/w3c/dom/Node.html">Node</A> context)</CODE>
<BR>
Get the match score of the given node.</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE> java.lang.String</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../org/apache/xpath/XPath.html#getPatternString()">getPatternString</A></B>()</CODE>
<BR>
Return the XPath string associated with this object.</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE> void</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../org/apache/xpath/XPath.html#installFunction(java.lang.String, int, org.apache.xpath.functions.Function)">installFunction</A></B>(java.lang.String name,
int funcIndex,
<A HREF="../../../org/apache/xpath/functions/Function.html">Function</A> func)</CODE>
<BR>
Install a built-in function.</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE> void</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../org/apache/xpath/XPath.html#setExpression(org.apache.xpath.Expression)">setExpression</A></B>(<A HREF="../../../org/apache/xpath/Expression.html">Expression</A> exp)</CODE>
<BR>
Set the raw expression object for this object.</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE> void</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../org/apache/xpath/XPath.html#setLocator(javax.xml.transform.SourceLocator)">setLocator</A></B>(<A HREF="../../../javax/xml/transform/SourceLocator.html">SourceLocator</A> l)</CODE>
<BR>
Set the SourceLocator on the expression object.</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE> void</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../org/apache/xpath/XPath.html#warn(org.apache.xpath.XPathContext, org.w3c.dom.Node, int, java.lang.Object[])">warn</A></B>(<A HREF="../../../org/apache/xpath/XPathContext.html">XPathContext</A> xctxt,
<A HREF="../../../org/w3c/dom/Node.html">Node</A> sourceNode,
int msg,
java.lang.Object[] args)</CODE>
<BR>
Warn the user of an problem.</TD>
</TR>
</TABLE>
<A NAME="methods_inherited_from_class_java.lang.Object"><!-- --></A>
<TABLE BORDER="1" CELLPADDING="3" CELLSPACING="0" WIDTH="100%">
<TR BGCOLOR="#EEEEFF" CLASS="TableSubHeadingColor">
<TD><B>Methods inherited from class java.lang.Object</B></TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD><CODE>equals,
getClass,
hashCode,
notify,
notifyAll,
toString,
wait,
wait,
wait</CODE></TD>
</TR>
</TABLE>
<P>
<!-- ============ FIELD DETAIL =========== -->
<A NAME="field_detail"><!-- --></A>
<TABLE BORDER="1" CELLPADDING="3" CELLSPACING="0" WIDTH="100%">
<TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor">
<TD COLSPAN=1><FONT SIZE="+2">
<B>Field Detail</B></FONT></TD>
</TR>
</TABLE>
<A NAME="SELECT"><!-- --></A><H3>
SELECT</H3>
<PRE>
public static final int <B>SELECT</B></PRE>
<DL>
<DD>Represents a select type expression.</DL>
<HR>
<A NAME="MATCH"><!-- --></A><H3>
MATCH</H3>
<PRE>
public static final int <B>MATCH</B></PRE>
<DL>
<DD>Represents a match type expression.</DL>
<HR>
<A NAME="MATCH_SCORE_NONE"><!-- --></A><H3>
MATCH_SCORE_NONE</H3>
<PRE>
public static final double <B>MATCH_SCORE_NONE</B></PRE>
<DL>
<DD><i><font size="-1" color="#00FF00">**For advanced use only** </font></i><meta name="usage" content="advanced"/>
The match score if no match is made.</DL>
<HR>
<A NAME="MATCH_SCORE_QNAME"><!-- --></A><H3>
MATCH_SCORE_QNAME</H3>
<PRE>
public static final double <B>MATCH_SCORE_QNAME</B></PRE>
<DL>
<DD><i><font size="-1" color="#00FF00">**For advanced use only** </font></i><meta name="usage" content="advanced"/>
The match score if the pattern has the form
of a QName optionally preceded by an @ character.</DL>
<HR>
<A NAME="MATCH_SCORE_NSWILD"><!-- --></A><H3>
MATCH_SCORE_NSWILD</H3>
<PRE>
public static final double <B>MATCH_SCORE_NSWILD</B></PRE>
<DL>
<DD><i><font size="-1" color="#00FF00">**For advanced use only** </font></i><meta name="usage" content="advanced"/>
The match score if the pattern pattern has the form NCName:*.</DL>
<HR>
<A NAME="MATCH_SCORE_NODETEST"><!-- --></A><H3>
MATCH_SCORE_NODETEST</H3>
<PRE>
public static final double <B>MATCH_SCORE_NODETEST</B></PRE>
<DL>
<DD><i><font size="-1" color="#00FF00">**For advanced use only** </font></i><meta name="usage" content="advanced"/>
The match score if the pattern consists of just a NodeTest.</DL>
<HR>
<A NAME="MATCH_SCORE_OTHER"><!-- --></A><H3>
MATCH_SCORE_OTHER</H3>
<PRE>
public static final double <B>MATCH_SCORE_OTHER</B></PRE>
<DL>
<DD><i><font size="-1" color="#00FF00">**For advanced use only** </font></i><meta name="usage" content="advanced"/>
The match score if the pattern consists of something
other than just a NodeTest or just a qname.</DL>
<!-- ========= CONSTRUCTOR DETAIL ======== -->
<A NAME="constructor_detail"><!-- --></A>
<TABLE BORDER="1" CELLPADDING="3" CELLSPACING="0" WIDTH="100%">
<TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor">
<TD COLSPAN=1><FONT SIZE="+2">
<B>Constructor Detail</B></FONT></TD>
</TR>
</TABLE>
<A NAME="XPath(java.lang.String, javax.xml.transform.SourceLocator, org.apache.xml.utils.PrefixResolver, int, javax.xml.transform.ErrorListener)"><!-- --></A><H3>
XPath</H3>
<PRE>
public <B>XPath</B>(java.lang.String exprString,
<A HREF="../../../javax/xml/transform/SourceLocator.html">SourceLocator</A> locator,
<A HREF="../../../org/apache/xml/utils/PrefixResolver.html">PrefixResolver</A> prefixResolver,
int type,
<A HREF="../../../javax/xml/transform/ErrorListener.html">ErrorListener</A> errorListener)
throws <A HREF="../../../javax/xml/transform/TransformerException.html">TransformerException</A></PRE>
<DL>
<DD>Construct an XPath object. The object must be initialized by the
XPathParser.initXPath method.<DD><DL>
<DT><B>Parameters:</B><DD><CODE>exprString</CODE> - The XPath expression.<DD><CODE>locator</CODE> - The location of the expression, may be null.<DD><CODE>prefixResolver</CODE> - A prefix resolver to use to resolve prefixes to
namespace URIs.<DD><CODE>type</CODE> - one of <A HREF="../../../org/apache/xpath/XPath.html#SELECT"><CODE>SELECT</CODE></A> or <A HREF="../../../org/apache/xpath/XPath.html#MATCH"><CODE>MATCH</CODE></A>.<DD><CODE>errorListener</CODE> - The error listener, or null if default should be used.<DT><B>Throws:</B><DD><A HREF="../../../javax/xml/transform/TransformerException.html">TransformerException</A> - if syntax or other error.</DL>
</DD>
</DL>
<HR>
<A NAME="XPath(java.lang.String, javax.xml.transform.SourceLocator, org.apache.xml.utils.PrefixResolver, int)"><!-- --></A><H3>
XPath</H3>
<PRE>
public <B>XPath</B>(java.lang.String exprString,
<A HREF="../../../javax/xml/transform/SourceLocator.html">SourceLocator</A> locator,
<A HREF="../../../org/apache/xml/utils/PrefixResolver.html">PrefixResolver</A> prefixResolver,
int type)
throws <A HREF="../../../javax/xml/transform/TransformerException.html">TransformerException</A></PRE>
<DL>
<DD>Construct an XPath object. The object must be initialized by the
XPathParser.initXPath method.<DD><DL>
<DT><B>Parameters:</B><DD><CODE>exprString</CODE> - The XPath expression.<DD><CODE>locator</CODE> - The location of the expression, may be null.<DD><CODE>prefixResolver</CODE> - A prefix resolver to use to resolve prefixes to
namespace URIs.<DD><CODE>type</CODE> - one of <A HREF="../../../org/apache/xpath/XPath.html#SELECT"><CODE>SELECT</CODE></A> or <A HREF="../../../org/apache/xpath/XPath.html#MATCH"><CODE>MATCH</CODE></A>.<DT><B>Throws:</B><DD><A HREF="../../../javax/xml/transform/TransformerException.html">TransformerException</A> - if syntax or other error.</DL>
</DD>
</DL>
<!-- ============ METHOD DETAIL ========== -->
<A NAME="method_detail"><!-- --></A>
<TABLE BORDER="1" CELLPADDING="3" CELLSPACING="0" WIDTH="100%">
<TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor">
<TD COLSPAN=1><FONT SIZE="+2">
<B>Method Detail</B></FONT></TD>
</TR>
</TABLE>
<A NAME="getExpression()"><!-- --></A><H3>
getExpression</H3>
<PRE>
public <A HREF="../../../org/apache/xpath/Expression.html">Expression</A> <B>getExpression</B>()</PRE>
<DL>
<DD>Get the raw Expression object that this class wraps.<DD><DL>
<DT><B>Returns:</B><DD>the raw Expression object, which should not normally be null.</DL>
</DD>
</DL>
<HR>
<A NAME="setExpression(org.apache.xpath.Expression)"><!-- --></A><H3>
setExpression</H3>
<PRE>
public void <B>setExpression</B>(<A HREF="../../../org/apache/xpath/Expression.html">Expression</A> exp)</PRE>
<DL>
<DD>Set the raw expression object for this object.<DD><DL>
<DT><B>Parameters:</B><DD><CODE>exp</CODE> - the raw Expression object, which should not normally be null.</DL>
</DD>
</DL>
<HR>
<A NAME="getLocator()"><!-- --></A><H3>
getLocator</H3>
<PRE>
public <A HREF="../../../javax/xml/transform/SourceLocator.html">SourceLocator</A> <B>getLocator</B>()</PRE>
<DL>
<DD>Get the SourceLocator on the expression object.<DD><DL>
<DT><B>Returns:</B><DD>the SourceLocator on the expression object, which may be null.</DL>
</DD>
</DL>
<HR>
<A NAME="setLocator(javax.xml.transform.SourceLocator)"><!-- --></A><H3>
setLocator</H3>
<PRE>
public void <B>setLocator</B>(<A HREF="../../../javax/xml/transform/SourceLocator.html">SourceLocator</A> l)</PRE>
<DL>
<DD>Set the SourceLocator on the expression object.<DD><DL>
<DT><B>Parameters:</B><DD><CODE>l</CODE> - the SourceLocator on the expression object, which may be null.</DL>
</DD>
</DL>
<HR>
<A NAME="getPatternString()"><!-- --></A><H3>
getPatternString</H3>
<PRE>
public java.lang.String <B>getPatternString</B>()</PRE>
<DL>
<DD>Return the XPath string associated with this object.<DD><DL>
<DT><B>Returns:</B><DD>the XPath string associated with this object.</DL>
</DD>
</DL>
<HR>
<A NAME="execute(org.apache.xpath.XPathContext, org.w3c.dom.Node, org.apache.xml.utils.PrefixResolver)"><!-- --></A><H3>
execute</H3>
<PRE>
public <A HREF="../../../org/apache/xpath/objects/XObject.html">XObject</A> <B>execute</B>(<A HREF="../../../org/apache/xpath/XPathContext.html">XPathContext</A> xctxt,
<A HREF="../../../org/w3c/dom/Node.html">Node</A> contextNode,
<A HREF="../../../org/apache/xml/utils/PrefixResolver.html">PrefixResolver</A> namespaceContext)
throws <A HREF="../../../javax/xml/transform/TransformerException.html">TransformerException</A></PRE>
<DL>
<DD><i><font size="-1" color="#0000FF">**Experimental** </font></i><meta name="usage" content="experimental"/>
Given an expression and a context, evaluate the XPath
and call the callback as nodes are found. Only some simple
types of expresions right now can call back, so if this
method returns null, then the callbacks have been called, otherwise
a valid XObject will be returned.<DD><DL>
<DT><B>Parameters:</B><DD><CODE>xctxt</CODE> - The execution context.<DD><CODE>contextNode</CODE> - The node that "." expresses.<DD><CODE>namespaceContext</CODE> - The context in which namespaces in the
XPath are supposed to be expanded.<DD><CODE>callback</CODE> - Interface that implements the processLocatedNode method.<DD><CODE>callbackInfo</CODE> - Object that will be passed to the processLocatedNode method.<DD><CODE>stopAtFirst</CODE> - True if the search should stop once the first node in document
order is found.<DT><B>Returns:</B><DD>The result of the XPath or null if callbacks are used.<DT><B>Throws:</B><DD><A HREF="../../../javax/xml/transform/TransformerException.html">TransformerException</A> - thrown if the active ProblemListener decides
the error condition is severe enough to halt processing.<DD><A HREF="../../../javax/xml/transform/TransformerException.html">TransformerException</A> - thrown if
the error condition is severe enough to halt processing.<DD><A HREF="../../../javax/xml/transform/TransformerException.html">TransformerException</A> - </DL>
</DD>
</DL>
<HR>
<A NAME="getMatchScore(org.apache.xpath.XPathContext, org.w3c.dom.Node)"><!-- --></A><H3>
getMatchScore</H3>
<PRE>
public double <B>getMatchScore</B>(<A HREF="../../../org/apache/xpath/XPathContext.html">XPathContext</A> xctxt,
<A HREF="../../../org/w3c/dom/Node.html">Node</A> context)
throws <A HREF="../../../javax/xml/transform/TransformerException.html">TransformerException</A></PRE>
<DL>
<DD>Get the match score of the given node.<DD><DL>
<DT><B>Parameters:</B><DD><CODE>xctxt</CODE> - XPath runtime context.<DD><CODE>context</CODE> - The current source tree context node.<DT><B>Returns:</B><DD>score, one of <A HREF="../../../org/apache/xpath/XPath.html#MATCH_SCORE_NODETEST"><CODE>MATCH_SCORE_NODETEST</CODE></A>,
<A HREF="../../../org/apache/xpath/XPath.html#MATCH_SCORE_NONE"><CODE>MATCH_SCORE_NONE</CODE></A>, <A HREF="../../../org/apache/xpath/XPath.html#MATCH_SCORE_OTHER"><CODE>MATCH_SCORE_OTHER</CODE></A>,
or <A HREF="../../../org/apache/xpath/XPath.html#MATCH_SCORE_QNAME"><CODE>MATCH_SCORE_QNAME</CODE></A>.<DT><B>Throws:</B><DD><A HREF="../../../javax/xml/transform/TransformerException.html">TransformerException</A> - </DL>
</DD>
</DL>
<HR>
<A NAME="installFunction(java.lang.String, int, org.apache.xpath.functions.Function)"><!-- --></A><H3>
installFunction</H3>
<PRE>
public void <B>installFunction</B>(java.lang.String name,
int funcIndex,
<A HREF="../../../org/apache/xpath/functions/Function.html">Function</A> func)</PRE>
<DL>
<DD>Install a built-in function.<DD><DL>
<DT><B>Parameters:</B><DD><CODE>name</CODE> - The unqualified name of the function.<DD><CODE>funcIndex</CODE> - The index of the function in the table.<DD><CODE>func</CODE> - A Implementation of an XPath Function object.<DT><B>Returns:</B><DD>the position of the function in the internal index.</DL>
</DD>
</DL>
<HR>
<A NAME="warn(org.apache.xpath.XPathContext, org.w3c.dom.Node, int, java.lang.Object[])"><!-- --></A><H3>
warn</H3>
<PRE>
public void <B>warn</B>(<A HREF="../../../org/apache/xpath/XPathContext.html">XPathContext</A> xctxt,
<A HREF="../../../org/w3c/dom/Node.html">Node</A> sourceNode,
int msg,
java.lang.Object[] args)
throws <A HREF="../../../javax/xml/transform/TransformerException.html">TransformerException</A></PRE>
<DL>
<DD>Warn the user of an problem.<DD><DL>
<DT><B>Parameters:</B><DD><CODE>xctxt</CODE> - The XPath runtime context.<DD><CODE>sourceNode</CODE> - Not used.<DD><CODE>msg</CODE> - An error number that corresponds to one of the numbers found
in <A HREF="../../../org/apache/xpath/res/XPATHErrorResources.html"><CODE>XPATHErrorResources</CODE></A>, which is
a key for a format string.<DD><CODE>args</CODE> - An array of arguments represented in the format string, which
may be null.<DT><B>Throws:</B><DD><A HREF="../../../javax/xml/transform/TransformerException.html">TransformerException</A> - if the current ErrorListoner determines to
throw an exception.</DL>
</DD>
</DL>
<HR>
<A NAME="assert(boolean, java.lang.String)"><!-- --></A><H3>
assert</H3>
<PRE>
public void <B>assert</B>(boolean b,
java.lang.String msg)</PRE>
<DL>
<DD>Tell the user of an assertion error, and probably throw an
exception.<DD><DL>
<DT><B>Parameters:</B><DD><CODE>b</CODE> - If false, a runtime exception will be thrown.<DD><CODE>msg</CODE> - The assertion message, which should be informative.<DT><B>Throws:</B><DD>java.lang.RuntimeException - if the b argument is false.</DL>
</DD>
</DL>
<HR>
<A NAME="error(org.apache.xpath.XPathContext, org.w3c.dom.Node, int, java.lang.Object[])"><!-- --></A><H3>
error</H3>
<PRE>
public void <B>error</B>(<A HREF="../../../org/apache/xpath/XPathContext.html">XPathContext</A> xctxt,
<A HREF="../../../org/w3c/dom/Node.html">Node</A> sourceNode,
int msg,
java.lang.Object[] args)
throws <A HREF="../../../javax/xml/transform/TransformerException.html">TransformerException</A></PRE>
<DL>
<DD>Tell the user of an error, and probably throw an
exception.<DD><DL>
<DT><B>Parameters:</B><DD><CODE>xctxt</CODE> - The XPath runtime context.<DD><CODE>sourceNode</CODE> - Not used.<DD><CODE>msg</CODE> - An error number that corresponds to one of the numbers found
in <A HREF="../../../org/apache/xpath/res/XPATHErrorResources.html"><CODE>XPATHErrorResources</CODE></A>, which is
a key for a format string.<DD><CODE>args</CODE> - An array of arguments represented in the format string, which
may be null.<DT><B>Throws:</B><DD><A HREF="../../../javax/xml/transform/TransformerException.html">TransformerException</A> - if the current ErrorListoner determines to
throw an exception.</DL>
</DD>
</DL>
<!-- ========= END OF CLASS DATA ========= -->
<HR>
<!-- ========== START OF NAVBAR ========== -->
<A NAME="navbar_bottom"><!-- --></A>
<TABLE BORDER="0" WIDTH="100%" CELLPADDING="1" CELLSPACING="0">
<TR>
<TD COLSPAN=2 BGCOLOR="#EEEEFF" CLASS="NavBarCell1">
<A NAME="navbar_bottom_firstrow"><!-- --></A>
<TABLE BORDER="0" CELLPADDING="0" CELLSPACING="3">
<TR ALIGN="center" VALIGN="top">
<TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../overview-summary.html"><FONT ID="NavBarFont1"><B>Overview</B></FONT></A> </TD>
<TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="package-summary.html"><FONT ID="NavBarFont1"><B>Package</B></FONT></A> </TD>
<TD BGCOLOR="#FFFFFF" CLASS="NavBarCell1Rev"> <FONT CLASS="NavBarFont1Rev"><B>Class</B></FONT> </TD>
<TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="class-use/XPath.html"><FONT ID="NavBarFont1"><B>Use</B></FONT></A> </TD>
<TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="package-tree.html"><FONT ID="NavBarFont1"><B>Tree</B></FONT></A> </TD>
<TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../deprecated-list.html"><FONT ID="NavBarFont1"><B>Deprecated</B></FONT></A> </TD>
<TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../index-all.html"><FONT ID="NavBarFont1"><B>Index</B></FONT></A> </TD>
<TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../help-doc.html"><FONT ID="NavBarFont1"><B>Help</B></FONT></A> </TD>
</TR>
</TABLE>
</TD>
<TD ALIGN="right" VALIGN="top" ROWSPAN=3><EM>
</EM>
</TD>
</TR>
<TR>
<TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2">
<A HREF="../../../org/apache/xpath/VariableStack.html"><B>PREV CLASS</B></A>
<A HREF="../../../org/apache/xpath/XPathAPI.html"><B>NEXT CLASS</B></A></FONT></TD>
<TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2">
<A HREF="../../../index.html" TARGET="_top"><B>FRAMES</B></A>
<A HREF="XPath.html" TARGET="_top"><B>NO FRAMES</B></A></FONT></TD>
</TR>
<TR>
<TD VALIGN="top" CLASS="NavBarCell3"><FONT SIZE="-2">
SUMMARY: INNER | <A HREF="#field_summary">FIELD</A> | <A HREF="#constructor_summary">CONSTR</A> | <A HREF="#method_summary">METHOD</A></FONT></TD>
<TD VALIGN="top" CLASS="NavBarCell3"><FONT SIZE="-2">
DETAIL: <A HREF="#field_detail">FIELD</A> | <A HREF="#constructor_detail">CONSTR</A> | <A HREF="#method_detail">METHOD</A></FONT></TD>
</TR>
</TABLE>
<!-- =========== END OF NAVBAR =========== -->
<HR>
Copyright 2000 Apache XML Project. All Rights Reserved.
</BODY>
</HTML>
|