/[classpath]/classpath/gnu/xml/transform/LiteralNode.java
ViewVC logotype

Diff of /classpath/gnu/xml/transform/LiteralNode.java

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 1.1 by mark, Thu Dec 23 22:38:44 2004 UTC revision 1.2 by dog, Thu Jun 30 22:09:07 2005 UTC
# Line 64  final class LiteralNode Line 64  final class LiteralNode
64    
65    final Collection elementExcludeResultPrefixes;    final Collection elementExcludeResultPrefixes;
66    
67    LiteralNode(TemplateNode children, TemplateNode next, Node source)    LiteralNode(Node source)
68    {    {
     super(children, next);  
69      this.source = source;      this.source = source;
70      if (source.getNodeType() == Node.ELEMENT_NODE)      if (source.getNodeType() == Node.ELEMENT_NODE)
71        {        {
# Line 95  final class LiteralNode Line 94  final class LiteralNode
94    
95    TemplateNode clone(Stylesheet stylesheet)    TemplateNode clone(Stylesheet stylesheet)
96    {    {
97      return new LiteralNode((children == null) ? null :      TemplateNode ret = new LiteralNode(source);
98                             children.clone(stylesheet),      if (children != null)
99                             (next == null) ? null :        {
100                             next.clone(stylesheet),          ret.children = children.clone(stylesheet);
101                             source);        }
102        if (next != null)
103          {
104            ret.next = next.clone(stylesheet);
105          }
106        return ret;
107    }    }
108    
109    void doApply(Stylesheet stylesheet, QName mode,    void doApply(Stylesheet stylesheet, QName mode,
# Line 174  final class LiteralNode Line 178  final class LiteralNode
178                        }                        }
179                    }                    }
180                }                }
181              result = doc.adoptNode(result);              Node result2 = doc.adoptNode(result);
182              if (result == null)              if (result2 == null)
183                {                {
184                  String msg = "Error adopting node to result tree";                  String msg = "Error adopting node to result tree: " +
185                      result + " (" + result.getClass().getName() + ")";
186                  DOMSourceLocator l = new DOMSourceLocator(context);                  DOMSourceLocator l = new DOMSourceLocator(context);
187                  throw new TransformerException(msg, l);                  throw new TransformerException(msg, l);
188                }                }
189                result = result2;
190            }            }
191          if (nextSibling != null)          if (nextSibling != null)
192            {            {

Legend:
Removed from v.1.1  
changed lines
  Added in v.1.2

savannah-hackers-public@gnu.org
ViewVC Help
Powered by ViewVC 1.1.26