Class ClauseInfo
- All Implemented Interfaces:
SourceLocator,Location,InstructionInfo,Locator
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionGet the clause being tracedintReturn the column number where the current document event ends.intGet the type of construct.intGet the line number of the instruction in the source stylesheet module.Get the namespace bindings from the static context of the clauseGet a name identifying the object of the expression, for example a function name, template name, variable name, key name, element name, etc.Get an iterator over all the properties available.getProperty(String name) Get the value of a particular property of the instruction.Return the public identifier for the current document event.Get the system identifier (URI) of the source stylesheet or query module containing the instruction.Get an immutable copy of this Location object.voidsetNamespaceResolver(NamespaceResolver nsResolver) Set the namespace bindings from the static context of the clause
-
Constructor Details
-
ClauseInfo
-
-
Method Details
-
getClause
Get the clause being traced- Returns:
- the clause in the FLWOR expression to which this ClauseInfo relates
-
getConstructType
public int getConstructType()Get the type of construct. This will either be the fingerprint of a standard XSLT instruction name (values inStandardNames: all less than 1024) or it will be a constant in classLocationKind.- Specified by:
getConstructTypein interfaceInstructionInfo- Returns:
- an integer identifying the kind of construct
-
getObjectName
Get a name identifying the object of the expression, for example a function name, template name, variable name, key name, element name, etc. This is used only where the name is known statically.- Specified by:
getObjectNamein interfaceInstructionInfo- Returns:
- the QName of the object declared or manipulated by this instruction or expression
-
getNamespaceResolver
Get the namespace bindings from the static context of the clause- Returns:
- a namespace resolver that reflects the in scope namespaces of the clause
-
setNamespaceResolver
Set the namespace bindings from the static context of the clause- Parameters:
nsResolver- a namespace resolver that reflects the in scope namespaces of the clause
-
getSystemId
Get the system identifier (URI) of the source stylesheet or query module containing the instruction. This will generally be an absolute URI. If the system identifier is not known, the method may return null. In some cases, for example where XML external entities are used, the correct system identifier is not always retained.- Specified by:
getSystemIdin interfaceLocation- Specified by:
getSystemIdin interfaceLocator- Specified by:
getSystemIdin interfaceSourceLocator- Returns:
- the URI of the containing module
-
getLineNumber
public int getLineNumber()Get the line number of the instruction in the source stylesheet module. If this is not known, or if the instruction is an artificial one that does not relate to anything in the source code, the value returned may be -1.- Specified by:
getLineNumberin interfaceLocation- Specified by:
getLineNumberin interfaceLocator- Specified by:
getLineNumberin interfaceSourceLocator- Returns:
- the line number of the expression within the containing module
-
saveLocation
Get an immutable copy of this Location object. By default Location objects may be mutable, so they should not be saved for later use. The result of this operation holds the same location information, but in an immutable form.- Specified by:
saveLocationin interfaceLocation
-
getProperty
Get the value of a particular property of the instruction. Properties of XSLT instructions are generally known by the name of the stylesheet attribute that defines them.- Specified by:
getPropertyin interfaceInstructionInfo- Parameters:
name- The name of the required property- Returns:
- The value of the requested property, or null if the property is not available
-
getProperties
Get an iterator over all the properties available. The values returned by the iterator will be of type String, and each string can be supplied as input to the getProperty() method to retrieve the value of the property. The iterator may return properties whose value is null.- Specified by:
getPropertiesin interfaceInstructionInfo- Returns:
- an iterator over the properties.
-
getPublicId
Return the public identifier for the current document event.The return value is the public identifier of the document entity or of the external parsed entity in which the markup triggering the event appears.
- Specified by:
getPublicIdin interfaceLocation- Specified by:
getPublicIdin interfaceLocator- Specified by:
getPublicIdin interfaceSourceLocator- Returns:
- A string containing the public identifier, or null if none is available.
- See Also:
-
getColumnNumber
public int getColumnNumber()Return the column number where the current document event ends. This is one-based number of Javacharvalues since the last line end.Warning: The return value from the method is intended only as an approximation for the sake of diagnostics; it is not intended to provide sufficient information to edit the character content of the original XML document. For example, when lines contain combining character sequences, wide characters, surrogate pairs, or bi-directional text, the value may not correspond to the column in a text editor's display.
The return value is an approximation of the column number in the document entity or external parsed entity where the markup triggering the event appears.
If possible, the SAX driver should provide the line position of the first character after the text associated with the document event. The first column in each line is column 1.
- Specified by:
getColumnNumberin interfaceLocation- Specified by:
getColumnNumberin interfaceLocator- Specified by:
getColumnNumberin interfaceSourceLocator- Returns:
- The column number, or -1 if none is available.
- See Also:
-