1 package com.icl.saxon.tree; 2 import com.icl.saxon.om.NodeInfo; 3 import com.icl.saxon.om.DocumentInfo; 4 import com.icl.saxon.output.Outputter; 5 6 import org.w3c.dom.Text ; 7 import org.w3c.dom.DOMException ; 8 import javax.xml.transform.TransformerException ; 9 10 14 15 final class TextImpl extends NodeImpl implements Text { 16 17 private NodeInfo parent; 18 private String content; 19 20 public TextImpl(ParentNodeImpl parent, String content) { 21 this.parent = parent; 22 this.content = content; 23 } 24 25 28 29 public DocumentInfo getDocumentRoot() { 30 return parent.getDocumentRoot(); 31 } 32 33 37 38 public String getStringValue() { 39 return content; 40 } 41 42 46 47 public final short getNodeType() { 48 return TEXT; 49 } 50 51 54 55 public void copy(Outputter out) throws TransformerException { 56 out.writeContent(content); 57 } 58 59 62 63 public void copyStringValue(Outputter out) throws TransformerException { 64 out.writeContent(content); 65 } 66 67 71 72 public void truncateToStart() { 73 } 75 76 } 77 78 | Popular Tags |