KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > net > sf > saxon > trace > InstructionInfo


1 package net.sf.saxon.trace;
2
3 import net.sf.saxon.event.SaxonLocator;
4 import net.sf.saxon.om.NamespaceResolver;
5
6 import java.util.Iterator JavaDoc;
7
8
9 /**
10 * Information about an instruction in the stylesheet, made
11 * available at run-time to a TraceListener
12 */

13
14 public interface InstructionInfo extends SaxonLocator {
15
16     /**
17      * Get the type of construct. This will either be the fingerprint of a standard XSLT instruction name
18      * (values in {@link net.sf.saxon.style.StandardNames}: all less than 1024)
19      * or it will be a constant in class {@link Location}.
20      */

21
22     public int getConstructType();
23
24     /**
25      * Get a name identifying the object of the expression, for example a function name, template name,
26      * variable name, key name, element name, etc. This is used only where the name is known statically.
27      */

28
29     public int getObjectNameCode();
30
31     /**
32     * Get the system identifier (URI) of the source stylesheet or query module containing
33     * the instruction. This will generally be an absolute URI. If the system
34     * identifier is not known, the method may return null. In some cases, for example
35     * where XML external entities are used, the correct system identifier is not
36     * always retained.
37     */

38
39     public String JavaDoc getSystemId();
40
41     /**
42     * Get the line number of the instruction in the source stylesheet module.
43     * If this is not known, or if the instruction is an artificial one that does
44     * not relate to anything in the source code, the value returned may be -1.
45     */

46
47     public int getLineNumber();
48
49     /**
50      * Get the namespace context of the instruction. This will not always be available, in which
51      * case the method returns null.
52      */

53
54     public NamespaceResolver getNamespaceResolver();
55
56     /**
57      * Get the value of a particular property of the instruction. Properties
58      * of XSLT instructions are generally known by the name of the stylesheet attribute
59      * that defines them.
60      * @param name The name of the required property
61      * @return The value of the requested property, or null if the property is not available
62      */

63
64     public Object JavaDoc getProperty(String JavaDoc name);
65
66     /**
67      * Get an iterator over all the properties available. The values returned by the iterator
68      * will be of type String, and each string can be supplied as input to the getProperty()
69      * method to retrieve the value of the property. The iterator may return properties whose
70      * value is null.
71      */

72
73     public Iterator JavaDoc getProperties();
74
75 }
76
77 //
78
// The contents of this file are subject to the Mozilla Public License Version 1.0 (the "License");
79
// you may not use this file except in compliance with the License. You may obtain a copy of the
80
// License at http://www.mozilla.org/MPL/
81
//
82
// Software distributed under the License is distributed on an "AS IS" basis,
83
// WITHOUT WARRANTY OF ANY KIND, either express or implied.
84
// See the License for the specific language governing rights and limitations under the License.
85
//
86
// The Original Code is: all this file.
87
//
88
// The Initial Developer of the Original Code is Michael H. Kay
89
//
90
// Portions created by (your name) are Copyright (C) (your legal entity). All Rights Reserved.
91
//
92
// Contributor(s): none.
93
//
94
Popular Tags