Java Doc for XPath.java in  » XML » xalan » org » apache » xpath » Java Source Code / Java DocumentationJava Source Code and Java Documentation

Java Source Code / Java Documentation
1. 6.0 JDK Core
2. 6.0 JDK Modules
3. 6.0 JDK Modules com.sun
4. 6.0 JDK Modules com.sun.java
5. 6.0 JDK Modules sun
6. 6.0 JDK Platform
7. Ajax
8. Apache Harmony Java SE
9. Aspect oriented
10. Authentication Authorization
11. Blogger System
12. Build
13. Byte Code
14. Cache
15. Chart
16. Chat
17. Code Analyzer
18. Collaboration
19. Content Management System
20. Database Client
21. Database DBMS
22. Database JDBC Connection Pool
23. Database ORM
24. Development
25. EJB Server geronimo
26. EJB Server GlassFish
27. EJB Server JBoss 4.2.1
28. EJB Server resin 3.1.5
29. ERP CRM Financial
30. ESB
31. Forum
32. GIS
33. Graphic Library
34. Groupware
35. HTML Parser
36. IDE
37. IDE Eclipse
38. IDE Netbeans
39. Installer
40. Internationalization Localization
41. Inversion of Control
42. Issue Tracking
43. J2EE
44. JBoss
45. JMS
46. JMX
47. Library
48. Mail Clients
49. Net
50. Parser
51. PDF
52. Portal
53. Profiler
54. Project Management
55. Report
56. RSS RDF
57. Rule Engine
58. Science
59. Scripting
60. Search Engine
61. Security
62. Sevlet Container
63. Source Control
64. Swing Library
65. Template Engine
66. Test Coverage
67. Testing
68. UML
69. Web Crawler
70. Web Framework
71. Web Mail
72. Web Server
73. Web Services
74. Web Services apache cxf 2.0.1
75. Web Services AXIS2
76. Wiki Engine
77. Workflow Engines
78. XML
79. XML UI
Java
Java Tutorial
Java Open Source
Jar File Download
Java Articles
Java Products
Java by API
Photoshop Tutorials
Maya Tutorials
Flash Tutorials
3ds-Max Tutorials
Illustrator Tutorials
GIMP Tutorials
C# / C Sharp
C# / CSharp Tutorial
C# / CSharp Open Source
ASP.Net
ASP.NET Tutorial
JavaScript DHTML
JavaScript Tutorial
JavaScript Reference
HTML / CSS
HTML CSS Reference
C / ANSI-C
C Tutorial
C++
C++ Tutorial
Ruby
PHP
Python
Python Tutorial
Python Open Source
SQL Server / T-SQL
SQL Server / T-SQL Tutorial
Oracle PL / SQL
Oracle PL/SQL Tutorial
PostgreSQL
SQL / MySQL
MySQL Tutorial
VB.Net
VB.Net Tutorial
Flash / Flex / ActionScript
VBA / Excel / Access / Word
XML
XML Tutorial
Microsoft Office PowerPoint 2007 Tutorial
Microsoft Office Excel 2007 Tutorial
Microsoft Office Word 2007 Tutorial
Java Source Code / Java Documentation » XML » xalan » org.apache.xpath 
Source Cross Reference  Class Diagram Java Document (Java Doc) 


java.lang.Object
   org.apache.xpath.XPath

XPath
public class XPath implements Serializable,ExpressionOwner(Code)
The XPath class wraps an expression object and provides general services for execution of that expression.


Field Summary
final public static  intMATCH
     Represents a match type expression.
final public static  doubleMATCH_SCORE_NODETEST
     The match score if the pattern consists of just a NodeTest.
final public static  doubleMATCH_SCORE_NONE
     The match score if no match is made.
final public static  doubleMATCH_SCORE_NSWILD
     The match score if the pattern pattern has the form NCName:*.
final public static  doubleMATCH_SCORE_OTHER
     The match score if the pattern consists of something other than just a NodeTest or just a qname.
final public static  doubleMATCH_SCORE_QNAME
     The match score if the pattern has the form of a QName optionally preceded by an @ character.
final public static  intSELECT
     Represents a select type expression.
 Stringm_patternString
     The pattern string, mainly kept around for diagnostic purposes.
final static  longserialVersionUID
    

Constructor Summary
public  XPath(String exprString, SourceLocator locator, PrefixResolver prefixResolver, int type, ErrorListener errorListener)
     Construct an XPath object.
public  XPath(String exprString, SourceLocator locator, PrefixResolver prefixResolver, int type, ErrorListener errorListener, FunctionTable aTable)
     Construct an XPath object.
public  XPath(String exprString, SourceLocator locator, PrefixResolver prefixResolver, int type)
     Construct an XPath object.
public  XPath(Expression expr)
     Construct an XPath object.

Method Summary
public  voidassertion(boolean b, String msg)
     Tell the user of an assertion error, and probably throw an exception.
public  booleanbool(XPathContext xctxt, int contextNode, PrefixResolver namespaceContext)
     Given an expression and a context, evaluate the XPath and return the result.
public  voidcallVisitors(ExpressionOwner owner, XPathVisitor visitor)
     This will traverse the heararchy, calling the visitor for each member.
public  voiderror(XPathContext xctxt, int sourceNode, String msg, Object[] args)
     Tell the user of an error, and probably throw an exception.
public  XObjectexecute(XPathContext xctxt, org.w3c.dom.Node contextNode, PrefixResolver namespaceContext)
     Given an expression and a context, evaluate the XPath and return the result.
Parameters:
  xctxt - The execution context.
Parameters:
  contextNode - The node that "." expresses.
Parameters:
  namespaceContext - The context in which namespaces in theXPath are supposed to be expanded.
public  XObjectexecute(XPathContext xctxt, int contextNode, PrefixResolver namespaceContext)
     Given an expression and a context, evaluate the XPath and return the result.
public  voidfixupVariables(java.util.Vector vars, int globalsSize)
     This function is used to fixup variables from QNames to stack frame indexes at stylesheet build time.
Parameters:
  vars - List of QNames that correspond to variables.
public  ExpressiongetExpression()
     Get the raw Expression object that this class wraps.
public  SourceLocatorgetLocator()
     Get the SourceLocator on the expression object.
public  doublegetMatchScore(XPathContext xctxt, int context)
     Get the match score of the given node.
Parameters:
  xctxt - XPath runtime context.
Parameters:
  context - The current source tree context node.
public  StringgetPatternString()
     Return the XPath string associated with this object.
public  voidsetExpression(Expression exp)
     Set the raw expression object for this object.
public  voidwarn(XPathContext xctxt, int sourceNode, String msg, Object[] args)
     Warn the user of an problem.

Field Detail
MATCH
final public static int MATCH(Code)
Represents a match type expression.



MATCH_SCORE_NODETEST
final public static double MATCH_SCORE_NODETEST(Code)
The match score if the pattern consists of just a NodeTest.



MATCH_SCORE_NONE
final public static double MATCH_SCORE_NONE(Code)
The match score if no match is made.



MATCH_SCORE_NSWILD
final public static double MATCH_SCORE_NSWILD(Code)
The match score if the pattern pattern has the form NCName:*.



MATCH_SCORE_OTHER
final public static double MATCH_SCORE_OTHER(Code)
The match score if the pattern consists of something other than just a NodeTest or just a qname.



MATCH_SCORE_QNAME
final public static double MATCH_SCORE_QNAME(Code)
The match score if the pattern has the form of a QName optionally preceded by an @ character.



SELECT
final public static int SELECT(Code)
Represents a select type expression.



m_patternString
String m_patternString(Code)
The pattern string, mainly kept around for diagnostic purposes.



serialVersionUID
final static long serialVersionUID(Code)




Constructor Detail
XPath
public XPath(String exprString, SourceLocator locator, PrefixResolver prefixResolver, int type, ErrorListener errorListener) throws javax.xml.transform.TransformerException(Code)
Construct an XPath object. (Needs review -sc) This method initializes an XPathParser/ Compiler and compiles the expression.
Parameters:
  exprString - The XPath expression.
Parameters:
  locator - The location of the expression, may be null.
Parameters:
  prefixResolver - A prefix resolver to use to resolve prefixes to namespace URIs.
Parameters:
  type - one of XPath.SELECT or XPath.MATCH.
Parameters:
  errorListener - The error listener, or null if default should be used.
throws:
  javax.xml.transform.TransformerException - if syntax or other error.



XPath
public XPath(String exprString, SourceLocator locator, PrefixResolver prefixResolver, int type, ErrorListener errorListener, FunctionTable aTable) throws javax.xml.transform.TransformerException(Code)
Construct an XPath object. (Needs review -sc) This method initializes an XPathParser/ Compiler and compiles the expression.
Parameters:
  exprString - The XPath expression.
Parameters:
  locator - The location of the expression, may be null.
Parameters:
  prefixResolver - A prefix resolver to use to resolve prefixes to namespace URIs.
Parameters:
  type - one of XPath.SELECT or XPath.MATCH.
Parameters:
  errorListener - The error listener, or null if default should be used.
throws:
  javax.xml.transform.TransformerException - if syntax or other error.



XPath
public XPath(String exprString, SourceLocator locator, PrefixResolver prefixResolver, int type) throws javax.xml.transform.TransformerException(Code)
Construct an XPath object. (Needs review -sc) This method initializes an XPathParser/ Compiler and compiles the expression.
Parameters:
  exprString - The XPath expression.
Parameters:
  locator - The location of the expression, may be null.
Parameters:
  prefixResolver - A prefix resolver to use to resolve prefixes to namespace URIs.
Parameters:
  type - one of XPath.SELECT or XPath.MATCH.
throws:
  javax.xml.transform.TransformerException - if syntax or other error.



XPath
public XPath(Expression expr)(Code)
Construct an XPath object.
Parameters:
  expr - The Expression object.
throws:
  javax.xml.transform.TransformerException - if syntax or other error.




Method Detail
assertion
public void assertion(boolean b, String msg)(Code)
Tell the user of an assertion error, and probably throw an exception.
Parameters:
  b - If false, a runtime exception will be thrown.
Parameters:
  msg - The assertion message, which should be informative.
throws:
  RuntimeException - if the b argument is false.



bool
public boolean bool(XPathContext xctxt, int contextNode, PrefixResolver namespaceContext) throws javax.xml.transform.TransformerException(Code)
Given an expression and a context, evaluate the XPath and return the result.
Parameters:
  xctxt - The execution context.
Parameters:
  contextNode - The node that "." expresses.
Parameters:
  namespaceContext - The context in which namespaces in theXPath are supposed to be expanded.
throws:
  TransformerException - thrown if the active ProblemListener decidesthe error condition is severe enough to halt processing.
throws:
  javax.xml.transform.TransformerException -



callVisitors
public void callVisitors(ExpressionOwner owner, XPathVisitor visitor)(Code)
This will traverse the heararchy, calling the visitor for each member. If the called visitor method returns false, the subtree should not be called.
Parameters:
  owner - The owner of the visitor, where that path may be rewritten if needed.
Parameters:
  visitor - The visitor whose appropriate method will be called.



error
public void error(XPathContext xctxt, int sourceNode, String msg, Object[] args) throws javax.xml.transform.TransformerException(Code)
Tell the user of an error, and probably throw an exception.
Parameters:
  xctxt - The XPath runtime context.
Parameters:
  sourceNode - Not used.
Parameters:
  msg - An error msgkey that corresponds to one of the constants found in org.apache.xpath.res.XPATHErrorResources, which is a key for a format string.
Parameters:
  args - An array of arguments represented in the format string, which may be null.
throws:
  TransformerException - if the current ErrorListoner determines to throw an exception.



execute
public XObject execute(XPathContext xctxt, org.w3c.dom.Node contextNode, PrefixResolver namespaceContext) throws javax.xml.transform.TransformerException(Code)
Given an expression and a context, evaluate the XPath and return the result.
Parameters:
  xctxt - The execution context.
Parameters:
  contextNode - The node that "." expresses.
Parameters:
  namespaceContext - The context in which namespaces in theXPath are supposed to be expanded. The result of the XPath or null if callbacks are used.
throws:
  TransformerException - thrown ifthe error condition is severe enough to halt processing.
throws:
  javax.xml.transform.TransformerException -



execute
public XObject execute(XPathContext xctxt, int contextNode, PrefixResolver namespaceContext) throws javax.xml.transform.TransformerException(Code)
Given an expression and a context, evaluate the XPath and return the result.
Parameters:
  xctxt - The execution context.
Parameters:
  contextNode - The node that "." expresses.
Parameters:
  namespaceContext - The context in which namespaces in theXPath are supposed to be expanded.
throws:
  TransformerException - thrown if the active ProblemListener decidesthe error condition is severe enough to halt processing.
throws:
  javax.xml.transform.TransformerException -



fixupVariables
public void fixupVariables(java.util.Vector vars, int globalsSize)(Code)
This function is used to fixup variables from QNames to stack frame indexes at stylesheet build time.
Parameters:
  vars - List of QNames that correspond to variables. This list should be searched backwards for the first qualified name that corresponds to the variable reference qname. The position of the QName in the vector from the start of the vector will be its position in the stack frame (but variables above the globalsTop value will need to be offset to the current stack frame).



getExpression
public Expression getExpression()(Code)
Get the raw Expression object that this class wraps. the raw Expression object, which should not normally be null.



getLocator
public SourceLocator getLocator()(Code)
Get the SourceLocator on the expression object. the SourceLocator on the expression object, which may be null.



getMatchScore
public double getMatchScore(XPathContext xctxt, int context) throws javax.xml.transform.TransformerException(Code)
Get the match score of the given node.
Parameters:
  xctxt - XPath runtime context.
Parameters:
  context - The current source tree context node. score, one of XPath.MATCH_SCORE_NODETEST,XPath.MATCH_SCORE_NONE, XPath.MATCH_SCORE_OTHER, or XPath.MATCH_SCORE_QNAME.
throws:
  javax.xml.transform.TransformerException -



getPatternString
public String getPatternString()(Code)
Return the XPath string associated with this object. the XPath string associated with this object.



setExpression
public void setExpression(Expression exp)(Code)
Set the raw expression object for this object.
Parameters:
  exp - the raw Expression object, which should not normally be null.



warn
public void warn(XPathContext xctxt, int sourceNode, String msg, Object[] args) throws javax.xml.transform.TransformerException(Code)
Warn the user of an problem.
Parameters:
  xctxt - The XPath runtime context.
Parameters:
  sourceNode - Not used.
Parameters:
  msg - An error msgkey that corresponds to one of the constants found in org.apache.xpath.res.XPATHErrorResources, which is a key for a format string.
Parameters:
  args - An array of arguments represented in the format string, which may be null.
throws:
  TransformerException - if the current ErrorListoner determines to throw an exception.



Methods inherited from java.lang.Object
native protected Object clone() throws CloneNotSupportedException(Code)(Java Doc)
public boolean equals(Object obj)(Code)(Java Doc)
protected void finalize() throws Throwable(Code)(Java Doc)
final native public Class getClass()(Code)(Java Doc)
native public int hashCode()(Code)(Java Doc)
final native public void notify()(Code)(Java Doc)
final native public void notifyAll()(Code)(Java Doc)
public String toString()(Code)(Java Doc)
final native public void wait(long timeout) throws InterruptedException(Code)(Java Doc)
final public void wait(long timeout, int nanos) throws InterruptedException(Code)(Java Doc)
final public void wait() throws InterruptedException(Code)(Java Doc)

www.java2java.com | Contact Us
Copyright 2009 - 12 Demo Source and Support. All rights reserved.
All other trademarks are property of their respective owners.