1 package com.icl.saxon.tree; 2 import com.icl.saxon.output.Outputter; 3 4 import org.w3c.dom.ProcessingInstruction ; 5 import org.w3c.dom.DOMException ; 6 import javax.xml.transform.TransformerException ; 7 8 13 14 15 class ProcInstImpl extends NodeImpl implements ProcessingInstruction { 16 17 String content; 18 int nameCode; 19 String systemId; 20 int lineNumber = -1; 21 22 public ProcInstImpl(int nameCode, String content) { 23 this.nameCode = nameCode; 24 this.content = content; 25 } 26 27 30 31 public int getNameCode() { 32 return nameCode; 33 } 34 35 public String getStringValue() { 36 return content; 37 } 38 39 public final short getNodeType() { 40 return PI; 41 } 42 43 46 47 public void setLocation(String uri, int lineNumber) { 48 this.systemId = uri; 49 this.lineNumber = lineNumber; 50 } 51 52 55 56 public String getSystemId() { 57 return systemId; 58 } 59 60 63 64 public int getLineNumber() { 65 return lineNumber; 66 } 67 68 71 72 public void copy(Outputter out) throws TransformerException { 73 out.writePI(getLocalName(), content); 74 } 75 76 78 83 84 public String getTarget() { 85 return getLocalName(); 86 } 87 88 93 94 public String getData() { 95 return content; 96 } 97 98 103 104 public void setData(String data) throws DOMException { 105 disallowUpdate(); 106 } 107 108 } 109 110 111 | Popular Tags |