use of org.eclipse.wst.xml.xpath2.processor.internal.types.XSBoolean in project webtools.sourceediting by eclipse.
the class TestBugs method testTypedValueEnhancement_Bug323900_1.
public void testTypedValueEnhancement_Bug323900_1() throws Exception {
// Bug 323900
URL fileURL = bundle.getEntry("/bugTestFiles/bug323900_1.xml");
URL schemaURL = bundle.getEntry("/bugTestFiles/bug323900_1.xsd");
loadDOMDocument(fileURL, schemaURL);
// Get XSModel object for the Schema
XSModel schema = getGrammar(schemaURL);
setupDynamicContext(schema);
String xpath = "data(X) instance of xs:integer+";
compileXPath(xpath);
ResultSequence rs = evaluate(domDoc);
XSBoolean result = (XSBoolean) rs.first();
String actual = result.getStringValue();
assertEquals("true", actual);
}
use of org.eclipse.wst.xml.xpath2.processor.internal.types.XSBoolean in project webtools.sourceediting by eclipse.
the class TestBugs method testXSUnsignedShort.
public void testXSUnsignedShort() throws Exception {
// Bug 277645
bundle = Platform.getBundle("org.w3c.xqts.testsuite");
URL fileURL = bundle.getEntry("/TestSources/emptydoc.xml");
loadDOMDocument(fileURL);
// Get XML Schema Information for the Document
XSModel schema = getGrammar();
setupDynamicContext(schema);
// min value of xs:unsignedShort is 0
// max value of xs:unsignedShort is 65535
String xpath = "xs:unsignedShort('65535') eq 65535";
compileXPath(xpath);
ResultSequence rs = evaluate(domDoc);
XSBoolean result = (XSBoolean) rs.first();
String actual = result.getStringValue();
assertEquals("true", actual);
}
use of org.eclipse.wst.xml.xpath2.processor.internal.types.XSBoolean in project webtools.sourceediting by eclipse.
the class TestBugs method testXPathInstanceOf5_2.
public void testXPathInstanceOf5_2() throws Exception {
// Bug 298267
URL fileURL = bundle.getEntry("/bugTestFiles/attrNodeTest.xml");
URL schemaURL = bundle.getEntry("/bugTestFiles/attrNodeTest.xsd");
loadDOMDocument(fileURL, schemaURL);
// Get XSModel object for the Schema
XSModel schema = getGrammar(schemaURL);
setupDynamicContext(schema);
String xpath = "(/Example/x, /Example) instance of element(x, x_Type)+";
compileXPath(xpath);
ResultSequence rs = evaluate(domDoc);
XSBoolean result = (XSBoolean) rs.first();
assertEquals(false, result.value());
}
use of org.eclipse.wst.xml.xpath2.processor.internal.types.XSBoolean in project webtools.sourceediting by eclipse.
the class TestBugs method testXSUnsignedInt.
public void testXSUnsignedInt() throws Exception {
// Bug 277642
bundle = Platform.getBundle("org.w3c.xqts.testsuite");
URL fileURL = bundle.getEntry("/TestSources/emptydoc.xml");
loadDOMDocument(fileURL);
// Get XML Schema Information for the Document
XSModel schema = getGrammar();
setupDynamicContext(schema);
// min value of xs:unsignedInt is 0
// max value of xs:unsignedInt is 4294967295
String xpath = "xs:unsignedInt('4294967295') eq xs:unsignedInt('4294967295')";
compileXPath(xpath);
ResultSequence rs = evaluate(domDoc);
XSBoolean result = (XSBoolean) rs.first();
String actual = result.getStringValue();
assertEquals("true", actual);
}
use of org.eclipse.wst.xml.xpath2.processor.internal.types.XSBoolean in project webtools.sourceediting by eclipse.
the class TestBugs method testXSHexBinary.
public void testXSHexBinary() throws Exception {
// Bug 281054
bundle = Platform.getBundle("org.w3c.xqts.testsuite");
URL fileURL = bundle.getEntry("/TestSources/emptydoc.xml");
loadDOMDocument(fileURL);
// Get XML Schema Information for the Document
XSModel schema = getGrammar();
setupDynamicContext(schema);
String xpath = "xs:hexBinary('767479716c6a647663') eq xs:hexBinary('767479716c6a647663')";
compileXPath(xpath);
ResultSequence rs = evaluate(domDoc);
XSBoolean result = (XSBoolean) rs.first();
String actual = result.getStringValue();
assertEquals("true", actual);
}
Aggregations