Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.
View | Details | Raw Unified | Return to bug 283214 | Differences between
and this patch

Collapse All | Expand All

(-)src/org/eclipse/wst/xml/xpath2/processor/test/AbstractPsychoPathTest.java (+7 lines)
Lines 9-14 Link Here
9
 *     David Carver (STAR) - initial API and implementation
9
 *     David Carver (STAR) - initial API and implementation
10
 *     Jin Mingjan - bug 262765 -  extractXPathExpression and getExpectedResults
10
 *     Jin Mingjan - bug 262765 -  extractXPathExpression and getExpectedResults
11
 *     Jesper S Moller - bug 283214 - fix IF THEN ELSE parsing and update grammars
11
 *     Jesper S Moller - bug 283214 - fix IF THEN ELSE parsing and update grammars
12
 *     Jesper S Moller - bug 283214 - fix XML result serialization
12
 *     Jesper S Moller - bug 283404 - fixed locale  
13
 *     Jesper S Moller - bug 283404 - fixed locale  
13
 *******************************************************************************/
14
 *******************************************************************************/
14
package org.eclipse.wst.xml.xpath2.processor.test;
15
package org.eclipse.wst.xml.xpath2.processor.test;
Lines 341-352 Link Here
341
        
342
        
342
		String actual = new String();
343
		String actual = new String();
343
		Iterator<NodeType> iterator = rs.iterator();
344
		Iterator<NodeType> iterator = rs.iterator();
345
		boolean queueSpace = false;
344
		while (iterator.hasNext()) {
346
		while (iterator.hasNext()) {
345
			AnyType aat = iterator.next();
347
			AnyType aat = iterator.next();
346
			if (aat instanceof NodeType) {
348
			if (aat instanceof NodeType) {
347
				NodeType nodeType = (NodeType) aat;
349
				NodeType nodeType = (NodeType) aat;
348
				Node node = nodeType.node_value();
350
				Node node = nodeType.node_value();
349
				serializer.write(node, outputText);
351
				serializer.write(node, outputText);
352
				queueSpace = false;
353
			} else {
354
				if (queueSpace) outputText.getByteStream().write(32);
355
				outputText.getByteStream().write(aat.string_value().getBytes("UTF-8"));
356
				queueSpace = true;
350
			}
357
			}
351
		}
358
		}
352
359
(-)src/org/eclipse/wst/xml/xpath2/processor/testsuite/core/CondExprTest.java (-4 / +6 lines)
Lines 165-173 Link Here
165
         actual = ex.code();
165
         actual = ex.code();
166
      }
166
      }
167
167
168
      assertEquals("XPath Result Error " + xqFile + ":", expectedResult, actual);
168
      // trim the expected result to only contain the attribute name:
169
        
169
      // <out name="axolotl"/>  -> axolotl
170
      expectedResult = trimSurrounding(expectedResult, "<out name=\"", "\"/>");
170
171
172
      assertEquals("XPath Result Error " + xqFile + ":", expectedResult, actual);
171
   }
173
   }
172
174
173
   //Test expression has another if expression.
175
   //Test expression has another if expression.
Lines 303-309 Link Here
303
	      Evaluator eval = new DefaultEvaluator(dc, domDoc);
305
	      Evaluator eval = new DefaultEvaluator(dc, domDoc);
304
	      ResultSequence rs = eval.evaluate(path);
306
	      ResultSequence rs = eval.evaluate(path);
305
         
307
         
306
          actual = buildResultString(rs);
308
          actual = buildXMLResultString(rs);
307
	
309
	
308
      } catch (XPathParserException ex) {
310
      } catch (XPathParserException ex) {
309
    	 actual = ex.code();
311
    	 actual = ex.code();
Lines 341-347 Link Here
341
	      Evaluator eval = new DefaultEvaluator(dc, domDoc);
343
	      Evaluator eval = new DefaultEvaluator(dc, domDoc);
342
	      ResultSequence rs = eval.evaluate(path);
344
	      ResultSequence rs = eval.evaluate(path);
343
         
345
         
344
          actual = buildResultString(rs);
346
          actual = buildXMLResultString(rs);
345
	
347
	
346
      } catch (XPathParserException ex) {
348
      } catch (XPathParserException ex) {
347
    	 actual = ex.code();
349
    	 actual = ex.code();
(-)src/org/eclipse/wst/xml/xpath2/processor/internal/function/FsEq.java (-1 / +2 lines)
Lines 10-15 Link Here
10
 *     Mukul Gandhi - bug 276134 - improvements to schema aware primitive type support
10
 *     Mukul Gandhi - bug 276134 - improvements to schema aware primitive type support
11
 *                                 for attribute/element nodes 
11
 *                                 for attribute/element nodes 
12
 *     David Carver - bug 262765 - fixed comparison on sequence range values.
12
 *     David Carver - bug 262765 - fixed comparison on sequence range values.
13
 *     Jesper S Moller - bug 283214 - fix eq for untyped atomic values
13
 *******************************************************************************/
14
 *******************************************************************************/
14
15
15
package org.eclipse.wst.xml.xpath2.processor.internal.function;
16
package org.eclipse.wst.xml.xpath2.processor.internal.function;
Lines 171-177 Link Here
171
			if (a instanceof XSUntypedAtomic)
172
			if (a instanceof XSUntypedAtomic)
172
				a = new XSString(a.string_value());
173
				a = new XSString(a.string_value());
173
			if (b instanceof XSUntypedAtomic)
174
			if (b instanceof XSUntypedAtomic)
174
				b = new XSString(a.string_value());
175
				b = new XSString(b.string_value());
175
		}
176
		}
176
177
177
		// rule c
178
		// rule c

Return to bug 283214