Project

Profile

Help

Revision 809d3f72

Added by Michael Kay over 12 years ago

2837199 Variable reference in xsl:number count or from pattern

View differences:

latest9.1/bj/net/sf/saxon/instruct/NumberInstruction.java
203 203
            lang = visitor.typeCheck(lang, contextItemType);
204 204
        }
205 205
        if (count != null) {
206
            count = count.analyze(visitor, contextItemType);
206
            visitor.typeCheck(new PatternSponsor(count), contextItemType);
207 207
        }
208 208
        if (from != null) {
209
            from = from.analyze(visitor, contextItemType);
209
            visitor.typeCheck(new PatternSponsor(from), contextItemType);
210 210
        }
211 211
        return this;
212 212
    }
latest9.1/bj/net/sf/saxon/pattern/PatternSponsor.java
156 156
        return this;
157 157
    }
158 158

  
159
    /**
160
     * Treat all subexpressions as being evaluated repeatedly
161
     * @param child
162
     * @return
163
     */
164

  
165
    public boolean hasLoopingSubexpression(Expression child) {
166
        return true;
167
    }
168

  
159 169
    /**
160 170
     * <p>Determine the static cardinality of the expression. This establishes how many items
161 171
     * there will be in the result of the expression, at compile time (i.e., without
latest9.2/hej/net/sf/saxon/instruct/NumberInstruction.java
202 202
            lang = visitor.typeCheck(lang, contextItemType);
203 203
        }
204 204
        if (count != null) {
205
            count = count.analyze(visitor, contextItemType);
205
            visitor.typeCheck(new PatternSponsor(count), contextItemType);
206 206
        }
207 207
        if (from != null) {
208
            from = from.analyze(visitor, contextItemType);
208
            visitor.typeCheck(new PatternSponsor(from), contextItemType);
209 209
        }
210 210
        return this;
211 211
    }
latest9.2/hej/net/sf/saxon/pattern/PatternSponsor.java
164 164
        return this;
165 165
    }
166 166

  
167
    /**
168
     * Treat all subexpressions as being evaluated repeatedly
169
     * @param child
170
     * @return
171
     */
172

  
173
    public boolean hasLoopingSubexpression(Expression child) {
174
        return true;
175
    }
176

  
167 177
    /**
168 178
     * <p>Determine the static cardinality of the expression. This establishes how many items
169 179
     * there will be in the result of the expression, at compile time (i.e., without

Also available in: Unified diff