~ubuntu-branches/ubuntu/precise/classpath/precise

« back to all changes in this revision

Viewing changes to gnu/xml/transform/IfNode.java

  • Committer: Bazaar Package Importer
  • Author(s): Michael Koch
  • Date: 2006-05-27 16:11:15 UTC
  • mfrom: (1.1.3 upstream)
  • Revision ID: james.westby@ubuntu.com-20060527161115-h6e39eposdt5snb6
Tags: 2:0.91-3
* Install header files to /usr/include/classpath.
* debian/control: classpath: Conflict with jamvm < 1.4.3 and
  cacao < 0.96 (Closes: #368172).

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
1
/* IfNode.java -- 
2
 
   Copyright (C) 2004 Free Software Foundation, Inc.
 
2
   Copyright (C) 2004,2006 Free Software Foundation, Inc.
3
3
 
4
4
This file is part of GNU Classpath.
5
5
 
62
62
  {
63
63
    TemplateNode ret = new IfNode(test.clone(stylesheet));
64
64
    if (children != null)
65
 
      {
66
 
        ret.children = children.clone(stylesheet);
67
 
      }
 
65
      ret.children = children.clone(stylesheet);
68
66
    if (next != null)
69
 
      {
70
 
        ret.next = next.clone(stylesheet);
71
 
      }
 
67
      ret.next = next.clone(stylesheet);
72
68
    return ret;
73
69
  }
74
70
 
75
71
  void doApply(Stylesheet stylesheet, QName mode,
76
 
             Node context, int pos, int len,
77
 
             Node parent, Node nextSibling)
 
72
               Node context, int pos, int len,
 
73
               Node parent, Node nextSibling)
78
74
    throws TransformerException
79
75
  {
80
76
    Object ret = test.evaluate(context, pos, len);
84
80
    if (success)
85
81
      {
86
82
        if (children != null)
87
 
          {
88
 
            children.apply(stylesheet, mode,
89
 
                           context, pos, len,
90
 
                           parent, nextSibling);
91
 
          }
 
83
          children.apply(stylesheet, mode,
 
84
                         context, pos, len,
 
85
                         parent, nextSibling);
92
86
      }
93
87
    if (next != null)
94
 
      {
95
 
        next.apply(stylesheet, mode,
96
 
                   context, pos, len,
97
 
                   parent, nextSibling);
98
 
      }
 
88
      next.apply(stylesheet, mode,
 
89
                 context, pos, len,
 
90
                 parent, nextSibling);
99
91
  }
100
92
  
101
93
  public boolean references(QName var)
102
94
  {
103
95
    if (test != null && test.references(var))
104
 
      {
105
 
        return true;
106
 
      }
 
96
      return true;
107
97
    return super.references(var);
108
98
  }
109
99
  
110
100
  public String toString()
111
101
  {
112
 
    StringBuffer buf = new StringBuffer(getClass().getName());
 
102
    StringBuffer buf = new StringBuffer("if");
113
103
    buf.append('[');
114
104
    buf.append("test=");
115
105
    buf.append(test);