1 package net.sf.saxon.tree; 2 import net.sf.saxon.event.Receiver; 3 import net.sf.saxon.trans.XPathException; 4 import net.sf.saxon.type.Type; 5 6 11 12 13 class ProcInstImpl extends NodeImpl { 14 15 String content; 16 int nameCode; 17 String systemId; 18 int lineNumber = -1; 19 20 public ProcInstImpl(int nameCode, String content) { 21 this.nameCode = nameCode; 22 this.content = content; 23 } 24 25 28 29 public int getNameCode() { 30 return nameCode; 31 } 32 33 public String getStringValue() { 34 return content; 35 } 36 37 public final int getNodeKind() { 38 return Type.PROCESSING_INSTRUCTION; 39 } 40 41 44 45 public void setLocation(String uri, int lineNumber) { 46 this.systemId = uri; 47 this.lineNumber = lineNumber; 48 } 49 50 53 54 public String getSystemId() { 55 return systemId; 56 } 57 58 61 62 public int getLineNumber() { 63 return lineNumber; 64 } 65 66 69 70 public void copy(Receiver out, int whichNamespaces, boolean copyAnnotations, int locationId) throws XPathException { 71 out.processingInstruction(getLocalPart(), content, locationId, 0); 72 } 73 74 76 81 82 public String getTarget() { 83 return getLocalPart(); 84 } 85 86 91 92 public String getData() { 93 return content; 94 } 95 96 97 } 98 99 100 | Popular Tags |