Java Doc for IndependentContext.java in  » XML » XPath-Saxon » net » sf » saxon » trans » 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 » XPath Saxon » net.sf.saxon.trans 
Source Cross Reference  Class Diagram Java Document (Java Doc) 


java.lang.Object
   net.sf.saxon.trans.IndependentContext

IndependentContext
public class IndependentContext implements StaticContext,NamespaceResolver,Serializable(Code)
An IndependentContext provides a context for parsing an expression or pattern appearing in a context other than a stylesheet. This class was formerly named StandaloneContext. It has forked from that class, so that StandaloneContext could be changed to meet the demands of the JAXP 1.3 XPath API.



Constructor Summary
public  IndependentContext()
    
public  IndependentContext(Configuration config)
    

Method Summary
public  VariableReferencebindVariable(int fingerprint)
     Bind a variable used in an XPath Expression to the XSLVariable element in which it is declared.
public  voidclearAllNamespaces()
     Clear all the declared namespaces, including the standard ones (xml, xslt, saxon).
public  voidclearNamespaces()
    
public  IndependentContextcopy()
     Create a copy of this IndependentContext.
public  voiddeclareCollation(String name, Comparator comparator, boolean isDefault)
    
public  voiddeclareNamespace(String prefix, String uri)
     Declare a namespace whose prefix can be used in expressions
Parameters:
  prefix - The namespace prefix.
public  VariabledeclareVariable(QNameValue qname)
     Declare a variable.
public  VariabledeclareVariable(String qname)
     Declare a variable.
public  StringgetBaseURI()
     Get the Base URI of the stylesheet element, for resolving any relative URI's used in the expression.
public  ComparatorgetCollation(String name)
     Get a named collation.
public  ConfigurationgetConfiguration()
    
public  StringgetDefaultCollationName()
     Get the name of the default collation.
public  shortgetDefaultElementNamespace()
    
public  StringgetDefaultFunctionNamespace()
    
public  FunctionLibrarygetFunctionLibrary()
    
public  SetgetImportedSchemaNamespaces()
    
public  intgetLineNumber()
     Get the line number of the expression within that container.
public  LocationMapgetLocationMap()
    
public  NamePoolgetNamePool()
    
public  NamespaceResolvergetNamespaceResolver()
    
public  SlotManagergetStackFrameMap()
    
public  StringgetSystemId()
     Get the system ID of the container of the expression.
public  StringgetURIForPrefix(String prefix)
     Get the URI for a prefix, using the declared namespaces as the context for namespace resolution.
public  StringgetURIForPrefix(String prefix, boolean useDefault)
     Get the namespace URI corresponding to a given prefix.
public  booleanisAllowedBuiltInType(AtomicType type)
     Determine whether a built-in type is available in this context.
public  booleanisImportedSchema(String namespace)
    
public  booleanisInBackwardsCompatibleMode()
    
public  voidissueWarning(String s, SourceLocator locator)
     Issue a compile-time warning.
public  IteratoriteratePrefixes()
     Get an iterator over all the prefixes declared in this namespace context.
public  XPathContextmakeEarlyEvaluationContext()
    
public  voidsetBaseURI(String baseURI)
    
public  voidsetDefaultFunctionNamespace(String uri)
    
public  voidsetFunctionLibrary(FunctionLibrary lib)
    
public  voidsetImportedSchemaNamespaces(Set namespaces)
    
public  voidsetLocationMap(LocationMap locationMap)
    
public  voidsetNamespaceResolver(NamespaceResolver resolver)
     Set an external namespace resolver.
public  voidsetNamespaces(NodeInfo node)
     Set all the declared namespaces to be the namespaces that are in-scope for a given node.


Constructor Detail
IndependentContext
public IndependentContext()(Code)



IndependentContext
public IndependentContext(Configuration config)(Code)
Create an IndependentContext using a specific Configuration




Method Detail
bindVariable
public VariableReference bindVariable(int fingerprint) throws StaticError(Code)
Bind a variable used in an XPath Expression to the XSLVariable element in which it is declared. This method is provided for use by the XPath parser, and it should not be called by the user of the API, or overridden, unless variables are to be declared using a mechanism other than the declareVariable method of this class.



clearAllNamespaces
public void clearAllNamespaces()(Code)
Clear all the declared namespaces, including the standard ones (xml, xslt, saxon). Leave only the XML namespace and the default namespace (xmlns="")



clearNamespaces
public void clearNamespaces()(Code)
Clear all the declared namespaces, except for the standard ones (xml, xslt, saxon, xdt)



copy
public IndependentContext copy()(Code)
Create a copy of this IndependentContext. All aspects of the context are copied except for declared variables.



declareCollation
public void declareCollation(String name, Comparator comparator, boolean isDefault)(Code)
Declare a named collation
Parameters:
  name - The name of the collation (technically, a URI)
Parameters:
  comparator - The Java Comparator used to implement the collating sequence
Parameters:
  isDefault - True if this is to be used as the default collation



declareNamespace
public void declareNamespace(String prefix, String uri)(Code)
Declare a namespace whose prefix can be used in expressions
Parameters:
  prefix - The namespace prefix. Must not be null. Must not be the empty string("") - unqualified names in an XPath expression always refer to the null namespace.
Parameters:
  uri - The namespace URI. Must not be null.



declareVariable
public Variable declareVariable(QNameValue qname)(Code)
Declare a variable. A variable must be declared before an expression referring to it is compiled. The initial value of the variable will be the empty sequence
Parameters:
  qname - The name of the variable



declareVariable
public Variable declareVariable(String qname) throws XPathException(Code)
Declare a variable. A variable may be declared before an expression referring to it is compiled. Alternatively, a JAXP XPathVariableResolver may be supplied to perform the resolution. A variable that has been explicitly declared is used in preference.
Parameters:
  qname - Lexical QName identifying the variable. The namespace prefix, ifany, must have been declared before this method is called, or must be resolvableusing the namespace context.



getBaseURI
public String getBaseURI()(Code)
Get the Base URI of the stylesheet element, for resolving any relative URI's used in the expression. Used by the document() function, resolve-uri(), etc. "" if no base URI has been set



getCollation
public Comparator getCollation(String name)(Code)
Get a named collation. the collation identified by the given name, as set previously using declareCollation.Return null if no collation with this name is found.



getConfiguration
public Configuration getConfiguration()(Code)
Get the system configuration



getDefaultCollationName
public String getDefaultCollationName()(Code)
Get the name of the default collation. the name of the default collation; or the name of the codepoint collationif no default collation has been defined



getDefaultElementNamespace
public short getDefaultElementNamespace()(Code)
Get the default XPath namespace, as a namespace code that can be looked up in the NamePool



getDefaultFunctionNamespace
public String getDefaultFunctionNamespace()(Code)
Get the default function namespace



getFunctionLibrary
public FunctionLibrary getFunctionLibrary()(Code)
Get the function library containing all the in-scope functions available in this static context



getImportedSchemaNamespaces
public Set getImportedSchemaNamespaces()(Code)
Get the set of imported schemas a Set, the set of URIs representing the names of imported schemas



getLineNumber
public int getLineNumber()(Code)
Get the line number of the expression within that container. Used to construct error messages. -1 always



getLocationMap
public LocationMap getLocationMap()(Code)



getNamePool
public NamePool getNamePool()(Code)
Get the NamePool used for compiling expressions



getNamespaceResolver
public NamespaceResolver getNamespaceResolver()(Code)



getStackFrameMap
public SlotManager getStackFrameMap()(Code)
Get the stack frame map containing the slot number allocations for the variables declared in this static context



getSystemId
public String getSystemId()(Code)
Get the system ID of the container of the expression. Used to construct error messages. "" always



getURIForPrefix
public String getURIForPrefix(String prefix) throws XPathException(Code)
Get the URI for a prefix, using the declared namespaces as the context for namespace resolution. The default namespace is NOT used when the prefix is empty. This method is provided for use by the XPath parser.
Parameters:
  prefix - The prefix
throws:
  net.sf.saxon.trans.XPathException - if the prefix is not declared



getURIForPrefix
public String getURIForPrefix(String prefix, boolean useDefault)(Code)
Get the namespace URI corresponding to a given prefix. Return null if the prefix is not in scope.
Parameters:
  prefix - the namespace prefix
Parameters:
  useDefault - true if the default namespace is to be used when theprefix is "" the uri for the namespace, or null if the prefix is not in scope.Return "" if the prefix maps to the null namespace.



isAllowedBuiltInType
public boolean isAllowedBuiltInType(AtomicType type)(Code)
Determine whether a built-in type is available in this context. This method caters for differences between host languages as to which set of types are built in.
Parameters:
  type - the supposedly built-in type. This will always be a type in theXS or XDT namespace. true if this type can be used in this static context



isImportedSchema
public boolean isImportedSchema(String namespace)(Code)



isInBackwardsCompatibleMode
public boolean isInBackwardsCompatibleMode()(Code)
Determine whether Backwards Compatible Mode is used false; XPath 1.0 compatibility mode is not supported in the standaloneXPath API



issueWarning
public void issueWarning(String s, SourceLocator locator)(Code)
Issue a compile-time warning. This method is used during XPath expression compilation to output warning conditions. The default implementation writes the message to System.err. To change the destination of messages, create a subclass of StandaloneContext that overrides this method.



iteratePrefixes
public Iterator iteratePrefixes()(Code)
Get an iterator over all the prefixes declared in this namespace context. This will include the default namespace (prefix="") and the XML namespace where appropriate



makeEarlyEvaluationContext
public XPathContext makeEarlyEvaluationContext()(Code)
Construct a dynamic context for early evaluation of constant subexpressions



setBaseURI
public void setBaseURI(String baseURI)(Code)
Set the base URI in the static context



setDefaultFunctionNamespace
public void setDefaultFunctionNamespace(String uri)(Code)
Set the default function namespace



setFunctionLibrary
public void setFunctionLibrary(FunctionLibrary lib)(Code)
Set the function library to be used



setImportedSchemaNamespaces
public void setImportedSchemaNamespaces(Set namespaces)(Code)



setLocationMap
public void setLocationMap(LocationMap locationMap)(Code)



setNamespaceResolver
public void setNamespaceResolver(NamespaceResolver resolver)(Code)
Set an external namespace resolver. If this is set, then all resolution of namespace prefixes is delegated to the external namespace resolver, and namespaces declared individually on this IndependentContext object are ignored.



setNamespaces
public void setNamespaces(NodeInfo node)(Code)
Set all the declared namespaces to be the namespaces that are in-scope for a given node. In addition, the standard namespaces (xml, xslt, saxon) are declared.
Parameters:
  node - The node whose in-scope namespaces are to be used as the context namespaces.If the node is an attribute, text node, etc, then the namespaces of its parent element are used.



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.