01: package net.sf.saxon.pull;
02:
03: import net.sf.saxon.instruct.ElementCreator;
04: import net.sf.saxon.expr.XPathContext;
05: import net.sf.saxon.type.Type;
06:
07: /**
08: * An element node whose construction is deferred.
09: */
10:
11: public class UnconstructedElement extends UnconstructedParent {
12:
13: private int nameCode;
14:
15: public UnconstructedElement(ElementCreator instruction,
16: XPathContext context) {
17: super (instruction, context);
18: }
19:
20: public void setNameCode(int nameCode) {
21: this .nameCode = nameCode;
22: }
23:
24: /**
25: * Get name code. The name code is a coded form of the node name: two nodes
26: * with the same name code have the same namespace URI, the same local name,
27: * and the same prefix. By masking the name code with &0xfffff, you get a
28: * fingerprint: two nodes with the same fingerprint have the same local name
29: * and namespace URI.
30: *
31: * @return an integer name code, which may be used to obtain the actual node
32: * name from the name pool
33: * @see net.sf.saxon.om.NamePool#allocate allocate
34: * @see net.sf.saxon.om.NamePool#getFingerprint getFingerprint
35: */
36:
37: public int getNameCode() {
38: return nameCode;
39: }
40:
41: public int getNodeKind() {
42: return Type.ELEMENT;
43: }
44: }
45:
46: //
47: // The contents of this file are subject to the Mozilla Public License Version 1.0 (the "License");
48: // you may not use this file except in compliance with the License. You may obtain a copy of the
49: // License at http://www.mozilla.org/MPL/
50: //
51: // Software distributed under the License is distributed on an "AS IS" basis,
52: // WITHOUT WARRANTY OF ANY KIND, either express or implied.
53: // See the License for the specific language governing rights and limitations under the License.
54: //
55: // The Original Code is: all this file.
56: //
57: // The Initial Developer of the Original Code is Michael H. Kay.
58: //
59: // Portions created by (your name) are Copyright (C) (your legal entity). All Rights Reserved.
60: //
61: // Contributor(s): none.
62: //
|