| |
| /******************************************************************************* |
| * Copyright (c) 2009, 2017 Standards for Technology in Automotive Retail and others. |
| * All rights reserved. This program and the accompanying materials |
| * are made available under the terms of the Eclipse Public License 2.0 |
| * which accompanies this distribution, and is available at |
| * https://www.eclipse.org/legal/epl-2.0/ |
| * |
| * SPDX-License-Identifier: EPL-2.0 |
| * |
| * Contributors: |
| * David Carver - STAR - initial api and implementation bug 262765 |
| * Jesper SteeN Moller - bug 297707 - Missing the empty-sequence() type |
| *******************************************************************************/ |
| package org.eclipse.wst.xml.xpath2.processor.testsuite.core; |
| |
| import java.net.URL; |
| |
| import org.apache.xerces.xs.XSModel; |
| import org.eclipse.wst.xml.xpath2.processor.DynamicError; |
| import org.eclipse.wst.xml.xpath2.processor.ResultSequence; |
| import org.eclipse.wst.xml.xpath2.processor.StaticError; |
| import org.eclipse.wst.xml.xpath2.processor.XPathParserException; |
| import org.eclipse.wst.xml.xpath2.processor.test.AbstractPsychoPathTest; |
| |
| |
| public class SeqExprInstanceOfTest extends AbstractPsychoPathTest { |
| |
| //Evaluation of "instance of" expression for pattern "dateTime instance of xs:dateTime". |
| public void test_instanceof1() throws Exception { |
| String inputFile = "/TestSources/emptydoc.xml"; |
| String xqFile = "/Queries/XQuery/Expressions/exprSeqTypes/SeqExprInstanceOf/instanceof1.xq"; |
| String resultFile = "/ExpectedTestResults/Expressions/exprSeqTypes/SeqExprInstanceOf/instanceof1.txt"; |
| String expectedResult = getExpectedResult(resultFile); |
| URL fileURL = bundle.getEntry(inputFile); |
| loadDOMDocument(fileURL); |
| |
| // Get XML Schema Information for the Document |
| XSModel schema = getGrammar(); |
| |
| setupDynamicContext(schema); |
| |
| String xpath = extractXPathExpression(xqFile, inputFile); |
| String actual = null; |
| try { |
| compileXPath(xpath); |
| ResultSequence rs = evaluate(domDoc); |
| |
| |
| actual = buildResultString(rs); |
| |
| } catch (XPathParserException ex) { |
| actual = ex.code(); |
| } catch (StaticError ex) { |
| actual = ex.code(); |
| } catch (DynamicError ex) { |
| actual = ex.code(); |
| } |
| |
| assertEquals("XPath Result Error " + xqFile + ":", expectedResult, actual); |
| |
| |
| } |
| |
| //Evaluation of "instance of" expression for pattern "dateTime instance of xs:time". |
| public void test_instanceof2() throws Exception { |
| String inputFile = "/TestSources/emptydoc.xml"; |
| String xqFile = "/Queries/XQuery/Expressions/exprSeqTypes/SeqExprInstanceOf/instanceof2.xq"; |
| String resultFile = "/ExpectedTestResults/Expressions/exprSeqTypes/SeqExprInstanceOf/instanceof2.txt"; |
| String expectedResult = getExpectedResult(resultFile); |
| URL fileURL = bundle.getEntry(inputFile); |
| loadDOMDocument(fileURL); |
| |
| // Get XML Schema Information for the Document |
| XSModel schema = getGrammar(); |
| |
| setupDynamicContext(schema); |
| |
| String xpath = extractXPathExpression(xqFile, inputFile); |
| String actual = null; |
| try { |
| compileXPath(xpath); |
| ResultSequence rs = evaluate(domDoc); |
| |
| |
| actual = buildResultString(rs); |
| |
| } catch (XPathParserException ex) { |
| actual = ex.code(); |
| } catch (StaticError ex) { |
| actual = ex.code(); |
| } catch (DynamicError ex) { |
| actual = ex.code(); |
| } |
| |
| assertEquals("XPath Result Error " + xqFile + ":", expectedResult, actual); |
| |
| |
| } |
| |
| //Evaluation of "instance of" expression for pattern "dateTime instance of xs:date". |
| public void test_instanceof3() throws Exception { |
| String inputFile = "/TestSources/emptydoc.xml"; |
| String xqFile = "/Queries/XQuery/Expressions/exprSeqTypes/SeqExprInstanceOf/instanceof3.xq"; |
| String resultFile = "/ExpectedTestResults/Expressions/exprSeqTypes/SeqExprInstanceOf/instanceof3.txt"; |
| String expectedResult = getExpectedResult(resultFile); |
| URL fileURL = bundle.getEntry(inputFile); |
| loadDOMDocument(fileURL); |
| |
| // Get XML Schema Information for the Document |
| XSModel schema = getGrammar(); |
| |
| setupDynamicContext(schema); |
| |
| String xpath = extractXPathExpression(xqFile, inputFile); |
| String actual = null; |
| try { |
| compileXPath(xpath); |
| ResultSequence rs = evaluate(domDoc); |
| |
| |
| actual = buildResultString(rs); |
| |
| } catch (XPathParserException ex) { |
| actual = ex.code(); |
| } catch (StaticError ex) { |
| actual = ex.code(); |
| } catch (DynamicError ex) { |
| actual = ex.code(); |
| } |
| |
| assertEquals("XPath Result Error " + xqFile + ":", expectedResult, actual); |
| |
| |
| } |
| |
| //Evaluation of "instance of" expression for pattern "dateTime instance of xs:boolean". |
| public void test_instanceof4() throws Exception { |
| String inputFile = "/TestSources/emptydoc.xml"; |
| String xqFile = "/Queries/XQuery/Expressions/exprSeqTypes/SeqExprInstanceOf/instanceof4.xq"; |
| String resultFile = "/ExpectedTestResults/Expressions/exprSeqTypes/SeqExprInstanceOf/instanceof4.txt"; |
| String expectedResult = getExpectedResult(resultFile); |
| URL fileURL = bundle.getEntry(inputFile); |
| loadDOMDocument(fileURL); |
| |
| // Get XML Schema Information for the Document |
| XSModel schema = getGrammar(); |
| |
| setupDynamicContext(schema); |
| |
| String xpath = extractXPathExpression(xqFile, inputFile); |
| String actual = null; |
| try { |
| compileXPath(xpath); |
| ResultSequence rs = evaluate(domDoc); |
| |
| |
| actual = buildResultString(rs); |
| |
| } catch (XPathParserException ex) { |
| actual = ex.code(); |
| } catch (StaticError ex) { |
| actual = ex.code(); |
| } catch (DynamicError ex) { |
| actual = ex.code(); |
| } |
| |
| assertEquals("XPath Result Error " + xqFile + ":", expectedResult, actual); |
| |
| |
| } |
| |
| //Evaluation of "instance of" expression for pattern "dateTime instance of xs:float". |
| public void test_instanceof5() throws Exception { |
| String inputFile = "/TestSources/emptydoc.xml"; |
| String xqFile = "/Queries/XQuery/Expressions/exprSeqTypes/SeqExprInstanceOf/instanceof5.xq"; |
| String resultFile = "/ExpectedTestResults/Expressions/exprSeqTypes/SeqExprInstanceOf/instanceof5.txt"; |
| String expectedResult = getExpectedResult(resultFile); |
| URL fileURL = bundle.getEntry(inputFile); |
| loadDOMDocument(fileURL); |
| |
| // Get XML Schema Information for the Document |
| XSModel schema = getGrammar(); |
| |
| setupDynamicContext(schema); |
| |
| String xpath = extractXPathExpression(xqFile, inputFile); |
| String actual = null; |
| try { |
| compileXPath(xpath); |
| ResultSequence rs = evaluate(domDoc); |
| |
| |
| actual = buildResultString(rs); |
| |
| } catch (XPathParserException ex) { |
| actual = ex.code(); |
| } catch (StaticError ex) { |
| actual = ex.code(); |
| } catch (DynamicError ex) { |
| actual = ex.code(); |
| } |
| |
| assertEquals("XPath Result Error " + xqFile + ":", expectedResult, actual); |
| |
| |
| } |
| |
| //Evaluation of "instance of" expression for pattern "dateTime instance of xs:double". |
| public void test_instanceof6() throws Exception { |
| String inputFile = "/TestSources/emptydoc.xml"; |
| String xqFile = "/Queries/XQuery/Expressions/exprSeqTypes/SeqExprInstanceOf/instanceof6.xq"; |
| String resultFile = "/ExpectedTestResults/Expressions/exprSeqTypes/SeqExprInstanceOf/instanceof6.txt"; |
| String expectedResult = getExpectedResult(resultFile); |
| URL fileURL = bundle.getEntry(inputFile); |
| loadDOMDocument(fileURL); |
| |
| // Get XML Schema Information for the Document |
| XSModel schema = getGrammar(); |
| |
| setupDynamicContext(schema); |
| |
| String xpath = extractXPathExpression(xqFile, inputFile); |
| String actual = null; |
| try { |
| compileXPath(xpath); |
| ResultSequence rs = evaluate(domDoc); |
| |
| |
| actual = buildResultString(rs); |
| |
| } catch (XPathParserException ex) { |
| actual = ex.code(); |
| } catch (StaticError ex) { |
| actual = ex.code(); |
| } catch (DynamicError ex) { |
| actual = ex.code(); |
| } |
| |
| assertEquals("XPath Result Error " + xqFile + ":", expectedResult, actual); |
| |
| |
| } |
| |
| //Evaluation of "instance of" expression for pattern "dateTime instance of xs:anyURI". |
| public void test_instanceof7() throws Exception { |
| String inputFile = "/TestSources/emptydoc.xml"; |
| String xqFile = "/Queries/XQuery/Expressions/exprSeqTypes/SeqExprInstanceOf/instanceof7.xq"; |
| String resultFile = "/ExpectedTestResults/Expressions/exprSeqTypes/SeqExprInstanceOf/instanceof7.txt"; |
| String expectedResult = getExpectedResult(resultFile); |
| URL fileURL = bundle.getEntry(inputFile); |
| loadDOMDocument(fileURL); |
| |
| // Get XML Schema Information for the Document |
| XSModel schema = getGrammar(); |
| |
| setupDynamicContext(schema); |
| |
| String xpath = extractXPathExpression(xqFile, inputFile); |
| String actual = null; |
| try { |
| compileXPath(xpath); |
| ResultSequence rs = evaluate(domDoc); |
| |
| |
| actual = buildResultString(rs); |
| |
| } catch (XPathParserException ex) { |
| actual = ex.code(); |
| } catch (StaticError ex) { |
| actual = ex.code(); |
| } catch (DynamicError ex) { |
| actual = ex.code(); |
| } |
| |
| assertEquals("XPath Result Error " + xqFile + ":", expectedResult, actual); |
| |
| |
| } |
| |
| //Evaluation of "instance of" expression for pattern "dateTime instance of xs:string". |
| public void test_instanceof8() throws Exception { |
| String inputFile = "/TestSources/emptydoc.xml"; |
| String xqFile = "/Queries/XQuery/Expressions/exprSeqTypes/SeqExprInstanceOf/instanceof8.xq"; |
| String resultFile = "/ExpectedTestResults/Expressions/exprSeqTypes/SeqExprInstanceOf/instanceof8.txt"; |
| String expectedResult = getExpectedResult(resultFile); |
| URL fileURL = bundle.getEntry(inputFile); |
| loadDOMDocument(fileURL); |
| |
| // Get XML Schema Information for the Document |
| XSModel schema = getGrammar(); |
| |
| setupDynamicContext(schema); |
| |
| String xpath = extractXPathExpression(xqFile, inputFile); |
| String actual = null; |
| try { |
| compileXPath(xpath); |
| ResultSequence rs = evaluate(domDoc); |
| |
| |
| actual = buildResultString(rs); |
| |
| } catch (XPathParserException ex) { |
| actual = ex.code(); |
| } catch (StaticError ex) { |
| actual = ex.code(); |
| } catch (DynamicError ex) { |
| actual = ex.code(); |
| } |
| |
| assertEquals("XPath Result Error " + xqFile + ":", expectedResult, actual); |
| |
| |
| } |
| |
| //Evaluation of "instance of" expression for pattern "dateTime instance of xs:decimal". |
| public void test_instanceof9() throws Exception { |
| String inputFile = "/TestSources/emptydoc.xml"; |
| String xqFile = "/Queries/XQuery/Expressions/exprSeqTypes/SeqExprInstanceOf/instanceof9.xq"; |
| String resultFile = "/ExpectedTestResults/Expressions/exprSeqTypes/SeqExprInstanceOf/instanceof9.txt"; |
| String expectedResult = getExpectedResult(resultFile); |
| URL fileURL = bundle.getEntry(inputFile); |
| loadDOMDocument(fileURL); |
| |
| // Get XML Schema Information for the Document |
| XSModel schema = getGrammar(); |
| |
| setupDynamicContext(schema); |
| |
| String xpath = extractXPathExpression(xqFile, inputFile); |
| String actual = null; |
| try { |
| compileXPath(xpath); |
| ResultSequence rs = evaluate(domDoc); |
| |
| |
| actual = buildResultString(rs); |
| |
| } catch (XPathParserException ex) { |
| actual = ex.code(); |
| } catch (StaticError ex) { |
| actual = ex.code(); |
| } catch (DynamicError ex) { |
| actual = ex.code(); |
| } |
| |
| assertEquals("XPath Result Error " + xqFile + ":", expectedResult, actual); |
| |
| |
| } |
| |
| //Evaluation of "instance of" expression for pattern "dateTime instance of xs:integer". |
| public void test_instanceof10() throws Exception { |
| String inputFile = "/TestSources/emptydoc.xml"; |
| String xqFile = "/Queries/XQuery/Expressions/exprSeqTypes/SeqExprInstanceOf/instanceof10.xq"; |
| String resultFile = "/ExpectedTestResults/Expressions/exprSeqTypes/SeqExprInstanceOf/instanceof10.txt"; |
| String expectedResult = getExpectedResult(resultFile); |
| URL fileURL = bundle.getEntry(inputFile); |
| loadDOMDocument(fileURL); |
| |
| // Get XML Schema Information for the Document |
| XSModel schema = getGrammar(); |
| |
| setupDynamicContext(schema); |
| |
| String xpath = extractXPathExpression(xqFile, inputFile); |
| String actual = null; |
| try { |
| compileXPath(xpath); |
| ResultSequence rs = evaluate(domDoc); |
| |
| |
| actual = buildResultString(rs); |
| |
| } catch (XPathParserException ex) { |
| actual = ex.code(); |
| } catch (StaticError ex) { |
| actual = ex.code(); |
| } catch (DynamicError ex) { |
| actual = ex.code(); |
| } |
| |
| assertEquals("XPath Result Error " + xqFile + ":", expectedResult, actual); |
| |
| |
| } |
| |
| //Evaluation of "instance of" expression for pattern "dateTime instance of xs:int". |
| public void test_instanceof11() throws Exception { |
| String inputFile = "/TestSources/emptydoc.xml"; |
| String xqFile = "/Queries/XQuery/Expressions/exprSeqTypes/SeqExprInstanceOf/instanceof11.xq"; |
| String resultFile = "/ExpectedTestResults/Expressions/exprSeqTypes/SeqExprInstanceOf/instanceof11.txt"; |
| String expectedResult = getExpectedResult(resultFile); |
| URL fileURL = bundle.getEntry(inputFile); |
| loadDOMDocument(fileURL); |
| |
| // Get XML Schema Information for the Document |
| XSModel schema = getGrammar(); |
| |
| setupDynamicContext(schema); |
| |
| String xpath = extractXPathExpression(xqFile, inputFile); |
| String actual = null; |
| try { |
| compileXPath(xpath); |
| ResultSequence rs = evaluate(domDoc); |
| |
| |
| actual = buildResultString(rs); |
| |
| } catch (XPathParserException ex) { |
| actual = ex.code(); |
| } catch (StaticError ex) { |
| actual = ex.code(); |
| } catch (DynamicError ex) { |
| actual = ex.code(); |
| } |
| |
| assertEquals("XPath Result Error " + xqFile + ":", expectedResult, actual); |
| |
| |
| } |
| |
| //Evaluation of "instance of" expression for pattern "time instance of xs:dateTime". |
| public void test_instanceof12() throws Exception { |
| String inputFile = "/TestSources/emptydoc.xml"; |
| String xqFile = "/Queries/XQuery/Expressions/exprSeqTypes/SeqExprInstanceOf/instanceof12.xq"; |
| String resultFile = "/ExpectedTestResults/Expressions/exprSeqTypes/SeqExprInstanceOf/instanceof12.txt"; |
| String expectedResult = getExpectedResult(resultFile); |
| URL fileURL = bundle.getEntry(inputFile); |
| loadDOMDocument(fileURL); |
| |
| // Get XML Schema Information for the Document |
| XSModel schema = getGrammar(); |
| |
| setupDynamicContext(schema); |
| |
| String xpath = extractXPathExpression(xqFile, inputFile); |
| String actual = null; |
| try { |
| compileXPath(xpath); |
| ResultSequence rs = evaluate(domDoc); |
| |
| |
| actual = buildResultString(rs); |
| |
| } catch (XPathParserException ex) { |
| actual = ex.code(); |
| } catch (StaticError ex) { |
| actual = ex.code(); |
| } catch (DynamicError ex) { |
| actual = ex.code(); |
| } |
| |
| assertEquals("XPath Result Error " + xqFile + ":", expectedResult, actual); |
| |
| |
| } |
| |
| //Evaluation of "instance of" expression for pattern "time instance of xs:time". |
| public void test_instanceof13() throws Exception { |
| String inputFile = "/TestSources/emptydoc.xml"; |
| String xqFile = "/Queries/XQuery/Expressions/exprSeqTypes/SeqExprInstanceOf/instanceof13.xq"; |
| String resultFile = "/ExpectedTestResults/Expressions/exprSeqTypes/SeqExprInstanceOf/instanceof13.txt"; |
| String expectedResult = getExpectedResult(resultFile); |
| URL fileURL = bundle.getEntry(inputFile); |
| loadDOMDocument(fileURL); |
| |
| // Get XML Schema Information for the Document |
| XSModel schema = getGrammar(); |
| |
| setupDynamicContext(schema); |
| |
| String xpath = extractXPathExpression(xqFile, inputFile); |
| String actual = null; |
| try { |
| compileXPath(xpath); |
| ResultSequence rs = evaluate(domDoc); |
| |
| |
| actual = buildResultString(rs); |
| |
| } catch (XPathParserException ex) { |
| actual = ex.code(); |
| } catch (StaticError ex) { |
| actual = ex.code(); |
| } catch (DynamicError ex) { |
| actual = ex.code(); |
| } |
| |
| assertEquals("XPath Result Error " + xqFile + ":", expectedResult, actual); |
| |
| |
| } |
| |
| //Evaluation of "instance of" expression for pattern "time instance of xs:date". |
| public void test_instanceof14() throws Exception { |
| String inputFile = "/TestSources/emptydoc.xml"; |
| String xqFile = "/Queries/XQuery/Expressions/exprSeqTypes/SeqExprInstanceOf/instanceof14.xq"; |
| String resultFile = "/ExpectedTestResults/Expressions/exprSeqTypes/SeqExprInstanceOf/instanceof14.txt"; |
| String expectedResult = getExpectedResult(resultFile); |
| URL fileURL = bundle.getEntry(inputFile); |
| loadDOMDocument(fileURL); |
| |
| // Get XML Schema Information for the Document |
| XSModel schema = getGrammar(); |
| |
| setupDynamicContext(schema); |
| |
| String xpath = extractXPathExpression(xqFile, inputFile); |
| String actual = null; |
| try { |
| compileXPath(xpath); |
| ResultSequence rs = evaluate(domDoc); |
| |
| |
| actual = buildResultString(rs); |
| |
| } catch (XPathParserException ex) { |
| actual = ex.code(); |
| } catch (StaticError ex) { |
| actual = ex.code(); |
| } catch (DynamicError ex) { |
| actual = ex.code(); |
| } |
| |
| assertEquals("XPath Result Error " + xqFile + ":", expectedResult, actual); |
| |
| |
| } |
| |
| //Evaluation of "instance of" expression for pattern "time instance of xs:boolean". |
| public void test_instanceof15() throws Exception { |
| String inputFile = "/TestSources/emptydoc.xml"; |
| String xqFile = "/Queries/XQuery/Expressions/exprSeqTypes/SeqExprInstanceOf/instanceof15.xq"; |
| String resultFile = "/ExpectedTestResults/Expressions/exprSeqTypes/SeqExprInstanceOf/instanceof15.txt"; |
| String expectedResult = getExpectedResult(resultFile); |
| URL fileURL = bundle.getEntry(inputFile); |
| loadDOMDocument(fileURL); |
| |
| // Get XML Schema Information for the Document |
| XSModel schema = getGrammar(); |
| |
| setupDynamicContext(schema); |
| |
| String xpath = extractXPathExpression(xqFile, inputFile); |
| String actual = null; |
| try { |
| compileXPath(xpath); |
| ResultSequence rs = evaluate(domDoc); |
| |
| |
| actual = buildResultString(rs); |
| |
| } catch (XPathParserException ex) { |
| actual = ex.code(); |
| } catch (StaticError ex) { |
| actual = ex.code(); |
| } catch (DynamicError ex) { |
| actual = ex.code(); |
| } |
| |
| assertEquals("XPath Result Error " + xqFile + ":", expectedResult, actual); |
| |
| |
| } |
| |
| //Evaluation of "instance of" expression for pattern "time instance of xs:float". |
| public void test_instanceof16() throws Exception { |
| String inputFile = "/TestSources/emptydoc.xml"; |
| String xqFile = "/Queries/XQuery/Expressions/exprSeqTypes/SeqExprInstanceOf/instanceof16.xq"; |
| String resultFile = "/ExpectedTestResults/Expressions/exprSeqTypes/SeqExprInstanceOf/instanceof16.txt"; |
| String expectedResult = getExpectedResult(resultFile); |
| URL fileURL = bundle.getEntry(inputFile); |
| loadDOMDocument(fileURL); |
| |
| // Get XML Schema Information for the Document |
| XSModel schema = getGrammar(); |
| |
| setupDynamicContext(schema); |
| |
| String xpath = extractXPathExpression(xqFile, inputFile); |
| String actual = null; |
| try { |
| compileXPath(xpath); |
| ResultSequence rs = evaluate(domDoc); |
| |
| |
| actual = buildResultString(rs); |
| |
| } catch (XPathParserException ex) { |
| actual = ex.code(); |
| } catch (StaticError ex) { |
| actual = ex.code(); |
| } catch (DynamicError ex) { |
| actual = ex.code(); |
| } |
| |
| assertEquals("XPath Result Error " + xqFile + ":", expectedResult, actual); |
| |
| |
| } |
| |
| //Evaluation of "instance of" expression for pattern "time instance of xs:double". |
| public void test_instanceof17() throws Exception { |
| String inputFile = "/TestSources/emptydoc.xml"; |
| String xqFile = "/Queries/XQuery/Expressions/exprSeqTypes/SeqExprInstanceOf/instanceof17.xq"; |
| String resultFile = "/ExpectedTestResults/Expressions/exprSeqTypes/SeqExprInstanceOf/instanceof17.txt"; |
| String expectedResult = getExpectedResult(resultFile); |
| URL fileURL = bundle.getEntry(inputFile); |
| loadDOMDocument(fileURL); |
| |
| // Get XML Schema Information for the Document |
| XSModel schema = getGrammar(); |
| |
| setupDynamicContext(schema); |
| |
| String xpath = extractXPathExpression(xqFile, inputFile); |
| String actual = null; |
| try { |
| compileXPath(xpath); |
| ResultSequence rs = evaluate(domDoc); |
| |
| |
| actual = buildResultString(rs); |
| |
| } catch (XPathParserException ex) { |
| actual = ex.code(); |
| } catch (StaticError ex) { |
| actual = ex.code(); |
| } catch (DynamicError ex) { |
| actual = ex.code(); |
| } |
| |
| assertEquals("XPath Result Error " + xqFile + ":", expectedResult, actual); |
| |
| |
| } |
| |
| //Evaluation of "instance of" expression for pattern "time instance of xs:anyURI". |
| public void test_instanceof18() throws Exception { |
| String inputFile = "/TestSources/emptydoc.xml"; |
| String xqFile = "/Queries/XQuery/Expressions/exprSeqTypes/SeqExprInstanceOf/instanceof18.xq"; |
| String resultFile = "/ExpectedTestResults/Expressions/exprSeqTypes/SeqExprInstanceOf/instanceof18.txt"; |
| String expectedResult = getExpectedResult(resultFile); |
| URL fileURL = bundle.getEntry(inputFile); |
| loadDOMDocument(fileURL); |
| |
| // Get XML Schema Information for the Document |
| XSModel schema = getGrammar(); |
| |
| setupDynamicContext(schema); |
| |
| String xpath = extractXPathExpression(xqFile, inputFile); |
| String actual = null; |
| try { |
| compileXPath(xpath); |
| ResultSequence rs = evaluate(domDoc); |
| |
| |
| actual = buildResultString(rs); |
| |
| } catch (XPathParserException ex) { |
| actual = ex.code(); |
| } catch (StaticError ex) { |
| actual = ex.code(); |
| } catch (DynamicError ex) { |
| actual = ex.code(); |
| } |
| |
| assertEquals("XPath Result Error " + xqFile + ":", expectedResult, actual); |
| |
| |
| } |
| |
| //Evaluation of "instance of" expression for pattern "time instance of xs:string". |
| public void test_instanceof19() throws Exception { |
| String inputFile = "/TestSources/emptydoc.xml"; |
| String xqFile = "/Queries/XQuery/Expressions/exprSeqTypes/SeqExprInstanceOf/instanceof19.xq"; |
| String resultFile = "/ExpectedTestResults/Expressions/exprSeqTypes/SeqExprInstanceOf/instanceof19.txt"; |
| String expectedResult = getExpectedResult(resultFile); |
| URL fileURL = bundle.getEntry(inputFile); |
| loadDOMDocument(fileURL); |
| |
| // Get XML Schema Information for the Document |
| XSModel schema = getGrammar(); |
| |
| setupDynamicContext(schema); |
| |
| String xpath = extractXPathExpression(xqFile, inputFile); |
| String actual = null; |
| try { |
| compileXPath(xpath); |
| ResultSequence rs = evaluate(domDoc); |
| |
| |
| actual = buildResultString(rs); |
| |
| } catch (XPathParserException ex) { |
| actual = ex.code(); |
| } catch (StaticError ex) { |
| actual = ex.code(); |
| } catch (DynamicError ex) { |
| actual = ex.code(); |
| } |
| |
| assertEquals("XPath Result Error " + xqFile + ":", expectedResult, actual); |
| |
| |
| } |
| |
| //Evaluation of "instance of" expression for pattern "time instance of xs:decimal". |
| public void test_instanceof20() throws Exception { |
| String inputFile = "/TestSources/emptydoc.xml"; |
| String xqFile = "/Queries/XQuery/Expressions/exprSeqTypes/SeqExprInstanceOf/instanceof20.xq"; |
| String resultFile = "/ExpectedTestResults/Expressions/exprSeqTypes/SeqExprInstanceOf/instanceof20.txt"; |
| String expectedResult = getExpectedResult(resultFile); |
| URL fileURL = bundle.getEntry(inputFile); |
| loadDOMDocument(fileURL); |
| |
| // Get XML Schema Information for the Document |
| XSModel schema = getGrammar(); |
| |
| setupDynamicContext(schema); |
| |
| String xpath = extractXPathExpression(xqFile, inputFile); |
| String actual = null; |
| try { |
| compileXPath(xpath); |
| ResultSequence rs = evaluate(domDoc); |
| |
| |
| actual = buildResultString(rs); |
| |
| } catch (XPathParserException ex) { |
| actual = ex.code(); |
| } catch (StaticError ex) { |
| actual = ex.code(); |
| } catch (DynamicError ex) { |
| actual = ex.code(); |
| } |
| |
| assertEquals("XPath Result Error " + xqFile + ":", expectedResult, actual); |
| |
| |
| } |
| |
| //Evaluation of "instance of" expression for pattern "time instance of xs:integer". |
| public void test_instanceof21() throws Exception { |
| String inputFile = "/TestSources/emptydoc.xml"; |
| String xqFile = "/Queries/XQuery/Expressions/exprSeqTypes/SeqExprInstanceOf/instanceof21.xq"; |
| String resultFile = "/ExpectedTestResults/Expressions/exprSeqTypes/SeqExprInstanceOf/instanceof21.txt"; |
| String expectedResult = getExpectedResult(resultFile); |
| URL fileURL = bundle.getEntry(inputFile); |
| loadDOMDocument(fileURL); |
| |
| // Get XML Schema Information for the Document |
| XSModel schema = getGrammar(); |
| |
| setupDynamicContext(schema); |
| |
| String xpath = extractXPathExpression(xqFile, inputFile); |
| String actual = null; |
| try { |
| compileXPath(xpath); |
| ResultSequence rs = evaluate(domDoc); |
| |
| |
| actual = buildResultString(rs); |
| |
| } catch (XPathParserException ex) { |
| actual = ex.code(); |
| } catch (StaticError ex) { |
| actual = ex.code(); |
| } catch (DynamicError ex) { |
| actual = ex.code(); |
| } |
| |
| assertEquals("XPath Result Error " + xqFile + ":", expectedResult, actual); |
| |
| |
| } |
| |
| //Evaluation of "instance of" expression for pattern "time instance of xs:int". |
| public void test_instanceof22() throws Exception { |
| String inputFile = "/TestSources/emptydoc.xml"; |
| String xqFile = "/Queries/XQuery/Expressions/exprSeqTypes/SeqExprInstanceOf/instanceof22.xq"; |
| String resultFile = "/ExpectedTestResults/Expressions/exprSeqTypes/SeqExprInstanceOf/instanceof22.txt"; |
| String expectedResult = getExpectedResult(resultFile); |
| URL fileURL = bundle.getEntry(inputFile); |
| loadDOMDocument(fileURL); |
| |
| // Get XML Schema Information for the Document |
| XSModel schema = getGrammar(); |
| |
| setupDynamicContext(schema); |
| |
| String xpath = extractXPathExpression(xqFile, inputFile); |
| String actual = null; |
| try { |
| compileXPath(xpath); |
| ResultSequence rs = evaluate(domDoc); |
| |
| |
| actual = buildResultString(rs); |
| |
| } catch (XPathParserException ex) { |
| actual = ex.code(); |
| } catch (StaticError ex) { |
| actual = ex.code(); |
| } catch (DynamicError ex) { |
| actual = ex.code(); |
| } |
| |
| assertEquals("XPath Result Error " + xqFile + ":", expectedResult, actual); |
| |
| |
| } |
| |
| //Evaluation of "instance of" expression for pattern "date instance of xs:dateTime". |
| public void test_instanceof23() throws Exception { |
| String inputFile = "/TestSources/emptydoc.xml"; |
| String xqFile = "/Queries/XQuery/Expressions/exprSeqTypes/SeqExprInstanceOf/instanceof23.xq"; |
| String resultFile = "/ExpectedTestResults/Expressions/exprSeqTypes/SeqExprInstanceOf/instanceof23.txt"; |
| String expectedResult = getExpectedResult(resultFile); |
| URL fileURL = bundle.getEntry(inputFile); |
| loadDOMDocument(fileURL); |
| |
| // Get XML Schema Information for the Document |
| XSModel schema = getGrammar(); |
| |
| setupDynamicContext(schema); |
| |
| String xpath = extractXPathExpression(xqFile, inputFile); |
| String actual = null; |
| try { |
| compileXPath(xpath); |
| ResultSequence rs = evaluate(domDoc); |
| |
| |
| actual = buildResultString(rs); |
| |
| } catch (XPathParserException ex) { |
| actual = ex.code(); |
| } catch (StaticError ex) { |
| actual = ex.code(); |
| } catch (DynamicError ex) { |
| actual = ex.code(); |
| } |
| |
| assertEquals("XPath Result Error " + xqFile + ":", expectedResult, actual); |
| |
| |
| } |
| |
| //Evaluation of "instance of" expression for pattern "date instance of xs:time". |
| public void test_instanceof24() throws Exception { |
| String inputFile = "/TestSources/emptydoc.xml"; |
| String xqFile = "/Queries/XQuery/Expressions/exprSeqTypes/SeqExprInstanceOf/instanceof24.xq"; |
| String resultFile = "/ExpectedTestResults/Expressions/exprSeqTypes/SeqExprInstanceOf/instanceof24.txt"; |
| String expectedResult = getExpectedResult(resultFile); |
| URL fileURL = bundle.getEntry(inputFile); |
| loadDOMDocument(fileURL); |
| |
| // Get XML Schema Information for the Document |
| XSModel schema = getGrammar(); |
| |
| setupDynamicContext(schema); |
| |
| String xpath = extractXPathExpression(xqFile, inputFile); |
| String actual = null; |
| try { |
| compileXPath(xpath); |
| ResultSequence rs = evaluate(domDoc); |
| |
| |
| actual = buildResultString(rs); |
| |
| } catch (XPathParserException ex) { |
| actual = ex.code(); |
| } catch (StaticError ex) { |
| actual = ex.code(); |
| } catch (DynamicError ex) { |
| actual = ex.code(); |
| } |
| |
| assertEquals("XPath Result Error " + xqFile + ":", expectedResult, actual); |
| |
| |
| } |
| |
| //Evaluation of "instance of" expression for pattern "date instance of xs:date". |
| public void test_instanceof25() throws Exception { |
| String inputFile = "/TestSources/emptydoc.xml"; |
| String xqFile = "/Queries/XQuery/Expressions/exprSeqTypes/SeqExprInstanceOf/instanceof25.xq"; |
| String resultFile = "/ExpectedTestResults/Expressions/exprSeqTypes/SeqExprInstanceOf/instanceof25.txt"; |
| String expectedResult = getExpectedResult(resultFile); |
| URL fileURL = bundle.getEntry(inputFile); |
| loadDOMDocument(fileURL); |
| |
| // Get XML Schema Information for the Document |
| XSModel schema = getGrammar(); |
| |
| setupDynamicContext(schema); |
| |
| String xpath = extractXPathExpression(xqFile, inputFile); |
| String actual = null; |
| try { |
| compileXPath(xpath); |
| ResultSequence rs = evaluate(domDoc); |
| |
| |
| actual = buildResultString(rs); |
| |
| } catch (XPathParserException ex) { |
| actual = ex.code(); |
| } catch (StaticError ex) { |
| actual = ex.code(); |
| } catch (DynamicError ex) { |
| actual = ex.code(); |
| } |
| |
| assertEquals("XPath Result Error " + xqFile + ":", expectedResult, actual); |
| |
| |
| } |
| |
| //Evaluation of "instance of" expression for pattern "date instance of xs:boolean". |
| public void test_instanceof26() throws Exception { |
| String inputFile = "/TestSources/emptydoc.xml"; |
| String xqFile = "/Queries/XQuery/Expressions/exprSeqTypes/SeqExprInstanceOf/instanceof26.xq"; |
| String resultFile = "/ExpectedTestResults/Expressions/exprSeqTypes/SeqExprInstanceOf/instanceof26.txt"; |
| String expectedResult = getExpectedResult(resultFile); |
| URL fileURL = bundle.getEntry(inputFile); |
| loadDOMDocument(fileURL); |
| |
| // Get XML Schema Information for the Document |
| XSModel schema = getGrammar(); |
| |
| setupDynamicContext(schema); |
| |
| String xpath = extractXPathExpression(xqFile, inputFile); |
| String actual = null; |
| try { |
| compileXPath(xpath); |
| ResultSequence rs = evaluate(domDoc); |
| |
| |
| actual = buildResultString(rs); |
| |
| } catch (XPathParserException ex) { |
| actual = ex.code(); |
| } catch (StaticError ex) { |
| actual = ex.code(); |
| } catch (DynamicError ex) { |
| actual = ex.code(); |
| } |
| |
| assertEquals("XPath Result Error " + xqFile + ":", expectedResult, actual); |
| |
| |
| } |
| |
| //Evaluation of "instance of" expression for pattern "date instance of xs:float". |
| public void test_instanceof27() throws Exception { |
| String inputFile = "/TestSources/emptydoc.xml"; |
| String xqFile = "/Queries/XQuery/Expressions/exprSeqTypes/SeqExprInstanceOf/instanceof27.xq"; |
| String resultFile = "/ExpectedTestResults/Expressions/exprSeqTypes/SeqExprInstanceOf/instanceof27.txt"; |
| String expectedResult = getExpectedResult(resultFile); |
| URL fileURL = bundle.getEntry(inputFile); |
| loadDOMDocument(fileURL); |
| |
| // Get XML Schema Information for the Document |
| XSModel schema = getGrammar(); |
| |
| setupDynamicContext(schema); |
| |
| String xpath = extractXPathExpression(xqFile, inputFile); |
| String actual = null; |
| try { |
| compileXPath(xpath); |
| ResultSequence rs = evaluate(domDoc); |
| |
| |
| actual = buildResultString(rs); |
| |
| } catch (XPathParserException ex) { |
| actual = ex.code(); |
| } catch (StaticError ex) { |
| actual = ex.code(); |
| } catch (DynamicError ex) { |
| actual = ex.code(); |
| } |
| |
| assertEquals("XPath Result Error " + xqFile + ":", expectedResult, actual); |
| |
| |
| } |
| |
| //Evaluation of "instance of" expression for pattern "date instance of xs:double". |
| public void test_instanceof28() throws Exception { |
| String inputFile = "/TestSources/emptydoc.xml"; |
| String xqFile = "/Queries/XQuery/Expressions/exprSeqTypes/SeqExprInstanceOf/instanceof28.xq"; |
| String resultFile = "/ExpectedTestResults/Expressions/exprSeqTypes/SeqExprInstanceOf/instanceof28.txt"; |
| String expectedResult = getExpectedResult(resultFile); |
| URL fileURL = bundle.getEntry(inputFile); |
| loadDOMDocument(fileURL); |
| |
| // Get XML Schema Information for the Document |
| XSModel schema = getGrammar(); |
| |
| setupDynamicContext(schema); |
| |
| String xpath = extractXPathExpression(xqFile, inputFile); |
| String actual = null; |
| try { |
| compileXPath(xpath); |
| ResultSequence rs = evaluate(domDoc); |
| |
| |
| actual = buildResultString(rs); |
| |
| } catch (XPathParserException ex) { |
| actual = ex.code(); |
| } catch (StaticError ex) { |
| actual = ex.code(); |
| } catch (DynamicError ex) { |
| actual = ex.code(); |
| } |
| |
| assertEquals("XPath Result Error " + xqFile + ":", expectedResult, actual); |
| |
| |
| } |
| |
| //Evaluation of "instance of" expression for pattern "date instance of xs:anyURI". |
| public void test_instanceof29() throws Exception { |
| String inputFile = "/TestSources/emptydoc.xml"; |
| String xqFile = "/Queries/XQuery/Expressions/exprSeqTypes/SeqExprInstanceOf/instanceof29.xq"; |
| String resultFile = "/ExpectedTestResults/Expressions/exprSeqTypes/SeqExprInstanceOf/instanceof29.txt"; |
| String expectedResult = getExpectedResult(resultFile); |
| URL fileURL = bundle.getEntry(inputFile); |
| loadDOMDocument(fileURL); |
| |
| // Get XML Schema Information for the Document |
| XSModel schema = getGrammar(); |
| |
| setupDynamicContext(schema); |
| |
| String xpath = extractXPathExpression(xqFile, inputFile); |
| String actual = null; |
| try { |
| compileXPath(xpath); |
| ResultSequence rs = evaluate(domDoc); |
| |
| |
| actual = buildResultString(rs); |
| |
| } catch (XPathParserException ex) { |
| actual = ex.code(); |
| } catch (StaticError ex) { |
| actual = ex.code(); |
| } catch (DynamicError ex) { |
| actual = ex.code(); |
| } |
| |
| assertEquals("XPath Result Error " + xqFile + ":", expectedResult, actual); |
| |
| |
| } |
| |
| //Evaluation of "instance of" expression for pattern "date instance of xs:string". |
| public void test_instanceof30() throws Exception { |
| String inputFile = "/TestSources/emptydoc.xml"; |
| String xqFile = "/Queries/XQuery/Expressions/exprSeqTypes/SeqExprInstanceOf/instanceof30.xq"; |
| String resultFile = "/ExpectedTestResults/Expressions/exprSeqTypes/SeqExprInstanceOf/instanceof30.txt"; |
| String expectedResult = getExpectedResult(resultFile); |
| URL fileURL = bundle.getEntry(inputFile); |
| loadDOMDocument(fileURL); |
| |
| // Get XML Schema Information for the Document |
| XSModel schema = getGrammar(); |
| |
| setupDynamicContext(schema); |
| |
| String xpath = extractXPathExpression(xqFile, inputFile); |
| String actual = null; |
| try { |
| compileXPath(xpath); |
| ResultSequence rs = evaluate(domDoc); |
| |
| |
| actual = buildResultString(rs); |
| |
| } catch (XPathParserException ex) { |
| actual = ex.code(); |
| } catch (StaticError ex) { |
| actual = ex.code(); |
| } catch (DynamicError ex) { |
| actual = ex.code(); |
| } |
| |
| assertEquals("XPath Result Error " + xqFile + ":", expectedResult, actual); |
| |
| |
| } |
| |
| //Evaluation of "instance of" expression for pattern "date instance of xs:decimal". |
| public void test_instanceof31() throws Exception { |
| String inputFile = "/TestSources/emptydoc.xml"; |
| String xqFile = "/Queries/XQuery/Expressions/exprSeqTypes/SeqExprInstanceOf/instanceof31.xq"; |
| String resultFile = "/ExpectedTestResults/Expressions/exprSeqTypes/SeqExprInstanceOf/instanceof31.txt"; |
| String expectedResult = getExpectedResult(resultFile); |
| URL fileURL = bundle.getEntry(inputFile); |
| loadDOMDocument(fileURL); |
| |
| // Get XML Schema Information for the Document |
| XSModel schema = getGrammar(); |
| |
| setupDynamicContext(schema); |
| |
| String xpath = extractXPathExpression(xqFile, inputFile); |
| String actual = null; |
| try { |
| compileXPath(xpath); |
| ResultSequence rs = evaluate(domDoc); |
| |
| |
| actual = buildResultString(rs); |
| |
| } catch (XPathParserException ex) { |
| actual = ex.code(); |
| } catch (StaticError ex) { |
| actual = ex.code(); |
| } catch (DynamicError ex) { |
| actual = ex.code(); |
| } |
| |
| assertEquals("XPath Result Error " + xqFile + ":", expectedResult, actual); |
| |
| |
| } |
| |
| //Evaluation of "instance of" expression for pattern "date instance of xs:integer". |
| public void test_instanceof32() throws Exception { |
| String inputFile = "/TestSources/emptydoc.xml"; |
| String xqFile = "/Queries/XQuery/Expressions/exprSeqTypes/SeqExprInstanceOf/instanceof32.xq"; |
| String resultFile = "/ExpectedTestResults/Expressions/exprSeqTypes/SeqExprInstanceOf/instanceof32.txt"; |
| String expectedResult = getExpectedResult(resultFile); |
| URL fileURL = bundle.getEntry(inputFile); |
| loadDOMDocument(fileURL); |
| |
| // Get XML Schema Information for the Document |
| XSModel schema = getGrammar(); |
| |
| setupDynamicContext(schema); |
| |
| String xpath = extractXPathExpression(xqFile, inputFile); |
| String actual = null; |
| try { |
| compileXPath(xpath); |
| ResultSequence rs = evaluate(domDoc); |
| |
| |
| actual = buildResultString(rs); |
| |
| } catch (XPathParserException ex) { |
| actual = ex.code(); |
| } catch (StaticError ex) { |
| actual = ex.code(); |
| } catch (DynamicError ex) { |
| actual = ex.code(); |
| } |
| |
| assertEquals("XPath Result Error " + xqFile + ":", expectedResult, actual); |
| |
| |
| } |
| |
| //Evaluation of "instance of" expression for pattern "date instance of xs:int". |
| public void test_instanceof33() throws Exception { |
| String inputFile = "/TestSources/emptydoc.xml"; |
| String xqFile = "/Queries/XQuery/Expressions/exprSeqTypes/SeqExprInstanceOf/instanceof33.xq"; |
| String resultFile = "/ExpectedTestResults/Expressions/exprSeqTypes/SeqExprInstanceOf/instanceof33.txt"; |
| String expectedResult = getExpectedResult(resultFile); |
| URL fileURL = bundle.getEntry(inputFile); |
| loadDOMDocument(fileURL); |
| |
| // Get XML Schema Information for the Document |
| XSModel schema = getGrammar(); |
| |
| setupDynamicContext(schema); |
| |
| String xpath = extractXPathExpression(xqFile, inputFile); |
| String actual = null; |
| try { |
| compileXPath(xpath); |
| ResultSequence rs = evaluate(domDoc); |
| |
| |
| actual = buildResultString(rs); |
| |
| } catch (XPathParserException ex) { |
| actual = ex.code(); |
| } catch (StaticError ex) { |
| actual = ex.code(); |
| } catch (DynamicError ex) { |
| actual = ex.code(); |
| } |
| |
| assertEquals("XPath Result Error " + xqFile + ":", expectedResult, actual); |
| |
| |
| } |
| |
| //Evaluation of "instance of" expression for pattern "boolean instance of xs:dateTime". |
| public void test_instanceof34() throws Exception { |
| String inputFile = "/TestSources/emptydoc.xml"; |
| String xqFile = "/Queries/XQuery/Expressions/exprSeqTypes/SeqExprInstanceOf/instanceof34.xq"; |
| String resultFile = "/ExpectedTestResults/Expressions/exprSeqTypes/SeqExprInstanceOf/instanceof34.txt"; |
| String expectedResult = getExpectedResult(resultFile); |
| URL fileURL = bundle.getEntry(inputFile); |
| loadDOMDocument(fileURL); |
| |
| // Get XML Schema Information for the Document |
| XSModel schema = getGrammar(); |
| |
| setupDynamicContext(schema); |
| |
| String xpath = extractXPathExpression(xqFile, inputFile); |
| String actual = null; |
| try { |
| compileXPath(xpath); |
| ResultSequence rs = evaluate(domDoc); |
| |
| |
| actual = buildResultString(rs); |
| |
| } catch (XPathParserException ex) { |
| actual = ex.code(); |
| } catch (StaticError ex) { |
| actual = ex.code(); |
| } catch (DynamicError ex) { |
| actual = ex.code(); |
| } |
| |
| assertEquals("XPath Result Error " + xqFile + ":", expectedResult, actual); |
| |
| |
| } |
| |
| //Evaluation of "instance of" expression for pattern "boolean instance of xs:time". |
| public void test_instanceof35() throws Exception { |
| String inputFile = "/TestSources/emptydoc.xml"; |
| String xqFile = "/Queries/XQuery/Expressions/exprSeqTypes/SeqExprInstanceOf/instanceof35.xq"; |
| String resultFile = "/ExpectedTestResults/Expressions/exprSeqTypes/SeqExprInstanceOf/instanceof35.txt"; |
| String expectedResult = getExpectedResult(resultFile); |
| URL fileURL = bundle.getEntry(inputFile); |
| loadDOMDocument(fileURL); |
| |
| // Get XML Schema Information for the Document |
| XSModel schema = getGrammar(); |
| |
| setupDynamicContext(schema); |
| |
| String xpath = extractXPathExpression(xqFile, inputFile); |
| String actual = null; |
| try { |
| compileXPath(xpath); |
| ResultSequence rs = evaluate(domDoc); |
| |
| |
| actual = buildResultString(rs); |
| |
| } catch (XPathParserException ex) { |
| actual = ex.code(); |
| } catch (StaticError ex) { |
| actual = ex.code(); |
| } catch (DynamicError ex) { |
| actual = ex.code(); |
| } |
| |
| assertEquals("XPath Result Error " + xqFile + ":", expectedResult, actual); |
| |
| |
| } |
| |
| //Evaluation of "instance of" expression for pattern "boolean instance of xs:date". |
| public void test_instanceof36() throws Exception { |
| String inputFile = "/TestSources/emptydoc.xml"; |
| String xqFile = "/Queries/XQuery/Expressions/exprSeqTypes/SeqExprInstanceOf/instanceof36.xq"; |
| String resultFile = "/ExpectedTestResults/Expressions/exprSeqTypes/SeqExprInstanceOf/instanceof36.txt"; |
| String expectedResult = getExpectedResult(resultFile); |
| URL fileURL = bundle.getEntry(inputFile); |
| loadDOMDocument(fileURL); |
| |
| // Get XML Schema Information for the Document |
| XSModel schema = getGrammar(); |
| |
| setupDynamicContext(schema); |
| |
| String xpath = extractXPathExpression(xqFile, inputFile); |
| String actual = null; |
| try { |
| compileXPath(xpath); |
| ResultSequence rs = evaluate(domDoc); |
| |
| |
| actual = buildResultString(rs); |
| |
| } catch (XPathParserException ex) { |
| actual = ex.code(); |
| } catch (StaticError ex) { |
| actual = ex.code(); |
| } catch (DynamicError ex) { |
| actual = ex.code(); |
| } |
| |
| assertEquals("XPath Result Error " + xqFile + ":", expectedResult, actual); |
| |
| |
| } |
| |
| //Evaluation of "instance of" expression for pattern "boolean instance of xs:boolean". |
| public void test_instanceof37() throws Exception { |
| String inputFile = "/TestSources/emptydoc.xml"; |
| String xqFile = "/Queries/XQuery/Expressions/exprSeqTypes/SeqExprInstanceOf/instanceof37.xq"; |
| String resultFile = "/ExpectedTestResults/Expressions/exprSeqTypes/SeqExprInstanceOf/instanceof37.txt"; |
| String expectedResult = getExpectedResult(resultFile); |
| URL fileURL = bundle.getEntry(inputFile); |
| loadDOMDocument(fileURL); |
| |
| // Get XML Schema Information for the Document |
| XSModel schema = getGrammar(); |
| |
| setupDynamicContext(schema); |
| |
| String xpath = extractXPathExpression(xqFile, inputFile); |
| String actual = null; |
| try { |
| compileXPath(xpath); |
| ResultSequence rs = evaluate(domDoc); |
| |
| |
| actual = buildResultString(rs); |
| |
| } catch (XPathParserException ex) { |
| actual = ex.code(); |
| } catch (StaticError ex) { |
| actual = ex.code(); |
| } catch (DynamicError ex) { |
| actual = ex.code(); |
| } |
| |
| assertEquals("XPath Result Error " + xqFile + ":", expectedResult, actual); |
| |
| |
| } |
| |
| //Evaluation of "instance of" expression for pattern "boolean instance of xs:float". |
| public void test_instanceof38() throws Exception { |
| String inputFile = "/TestSources/emptydoc.xml"; |
| String xqFile = "/Queries/XQuery/Expressions/exprSeqTypes/SeqExprInstanceOf/instanceof38.xq"; |
| String resultFile = "/ExpectedTestResults/Expressions/exprSeqTypes/SeqExprInstanceOf/instanceof38.txt"; |
| String expectedResult = getExpectedResult(resultFile); |
| URL fileURL = bundle.getEntry(inputFile); |
| loadDOMDocument(fileURL); |
| |
| // Get XML Schema Information for the Document |
| XSModel schema = getGrammar(); |
| |
| setupDynamicContext(schema); |
| |
| String xpath = extractXPathExpression(xqFile, inputFile); |
| String actual = null; |
| try { |
| compileXPath(xpath); |
| ResultSequence rs = evaluate(domDoc); |
| |
| |
| actual = buildResultString(rs); |
| |
| } catch (XPathParserException ex) { |
| actual = ex.code(); |
| } catch (StaticError ex) { |
| actual = ex.code(); |
| } catch (DynamicError ex) { |
| actual = ex.code(); |
| } |
| |
| assertEquals("XPath Result Error " + xqFile + ":", expectedResult, actual); |
| |
| |
| } |
| |
| //Evaluation of "instance of" expression for pattern "boolean instance of xs:double". |
| public void test_instanceof39() throws Exception { |
| String inputFile = "/TestSources/emptydoc.xml"; |
| String xqFile = "/Queries/XQuery/Expressions/exprSeqTypes/SeqExprInstanceOf/instanceof39.xq"; |
| String resultFile = "/ExpectedTestResults/Expressions/exprSeqTypes/SeqExprInstanceOf/instanceof39.txt"; |
| String expectedResult = getExpectedResult(resultFile); |
| URL fileURL = bundle.getEntry(inputFile); |
| loadDOMDocument(fileURL); |
| |
| // Get XML Schema Information for the Document |
| XSModel schema = getGrammar(); |
| |
| setupDynamicContext(schema); |
| |
| String xpath = extractXPathExpression(xqFile, inputFile); |
| String actual = null; |
| try { |
| compileXPath(xpath); |
| ResultSequence rs = evaluate(domDoc); |
| |
| |
| actual = buildResultString(rs); |
| |
| } catch (XPathParserException ex) { |
| actual = ex.code(); |
| } catch (StaticError ex) { |
| actual = ex.code(); |
| } catch (DynamicError ex) { |
| actual = ex.code(); |
| } |
| |
| assertEquals("XPath Result Error " + xqFile + ":", expectedResult, actual); |
| |
| |
| } |
| |
| //Evaluation of "instance of" expression for pattern "boolean instance of xs:anyURI". |
| public void test_instanceof40() throws Exception { |
| String inputFile = "/TestSources/emptydoc.xml"; |
| String xqFile = "/Queries/XQuery/Expressions/exprSeqTypes/SeqExprInstanceOf/instanceof40.xq"; |
| String resultFile = "/ExpectedTestResults/Expressions/exprSeqTypes/SeqExprInstanceOf/instanceof40.txt"; |
| String expectedResult = getExpectedResult(resultFile); |
| URL fileURL = bundle.getEntry(inputFile); |
| loadDOMDocument(fileURL); |
| |
| // Get XML Schema Information for the Document |
| XSModel schema = getGrammar(); |
| |
| setupDynamicContext(schema); |
| |
| String xpath = extractXPathExpression(xqFile, inputFile); |
| String actual = null; |
| try { |
| compileXPath(xpath); |
| ResultSequence rs = evaluate(domDoc); |
| |
| |
| actual = buildResultString(rs); |
| |
| } catch (XPathParserException ex) { |
| actual = ex.code(); |
| } catch (StaticError ex) { |
| actual = ex.code(); |
| } catch (DynamicError ex) { |
| actual = ex.code(); |
| } |
| |
| assertEquals("XPath Result Error " + xqFile + ":", expectedResult, actual); |
| |
| |
| } |
| |
| //Evaluation of "instance of" expression for pattern "boolean instance of xs:string". |
| public void test_instanceof41() throws Exception { |
| String inputFile = "/TestSources/emptydoc.xml"; |
| String xqFile = "/Queries/XQuery/Expressions/exprSeqTypes/SeqExprInstanceOf/instanceof41.xq"; |
| String resultFile = "/ExpectedTestResults/Expressions/exprSeqTypes/SeqExprInstanceOf/instanceof41.txt"; |
| String expectedResult = getExpectedResult(resultFile); |
| URL fileURL = bundle.getEntry(inputFile); |
| loadDOMDocument(fileURL); |
| |
| // Get XML Schema Information for the Document |
| XSModel schema = getGrammar(); |
| |
| setupDynamicContext(schema); |
| |
| String xpath = extractXPathExpression(xqFile, inputFile); |
| String actual = null; |
| try { |
| compileXPath(xpath); |
| ResultSequence rs = evaluate(domDoc); |
| |
| |
| actual = buildResultString(rs); |
| |
| } catch (XPathParserException ex) { |
| actual = ex.code(); |
| } catch (StaticError ex) { |
| actual = ex.code(); |
| } catch (DynamicError ex) { |
| actual = ex.code(); |
| } |
| |
| assertEquals("XPath Result Error " + xqFile + ":", expectedResult, actual); |
| |
| |
| } |
| |
| //Evaluation of "instance of" expression for pattern "boolean instance of xs:decimal". |
| public void test_instanceof42() throws Exception { |
| String inputFile = "/TestSources/emptydoc.xml"; |
| String xqFile = "/Queries/XQuery/Expressions/exprSeqTypes/SeqExprInstanceOf/instanceof42.xq"; |
| String resultFile = "/ExpectedTestResults/Expressions/exprSeqTypes/SeqExprInstanceOf/instanceof42.txt"; |
| String expectedResult = getExpectedResult(resultFile); |
| URL fileURL = bundle.getEntry(inputFile); |
| loadDOMDocument(fileURL); |
| |
| // Get XML Schema Information for the Document |
| XSModel schema = getGrammar(); |
| |
| setupDynamicContext(schema); |
| |
| String xpath = extractXPathExpression(xqFile, inputFile); |
| String actual = null; |
| try { |
| compileXPath(xpath); |
| ResultSequence rs = evaluate(domDoc); |
| |
| |
| actual = buildResultString(rs); |
| |
| } catch (XPathParserException ex) { |
| actual = ex.code(); |
| } catch (StaticError ex) { |
| actual = ex.code(); |
| } catch (DynamicError ex) { |
| actual = ex.code(); |
| } |
| |
| assertEquals("XPath Result Error " + xqFile + ":", expectedResult, actual); |
| |
| |
| } |
| |
| //Evaluation of "instance of" expression for pattern "boolean instance of xs:integer". |
| public void test_instanceof43() throws Exception { |
| String inputFile = "/TestSources/emptydoc.xml"; |
| String xqFile = "/Queries/XQuery/Expressions/exprSeqTypes/SeqExprInstanceOf/instanceof43.xq"; |
| String resultFile = "/ExpectedTestResults/Expressions/exprSeqTypes/SeqExprInstanceOf/instanceof43.txt"; |
| String expectedResult = getExpectedResult(resultFile); |
| URL fileURL = bundle.getEntry(inputFile); |
| loadDOMDocument(fileURL); |
| |
| // Get XML Schema Information for the Document |
| XSModel schema = getGrammar(); |
| |
| setupDynamicContext(schema); |
| |
| String xpath = extractXPathExpression(xqFile, inputFile); |
| String actual = null; |
| try { |
| compileXPath(xpath); |
| ResultSequence rs = evaluate(domDoc); |
| |
| |
| actual = buildResultString(rs); |
| |
| } catch (XPathParserException ex) { |
| actual = ex.code(); |
| } catch (StaticError ex) { |
| actual = ex.code(); |
| } catch (DynamicError ex) { |
| actual = ex.code(); |
| } |
| |
| assertEquals("XPath Result Error " + xqFile + ":", expectedResult, actual); |
| |
| |
| } |
| |
| //Evaluation of "instance of" expression for pattern "boolean instance of xs:int". |
| public void test_instanceof44() throws Exception { |
| String inputFile = "/TestSources/emptydoc.xml"; |
| String xqFile = "/Queries/XQuery/Expressions/exprSeqTypes/SeqExprInstanceOf/instanceof44.xq"; |
| String resultFile = "/ExpectedTestResults/Expressions/exprSeqTypes/SeqExprInstanceOf/instanceof44.txt"; |
| String expectedResult = getExpectedResult(resultFile); |
| URL fileURL = bundle.getEntry(inputFile); |
| loadDOMDocument(fileURL); |
| |
| // Get XML Schema Information for the Document |
| XSModel schema = getGrammar(); |
| |
| setupDynamicContext(schema); |
| |
| String xpath = extractXPathExpression(xqFile, inputFile); |
| String actual = null; |
| try { |
| compileXPath(xpath); |
| ResultSequence rs = evaluate(domDoc); |
| |
| |
| actual = buildResultString(rs); |
| |
| } catch (XPathParserException ex) { |
| actual = ex.code(); |
| } catch (StaticError ex) { |
| actual = ex.code(); |
| } catch (DynamicError ex) { |
| actual = ex.code(); |
| } |
| |
| assertEquals("XPath Result Error " + xqFile + ":", expectedResult, actual); |
| |
| |
| } |
| |
| //Evaluation of "instance of" expression for pattern "float instance of xs:dateTime". |
| public void test_instanceof45() throws Exception { |
| String inputFile = "/TestSources/emptydoc.xml"; |
| String xqFile = "/Queries/XQuery/Expressions/exprSeqTypes/SeqExprInstanceOf/instanceof45.xq"; |
| String resultFile = "/ExpectedTestResults/Expressions/exprSeqTypes/SeqExprInstanceOf/instanceof45.txt"; |
| String expectedResult = getExpectedResult(resultFile); |
| URL fileURL = bundle.getEntry(inputFile); |
| loadDOMDocument(fileURL); |
| |
| // Get XML Schema Information for the Document |
| XSModel schema = getGrammar(); |
| |
| setupDynamicContext(schema); |
| |
| String xpath = extractXPathExpression(xqFile, inputFile); |
| String actual = null; |
| try { |
| compileXPath(xpath); |
| ResultSequence rs = evaluate(domDoc); |
| |
| |
| actual = buildResultString(rs); |
| |
| } catch (XPathParserException ex) { |
| actual = ex.code(); |
| } catch (StaticError ex) { |
| actual = ex.code(); |
| } catch (DynamicError ex) { |
| actual = ex.code(); |
| } |
| |
| assertEquals("XPath Result Error " + xqFile + ":", expectedResult, actual); |
| |
| |
| } |
| |
| //Evaluation of "instance of" expression for pattern "float instance of xs:time". |
| public void test_instanceof46() throws Exception { |
| String inputFile = "/TestSources/emptydoc.xml"; |
| String xqFile = "/Queries/XQuery/Expressions/exprSeqTypes/SeqExprInstanceOf/instanceof46.xq"; |
| String resultFile = "/ExpectedTestResults/Expressions/exprSeqTypes/SeqExprInstanceOf/instanceof46.txt"; |
| String expectedResult = getExpectedResult(resultFile); |
| URL fileURL = bundle.getEntry(inputFile); |
| loadDOMDocument(fileURL); |
| |
| // Get XML Schema Information for the Document |
| XSModel schema = getGrammar(); |
| |
| setupDynamicContext(schema); |
| |
| String xpath = extractXPathExpression(xqFile, inputFile); |
| String actual = null; |
| try { |
| compileXPath(xpath); |
| ResultSequence rs = evaluate(domDoc); |
| |
| |
| actual = buildResultString(rs); |
| |
| } catch (XPathParserException ex) { |
| actual = ex.code(); |
| } catch (StaticError ex) { |
| actual = ex.code(); |
| } catch (DynamicError ex) { |
| actual = ex.code(); |
| } |
| |
| assertEquals("XPath Result Error " + xqFile + ":", expectedResult, actual); |
| |
| |
| } |
| |
| //Evaluation of "instance of" expression for pattern "float instance of xs:date". |
| public void test_instanceof47() throws Exception { |
| String inputFile = "/TestSources/emptydoc.xml"; |
| String xqFile = "/Queries/XQuery/Expressions/exprSeqTypes/SeqExprInstanceOf/instanceof47.xq"; |
| String resultFile = "/ExpectedTestResults/Expressions/exprSeqTypes/SeqExprInstanceOf/instanceof47.txt"; |
| String expectedResult = getExpectedResult(resultFile); |
| URL fileURL = bundle.getEntry(inputFile); |
| loadDOMDocument(fileURL); |
| |
| // Get XML Schema Information for the Document |
| XSModel schema = getGrammar(); |
| |
| setupDynamicContext(schema); |
| |
| String xpath = extractXPathExpression(xqFile, inputFile); |
| String actual = null; |
| try { |
| compileXPath(xpath); |
| ResultSequence rs = evaluate(domDoc); |
| |
| |
| actual = buildResultString(rs); |
| |
| } catch (XPathParserException ex) { |
| actual = ex.code(); |
| } catch (StaticError ex) { |
| actual = ex.code(); |
| } catch (DynamicError ex) { |
| actual = ex.code(); |
| } |
| |
| assertEquals("XPath Result Error " + xqFile + ":", expectedResult, actual); |
| |
| |
| } |
| |
| //Evaluation of "instance of" expression for pattern "float instance of xs:boolean". |
| public void test_instanceof48() throws Exception { |
| String inputFile = "/TestSources/emptydoc.xml"; |
| String xqFile = "/Queries/XQuery/Expressions/exprSeqTypes/SeqExprInstanceOf/instanceof48.xq"; |
| String resultFile = "/ExpectedTestResults/Expressions/exprSeqTypes/SeqExprInstanceOf/instanceof48.txt"; |
| String expectedResult = getExpectedResult(resultFile); |
| URL fileURL = bundle.getEntry(inputFile); |
| loadDOMDocument(fileURL); |
| |
| // Get XML Schema Information for the Document |
| XSModel schema = getGrammar(); |
| |
| setupDynamicContext(schema); |
| |
| String xpath = extractXPathExpression(xqFile, inputFile); |
| String actual = null; |
| try { |
| compileXPath(xpath); |
| ResultSequence rs = evaluate(domDoc); |
| |
| |
| actual = buildResultString(rs); |
| |
| } catch (XPathParserException ex) { |
| actual = ex.code(); |
| } catch (StaticError ex) { |
| actual = ex.code(); |
| } catch (DynamicError ex) { |
| actual = ex.code(); |
| } |
| |
| assertEquals("XPath Result Error " + xqFile + ":", expectedResult, actual); |
| |
| |
| } |
| |
| //Evaluation of "instance of" expression for pattern "float instance of xs:float". |
| public void test_instanceof49() throws Exception { |
| String inputFile = "/TestSources/emptydoc.xml"; |
| String xqFile = "/Queries/XQuery/Expressions/exprSeqTypes/SeqExprInstanceOf/instanceof49.xq"; |
| String resultFile = "/ExpectedTestResults/Expressions/exprSeqTypes/SeqExprInstanceOf/instanceof49.txt"; |
| String expectedResult = getExpectedResult(resultFile); |
| URL fileURL = bundle.getEntry(inputFile); |
| loadDOMDocument(fileURL); |
| |
| // Get XML Schema Information for the Document |
| XSModel schema = getGrammar(); |
| |
| setupDynamicContext(schema); |
| |
| String xpath = extractXPathExpression(xqFile, inputFile); |
| String actual = null; |
| try { |
| compileXPath(xpath); |
| ResultSequence rs = evaluate(domDoc); |
| |
| |
| actual = buildResultString(rs); |
| |
| } catch (XPathParserException ex) { |
| actual = ex.code(); |
| } catch (StaticError ex) { |
| actual = ex.code(); |
| } catch (DynamicError ex) { |
| actual = ex.code(); |
| } |
| |
| assertEquals("XPath Result Error " + xqFile + ":", expectedResult, actual); |
| |
| |
| } |
| |
| //Evaluation of "instance of" expression for pattern "float instance of xs:double". |
| public void test_instanceof50() throws Exception { |
| String inputFile = "/TestSources/emptydoc.xml"; |
| String xqFile = "/Queries/XQuery/Expressions/exprSeqTypes/SeqExprInstanceOf/instanceof50.xq"; |
| String resultFile = "/ExpectedTestResults/Expressions/exprSeqTypes/SeqExprInstanceOf/instanceof50.txt"; |
| String expectedResult = getExpectedResult(resultFile); |
| URL fileURL = bundle.getEntry(inputFile); |
| loadDOMDocument(fileURL); |
| |
| // Get XML Schema Information for the Document |
| XSModel schema = getGrammar(); |
| |
| setupDynamicContext(schema); |
| |
| String xpath = extractXPathExpression(xqFile, inputFile); |
| String actual = null; |
| try { |
| compileXPath(xpath); |
| ResultSequence rs = evaluate(domDoc); |
| |
| |
| actual = buildResultString(rs); |
| |
| } catch (XPathParserException ex) { |
| actual = ex.code(); |
| } catch (StaticError ex) { |
| actual = ex.code(); |
| } catch (DynamicError ex) { |
| actual = ex.code(); |
| } |
| |
| assertEquals("XPath Result Error " + xqFile + ":", expectedResult, actual); |
| |
| |
| } |
| |
| //Evaluation of "instance of" expression for pattern "float instance of xs:anyURI". |
| public void test_instanceof51() throws Exception { |
| String inputFile = "/TestSources/emptydoc.xml"; |
| String xqFile = "/Queries/XQuery/Expressions/exprSeqTypes/SeqExprInstanceOf/instanceof51.xq"; |
| String resultFile = "/ExpectedTestResults/Expressions/exprSeqTypes/SeqExprInstanceOf/instanceof51.txt"; |
| String expectedResult = getExpectedResult(resultFile); |
| URL fileURL = bundle.getEntry(inputFile); |
| loadDOMDocument(fileURL); |
| |
| // Get XML Schema Information for the Document |
| XSModel schema = getGrammar(); |
| |
| setupDynamicContext(schema); |
| |
| String xpath = extractXPathExpression(xqFile, inputFile); |
| String actual = null; |
| try { |
| compileXPath(xpath); |
| ResultSequence rs = evaluate(domDoc); |
| |
| |
| actual = buildResultString(rs); |
| |
| } catch (XPathParserException ex) { |
| actual = ex.code(); |
| } catch (StaticError ex) { |
| actual = ex.code(); |
| } catch (DynamicError ex) { |
| actual = ex.code(); |
| } |
| |
| assertEquals("XPath Result Error " + xqFile + ":", expectedResult, actual); |
| |
| |
| } |
| |
| //Evaluation of "instance of" expression for pattern "float instance of xs:string". |
| public void test_instanceof52() throws Exception { |
| String inputFile = "/TestSources/emptydoc.xml"; |
| String xqFile = "/Queries/XQuery/Expressions/exprSeqTypes/SeqExprInstanceOf/instanceof52.xq"; |
| String resultFile = "/ExpectedTestResults/Expressions/exprSeqTypes/SeqExprInstanceOf/instanceof52.txt"; |
| String expectedResult = getExpectedResult(resultFile); |
| URL fileURL = bundle.getEntry(inputFile); |
| loadDOMDocument(fileURL); |
| |
| // Get XML Schema Information for the Document |
| XSModel schema = getGrammar(); |
| |
| setupDynamicContext(schema); |
| |
| String xpath = extractXPathExpression(xqFile, inputFile); |
| String actual = null; |
| try { |
| compileXPath(xpath); |
| ResultSequence rs = evaluate(domDoc); |
| |
| |
| actual = buildResultString(rs); |
| |
| } catch (XPathParserException ex) { |
| actual = ex.code(); |
| } catch (StaticError ex) { |
| actual = ex.code(); |
| } catch (DynamicError ex) { |
| actual = ex.code(); |
| } |
| |
| assertEquals("XPath Result Error " + xqFile + ":", expectedResult, actual); |
| |
| |
| } |
| |
| //Evaluation of "instance of" expression for pattern "float instance of xs:decimal". |
| public void test_instanceof53() throws Exception { |
| String inputFile = "/TestSources/emptydoc.xml"; |
| String xqFile = "/Queries/XQuery/Expressions/exprSeqTypes/SeqExprInstanceOf/instanceof53.xq"; |
| String resultFile = "/ExpectedTestResults/Expressions/exprSeqTypes/SeqExprInstanceOf/instanceof53.txt"; |
| String expectedResult = getExpectedResult(resultFile); |
| URL fileURL = bundle.getEntry(inputFile); |
| loadDOMDocument(fileURL); |
| |
| // Get XML Schema Information for the Document |
| XSModel schema = getGrammar(); |
| |
| setupDynamicContext(schema); |
| |
| String xpath = extractXPathExpression(xqFile, inputFile); |
| String actual = null; |
| try { |
| compileXPath(xpath); |
| ResultSequence rs = evaluate(domDoc); |
| |
| |
| actual = buildResultString(rs); |
| |
| } catch (XPathParserException ex) { |
| actual = ex.code(); |
| } catch (StaticError ex) { |
| actual = ex.code(); |
| } catch (DynamicError ex) { |
| actual = ex.code(); |
| } |
| |
| assertEquals("XPath Result Error " + xqFile + ":", expectedResult, actual); |
| |
| |
| } |
| |
| //Evaluation of "instance of" expression for pattern "float instance of xs:integer". |
| public void test_instanceof54() throws Exception { |
| String inputFile = "/TestSources/emptydoc.xml"; |
| String xqFile = "/Queries/XQuery/Expressions/exprSeqTypes/SeqExprInstanceOf/instanceof54.xq"; |
| String resultFile = "/ExpectedTestResults/Expressions/exprSeqTypes/SeqExprInstanceOf/instanceof54.txt"; |
| String expectedResult = getExpectedResult(resultFile); |
| URL fileURL = bundle.getEntry(inputFile); |
| loadDOMDocument(fileURL); |
| |
| // Get XML Schema Information for the Document |
| XSModel schema = getGrammar(); |
| |
| setupDynamicContext(schema); |
| |
| String xpath = extractXPathExpression(xqFile, inputFile); |
| String actual = null; |
| try { |
| compileXPath(xpath); |
| ResultSequence rs = evaluate(domDoc); |
| |
| |
| actual = buildResultString(rs); |
| |
| } catch (XPathParserException ex) { |
| actual = ex.code(); |
| } catch (StaticError ex) { |
| actual = ex.code(); |
| } catch (DynamicError ex) { |
| actual = ex.code(); |
| } |
| |
| assertEquals("XPath Result Error " + xqFile + ":", expectedResult, actual); |
| |
| |
| } |
| |
| //Evaluation of "instance of" expression for pattern "float instance of xs:int". |
| public void test_instanceof55() throws Exception { |
| String inputFile = "/TestSources/emptydoc.xml"; |
| String xqFile = "/Queries/XQuery/Expressions/exprSeqTypes/SeqExprInstanceOf/instanceof55.xq"; |
| String resultFile = "/ExpectedTestResults/Expressions/exprSeqTypes/SeqExprInstanceOf/instanceof55.txt"; |
| String expectedResult = getExpectedResult(resultFile); |
| URL fileURL = bundle.getEntry(inputFile); |
| loadDOMDocument(fileURL); |
| |
| // Get XML Schema Information for the Document |
| XSModel schema = getGrammar(); |
| |
| setupDynamicContext(schema); |
| |
| String xpath = extractXPathExpression(xqFile, inputFile); |
| String actual = null; |
| try { |
| compileXPath(xpath); |
| ResultSequence rs = evaluate(domDoc); |
| |
| |
| actual = buildResultString(rs); |
| |
| } catch (XPathParserException ex) { |
| actual = ex.code(); |
| } catch (StaticError ex) { |
| actual = ex.code(); |
| } catch (DynamicError ex) { |
| actual = ex.code(); |
| } |
| |
| assertEquals("XPath Result Error " + xqFile + ":", expectedResult, actual); |
| |
| |
| } |
| |
| //Evaluation of "instance of" expression for pattern "double instance of xs:dateTime". |
| public void test_instanceof56() throws Exception { |
| String inputFile = "/TestSources/emptydoc.xml"; |
| String xqFile = "/Queries/XQuery/Expressions/exprSeqTypes/SeqExprInstanceOf/instanceof56.xq"; |
| String resultFile = "/ExpectedTestResults/Expressions/exprSeqTypes/SeqExprInstanceOf/instanceof56.txt"; |
| String expectedResult = getExpectedResult(resultFile); |
| URL fileURL = bundle.getEntry(inputFile); |
| loadDOMDocument(fileURL); |
| |
| // Get XML Schema Information for the Document |
| XSModel schema = getGrammar(); |
| |
| setupDynamicContext(schema); |
| |
| String xpath = extractXPathExpression(xqFile, inputFile); |
| String actual = null; |
| try { |
| compileXPath(xpath); |
| ResultSequence rs = evaluate(domDoc); |
| |
| |
| actual = buildResultString(rs); |
| |
| } catch (XPathParserException ex) { |
| actual = ex.code(); |
| } catch (StaticError ex) { |
| actual = ex.code(); |
| } catch (DynamicError ex) { |
| actual = ex.code(); |
| } |
| |
| assertEquals("XPath Result Error " + xqFile + ":", expectedResult, actual); |
| |
| |
| } |
| |
| //Evaluation of "instance of" expression for pattern "double instance of xs:time". |
| public void test_instanceof57() throws Exception { |
| String inputFile = "/TestSources/emptydoc.xml"; |
| String xqFile = "/Queries/XQuery/Expressions/exprSeqTypes/SeqExprInstanceOf/instanceof57.xq"; |
| String resultFile = "/ExpectedTestResults/Expressions/exprSeqTypes/SeqExprInstanceOf/instanceof57.txt"; |
| String expectedResult = getExpectedResult(resultFile); |
| URL fileURL = bundle.getEntry(inputFile); |
| loadDOMDocument(fileURL); |
| |
| // Get XML Schema Information for the Document |
| XSModel schema = getGrammar(); |
| |
| setupDynamicContext(schema); |
| |
| String xpath = extractXPathExpression(xqFile, inputFile); |
| String actual = null; |
| try { |
| compileXPath(xpath); |
| ResultSequence rs = evaluate(domDoc); |
| |
| |
| actual = buildResultString(rs); |
| |
| } catch (XPathParserException ex) { |
| actual = ex.code(); |
| } catch (StaticError ex) { |
| actual = ex.code(); |
| } catch (DynamicError ex) { |
| actual = ex.code(); |
| } |
| |
| assertEquals("XPath Result Error " + xqFile + ":", expectedResult, actual); |
| |
| |
| } |
| |
| //Evaluation of "instance of" expression for pattern "double instance of xs:date". |
| public void test_instanceof58() throws Exception { |
| String inputFile = "/TestSources/emptydoc.xml"; |
| String xqFile = "/Queries/XQuery/Expressions/exprSeqTypes/SeqExprInstanceOf/instanceof58.xq"; |
| String resultFile = "/ExpectedTestResults/Expressions/exprSeqTypes/SeqExprInstanceOf/instanceof58.txt"; |
| String expectedResult = getExpectedResult(resultFile); |
| URL fileURL = bundle.getEntry(inputFile); |
| loadDOMDocument(fileURL); |
| |
| // Get XML Schema Information for the Document |
| XSModel schema = getGrammar(); |
| |
| setupDynamicContext(schema); |
| |
| String xpath = extractXPathExpression(xqFile, inputFile); |
| String actual = null; |
| try { |
| compileXPath(xpath); |
| ResultSequence rs = evaluate(domDoc); |
| |
| |
| actual = buildResultString(rs); |
| |
| } catch (XPathParserException ex) { |
| actual = ex.code(); |
| } catch (StaticError ex) { |
| actual = ex.code(); |
| } catch (DynamicError ex) { |
| actual = ex.code(); |
| } |
| |
| assertEquals("XPath Result Error " + xqFile + ":", expectedResult, actual); |
| |
| |
| } |
| |
| //Evaluation of "instance of" expression for pattern "double instance of xs:boolean". |
| public void test_instanceof59() throws Exception { |
| String inputFile = "/TestSources/emptydoc.xml"; |
| String xqFile = "/Queries/XQuery/Expressions/exprSeqTypes/SeqExprInstanceOf/instanceof59.xq"; |
| String resultFile = "/ExpectedTestResults/Expressions/exprSeqTypes/SeqExprInstanceOf/instanceof59.txt"; |
| String expectedResult = getExpectedResult(resultFile); |
| URL fileURL = bundle.getEntry(inputFile); |
| loadDOMDocument(fileURL); |
| |
| // Get XML Schema Information for the Document |
| XSModel schema = getGrammar(); |
| |
| setupDynamicContext(schema); |
| |
| String xpath = extractXPathExpression(xqFile, inputFile); |
| String actual = null; |
| try { |
| compileXPath(xpath); |
| ResultSequence rs = evaluate(domDoc); |
| |
| |
| actual = buildResultString(rs); |
| |
| } catch (XPathParserException ex) { |
| actual = ex.code(); |
| } catch (StaticError ex) { |
| actual = ex.code(); |
| } catch (DynamicError ex) { |
| actual = ex.code(); |
| } |
| |
| assertEquals("XPath Result Error " + xqFile + ":", expectedResult, actual); |
| |
| |
| } |
| |
| //Evaluation of "instance of" expression for pattern "double instance of xs:float". |
| public void test_instanceof60() throws Exception { |
| String inputFile = "/TestSources/emptydoc.xml"; |
| String xqFile = "/Queries/XQuery/Expressions/exprSeqTypes/SeqExprInstanceOf/instanceof60.xq"; |
| String resultFile = "/ExpectedTestResults/Expressions/exprSeqTypes/SeqExprInstanceOf/instanceof60.txt"; |
| String expectedResult = getExpectedResult(resultFile); |
| URL fileURL = bundle.getEntry(inputFile); |
| loadDOMDocument(fileURL); |
| |
| // Get XML Schema Information for the Document |
| XSModel schema = getGrammar(); |
| |
| setupDynamicContext(schema); |
| |
| String xpath = extractXPathExpression(xqFile, inputFile); |
| String actual = null; |
| try { |
| compileXPath(xpath); |
| ResultSequence rs = evaluate(domDoc); |
| |
| |
| actual = buildResultString(rs); |
| |
| } catch (XPathParserException ex) { |
| actual = ex.code(); |
| } catch (StaticError ex) { |
| actual = ex.code(); |
| } catch (DynamicError ex) { |
| actual = ex.code(); |
| } |
| |
| assertEquals("XPath Result Error " + xqFile + ":", expectedResult, actual); |
| |
| |
| } |
| |
| //Evaluation of "instance of" expression for pattern "double instance of xs:double". |
| public void test_instanceof61() throws Exception { |
| String inputFile = "/TestSources/emptydoc.xml"; |
| String xqFile = "/Queries/XQuery/Expressions/exprSeqTypes/SeqExprInstanceOf/instanceof61.xq"; |
| String resultFile = "/ExpectedTestResults/Expressions/exprSeqTypes/SeqExprInstanceOf/instanceof61.txt"; |
| String expectedResult = getExpectedResult(resultFile); |
| URL fileURL = bundle.getEntry(inputFile); |
| loadDOMDocument(fileURL); |
| |
| // Get XML Schema Information for the Document |
| XSModel schema = getGrammar(); |
| |
| setupDynamicContext(schema); |
| |
| String xpath = extractXPathExpression(xqFile, inputFile); |
| String actual = null; |
| try { |
| compileXPath(xpath); |
| ResultSequence rs = evaluate(domDoc); |
| |
| |
| actual = buildResultString(rs); |
| |
| } catch (XPathParserException ex) { |
| actual = ex.code(); |
| } catch (StaticError ex) { |
| actual = ex.code(); |
| } catch (DynamicError ex) { |
| actual = ex.code(); |
| } |
| |
| assertEquals("XPath Result Error " + xqFile + ":", expectedResult, actual); |
| |
| |
| } |
| |
| //Evaluation of "instance of" expression for pattern "double instance of xs:anyURI". |
| public void test_instanceof62() throws Exception { |
| String inputFile = "/TestSources/emptydoc.xml"; |
| String xqFile = "/Queries/XQuery/Expressions/exprSeqTypes/SeqExprInstanceOf/instanceof62.xq"; |
| String resultFile = "/ExpectedTestResults/Expressions/exprSeqTypes/SeqExprInstanceOf/instanceof62.txt"; |
| String expectedResult = getExpectedResult(resultFile); |
| URL fileURL = bundle.getEntry(inputFile); |
| loadDOMDocument(fileURL); |
| |
| // Get XML Schema Information for the Document |
| XSModel schema = getGrammar(); |
| |
| setupDynamicContext(schema); |
| |
| String xpath = extractXPathExpression(xqFile, inputFile); |
| String actual = null; |
| try { |
| compileXPath(xpath); |
| ResultSequence rs = evaluate(domDoc); |
| |
| |
| actual = buildResultString(rs); |
| |
| } catch (XPathParserException ex) { |
| actual = ex.code(); |
| } catch (StaticError ex) { |
| actual = ex.code(); |
| } catch (DynamicError ex) { |
| actual = ex.code(); |
| } |
| |
| assertEquals("XPath Result Error " + xqFile + ":", expectedResult, actual); |
| |
| |
| } |
| |
| //Evaluation of "instance of" expression for pattern "double instance of xs:string". |
| public void test_instanceof63() throws Exception { |
| String inputFile = "/TestSources/emptydoc.xml"; |
| String xqFile = "/Queries/XQuery/Expressions/exprSeqTypes/SeqExprInstanceOf/instanceof63.xq"; |
| String resultFile = "/ExpectedTestResults/Expressions/exprSeqTypes/SeqExprInstanceOf/instanceof63.txt"; |
| String expectedResult = getExpectedResult(resultFile); |
| URL fileURL = bundle.getEntry(inputFile); |
| loadDOMDocument(fileURL); |
| |
| // Get XML Schema Information for the Document |
| XSModel schema = getGrammar(); |
| |
| setupDynamicContext(schema); |
| |
| String xpath = extractXPathExpression(xqFile, inputFile); |
| String actual = null; |
| try { |
| compileXPath(xpath); |
| ResultSequence rs = evaluate(domDoc); |
| |
| |
| actual = buildResultString(rs); |
| |
| } catch (XPathParserException ex) { |
| actual = ex.code(); |
| } catch (StaticError ex) { |
| actual = ex.code(); |
| } catch (DynamicError ex) { |
| actual = ex.code(); |
| } |
| |
| assertEquals("XPath Result Error " + xqFile + ":", expectedResult, actual); |
| |
| |
| } |
| |
| //Evaluation of "instance of" expression for pattern "double instance of xs:decimal". |
| public void test_instanceof64() throws Exception { |
| String inputFile = "/TestSources/emptydoc.xml"; |
| String xqFile = "/Queries/XQuery/Expressions/exprSeqTypes/SeqExprInstanceOf/instanceof64.xq"; |
| String resultFile = "/ExpectedTestResults/Expressions/exprSeqTypes/SeqExprInstanceOf/instanceof64.txt"; |
| String expectedResult = getExpectedResult(resultFile); |
| URL fileURL = bundle.getEntry(inputFile); |
| loadDOMDocument(fileURL); |
| |
| // Get XML Schema Information for the Document |
| XSModel schema = getGrammar(); |
| |
| setupDynamicContext(schema); |
| |
| String xpath = extractXPathExpression(xqFile, inputFile); |
| String actual = null; |
| try { |
| compileXPath(xpath); |
| ResultSequence rs = evaluate(domDoc); |
| |
| |
| actual = buildResultString(rs); |
| |
| } catch (XPathParserException ex) { |
| actual = ex.code(); |
| } catch (StaticError ex) { |
| actual = ex.code(); |
| } catch (DynamicError ex) { |
| actual = ex.code(); |
| } |
| |
| assertEquals("XPath Result Error " + xqFile + ":", expectedResult, actual); |
| |
| |
| } |
| |
| //Evaluation of "instance of" expression for pattern "double instance of xs:integer". |
| public void test_instanceof65() throws Exception { |
| String inputFile = "/TestSources/emptydoc.xml"; |
| String xqFile = "/Queries/XQuery/Expressions/exprSeqTypes/SeqExprInstanceOf/instanceof65.xq"; |
| String resultFile = "/ExpectedTestResults/Expressions/exprSeqTypes/SeqExprInstanceOf/instanceof65.txt"; |
| String expectedResult = getExpectedResult(resultFile); |
| URL fileURL = bundle.getEntry(inputFile); |
| loadDOMDocument(fileURL); |
| |
| // Get XML Schema Information for the Document |
| XSModel schema = getGrammar(); |
| |
| setupDynamicContext(schema); |
| |
| String xpath = extractXPathExpression(xqFile, inputFile); |
| String actual = null; |
| try { |
| compileXPath(xpath); |
| ResultSequence rs = evaluate(domDoc); |
| |
| |
| actual = buildResultString(rs); |
| |
| } catch (XPathParserException ex) { |
| actual = ex.code(); |
| } catch (StaticError ex) { |
| actual = ex.code(); |
| } catch (DynamicError ex) { |
| actual = ex.code(); |
| } |
| |
| assertEquals("XPath Result Error " + xqFile + ":", expectedResult, actual); |
| |
| |
| } |
| |
| //Evaluation of "instance of" expression for pattern "double instance of xs:int". |
| public void test_instanceof66() throws Exception { |
| String inputFile = "/TestSources/emptydoc.xml"; |
| String xqFile = "/Queries/XQuery/Expressions/exprSeqTypes/SeqExprInstanceOf/instanceof66.xq"; |
| String resultFile = "/ExpectedTestResults/Expressions/exprSeqTypes/SeqExprInstanceOf/instanceof66.txt"; |
| String expectedResult = getExpectedResult(resultFile); |
| URL fileURL = bundle.getEntry(inputFile); |
| loadDOMDocument(fileURL); |
| |
| // Get XML Schema Information for the Document |
| XSModel schema = getGrammar(); |
| |
| setupDynamicContext(schema); |
| |
| String xpath = extractXPathExpression(xqFile, inputFile); |
| String actual = null; |
| try { |
| compileXPath(xpath); |
| ResultSequence rs = evaluate(domDoc); |
| |
| |
| actual = buildResultString(rs); |
| |
| } catch (XPathParserException ex) { |
| actual = ex.code(); |
| } catch (StaticError ex) { |
| actual = ex.code(); |
| } catch (DynamicError ex) { |
| actual = ex.code(); |
| } |
| |
| assertEquals("XPath Result Error " + xqFile + ":", expectedResult, actual); |
| |
| |
| } |
| |
| //Evaluation of "instance of" expression for pattern "anyURI instance of xs:dateTime". |
| public void test_instanceof67() throws Exception { |
| String inputFile = "/TestSources/emptydoc.xml"; |
| String xqFile = "/Queries/XQuery/Expressions/exprSeqTypes/SeqExprInstanceOf/instanceof67.xq"; |
| String resultFile = "/ExpectedTestResults/Expressions/exprSeqTypes/SeqExprInstanceOf/instanceof67.txt"; |
| String expectedResult = getExpectedResult(resultFile); |
| URL fileURL = bundle.getEntry(inputFile); |
| loadDOMDocument(fileURL); |
| |
| // Get XML Schema Information for the Document |
| XSModel schema = getGrammar(); |
| |
| setupDynamicContext(schema); |
| |
| String xpath = extractXPathExpression(xqFile, inputFile); |
| String actual = null; |
| try { |
| compileXPath(xpath); |
| ResultSequence rs = evaluate(domDoc); |
| |
| |
| actual = buildResultString(rs); |
| |
| } catch (XPathParserException ex) { |
| actual = ex.code(); |
| } catch (StaticError ex) { |
| actual = ex.code(); |
| } catch (DynamicError ex) { |
| actual = ex.code(); |
| } |
| |
| assertEquals("XPath Result Error " + xqFile + ":", expectedResult, actual); |
| |
| |
| } |
| |
| //Evaluation of "instance of" expression for pattern "anyURI instance of xs:time". |
| public void test_instanceof68() throws Exception { |
| String inputFile = "/TestSources/emptydoc.xml"; |
| String xqFile = "/Queries/XQuery/Expressions/exprSeqTypes/SeqExprInstanceOf/instanceof68.xq"; |
| String resultFile = "/ExpectedTestResults/Expressions/exprSeqTypes/SeqExprInstanceOf/instanceof68.txt"; |
| String expectedResult = getExpectedResult(resultFile); |
| URL fileURL = bundle.getEntry(inputFile); |
| loadDOMDocument(fileURL); |
| |
| // Get XML Schema Information for the Document |
| XSModel schema = getGrammar(); |
| |
| setupDynamicContext(schema); |
| |
| String xpath = extractXPathExpression(xqFile, inputFile); |
| String actual = null; |
| try { |
| compileXPath(xpath); |
| ResultSequence rs = evaluate(domDoc); |
| |
| |
| actual = buildResultString(rs); |
| |
| } catch (XPathParserException ex) { |
| actual = ex.code(); |
| } catch (StaticError ex) { |
| actual = ex.code(); |
| } catch (DynamicError ex) { |
| actual = ex.code(); |
| } |
| |
| assertEquals("XPath Result Error " + xqFile + ":", expectedResult, actual); |
| |
| |
| } |
| |
| //Evaluation of "instance of" expression for pattern "anyURI instance of xs:date". |
| public void test_instanceof69() throws Exception { |
| String inputFile = "/TestSources/emptydoc.xml"; |
| String xqFile = "/Queries/XQuery/Expressions/exprSeqTypes/SeqExprInstanceOf/instanceof69.xq"; |
| String resultFile = "/ExpectedTestResults/Expressions/exprSeqTypes/SeqExprInstanceOf/instanceof69.txt"; |
| String expectedResult = getExpectedResult(resultFile); |
| URL fileURL = bundle.getEntry(inputFile); |
| loadDOMDocument(fileURL); |
| |
| // Get XML Schema Information for the Document |
| XSModel schema = getGrammar(); |
| |
| setupDynamicContext(schema); |
| |
| String xpath = extractXPathExpression(xqFile, inputFile); |
| String actual = null; |
| try { |
| compileXPath(xpath); |
| ResultSequence rs = evaluate(domDoc); |
| |
| |
| actual = buildResultString(rs); |
| |
| } catch (XPathParserException ex) { |
| actual = ex.code(); |
| } catch (StaticError ex) { |
| actual = ex.code(); |
| } catch (DynamicError ex) { |
| actual = ex.code(); |
| } |
| |
| assertEquals("XPath Result Error " + xqFile + ":", expectedResult, actual); |
| |
| |
| } |
| |
| //Evaluation of "instance of" expression for pattern "anyURI instance of xs:boolean". |
| public void test_instanceof70() throws Exception { |
| String inputFile = "/TestSources/emptydoc.xml"; |
| String xqFile = "/Queries/XQuery/Expressions/exprSeqTypes/SeqExprInstanceOf/instanceof70.xq"; |
| String resultFile = "/ExpectedTestResults/Expressions/exprSeqTypes/SeqExprInstanceOf/instanceof70.txt"; |
| String expectedResult = getExpectedResult(resultFile); |
| URL fileURL = bundle.getEntry(inputFile); |
| loadDOMDocument(fileURL); |
| |
| // Get XML Schema Information for the Document |
| XSModel schema = getGrammar(); |
| |
| setupDynamicContext(schema); |
| |
| String xpath = extractXPathExpression(xqFile, inputFile); |
| String actual = null; |
| try { |
| compileXPath(xpath); |
| ResultSequence rs = evaluate(domDoc); |
| |
| |
| actual = buildResultString(rs); |
| |
| } catch (XPathParserException ex) { |
| actual = ex.code(); |
| } catch (StaticError ex) { |
| actual = ex.code(); |
| } catch (DynamicError ex) { |
| actual = ex.code(); |
| } |
| |
| assertEquals("XPath Result Error " + xqFile + ":", expectedResult, actual); |
| |
| |
| } |
| |
| //Evaluation of "instance of" expression for pattern "anyURI instance of xs:float". |
| public void test_instanceof71() throws Exception { |
| String inputFile = "/TestSources/emptydoc.xml"; |
| String xqFile = "/Queries/XQuery/Expressions/exprSeqTypes/SeqExprInstanceOf/instanceof71.xq"; |
| String resultFile = "/ExpectedTestResults/Expressions/exprSeqTypes/SeqExprInstanceOf/instanceof71.txt"; |
| String expectedResult = getExpectedResult(resultFile); |
| URL fileURL = bundle.getEntry(inputFile); |
| loadDOMDocument(fileURL); |
| |
| // Get XML Schema Information for the Document |
| XSModel schema = getGrammar(); |
| |
| setupDynamicContext(schema); |
| |
| String xpath = extractXPathExpression(xqFile, inputFile); |
| String actual = null; |
| try { |
| compileXPath(xpath); |
| ResultSequence rs = evaluate(domDoc); |
| |
| |
| actual = buildResultString(rs); |
| |
| } catch (XPathParserException ex) { |
| actual = ex.code(); |
| } catch (StaticError ex) { |
| actual = ex.code(); |
| } catch (DynamicError ex) { |
| actual = ex.code(); |
| } |
| |
| assertEquals("XPath Result Error " + xqFile + ":", expectedResult, actual); |
| |
| |
| } |
| |
| //Evaluation of "instance of" expression for pattern "anyURI instance of xs:double". |
| public void test_instanceof72() throws Exception { |
| String inputFile = "/TestSources/emptydoc.xml"; |
| String xqFile = "/Queries/XQuery/Expressions/exprSeqTypes/SeqExprInstanceOf/instanceof72.xq"; |
| String resultFile = "/ExpectedTestResults/Expressions/exprSeqTypes/SeqExprInstanceOf/instanceof72.txt"; |
| String expectedResult = getExpectedResult(resultFile); |
| URL fileURL = bundle.getEntry(inputFile); |
| loadDOMDocument(fileURL); |
| |
| // Get XML Schema Information for the Document |
| XSModel schema = getGrammar(); |
| |
| setupDynamicContext(schema); |
| |
| String xpath = extractXPathExpression(xqFile, inputFile); |
| String actual = null; |
| try { |
| compileXPath(xpath); |
| ResultSequence rs = evaluate(domDoc); |
| |
| |
| actual = buildResultString(rs); |
| |
| } catch (XPathParserException ex) { |
| actual = ex.code(); |
| } catch (StaticError ex) { |
| actual = ex.code(); |
| } catch (DynamicError ex) { |
| actual = ex.code(); |
| } |
| |
| assertEquals("XPath Result Error " + xqFile + ":", expectedResult, actual); |
| |
| |
| } |
| |
| //Evaluation of "instance of" expression for pattern "anyURI instance of xs:anyURI". |
| public void test_instanceof73() throws Exception { |
| String inputFile = "/TestSources/emptydoc.xml"; |
| String xqFile = "/Queries/XQuery/Expressions/exprSeqTypes/SeqExprInstanceOf/instanceof73.xq"; |
| String resultFile = "/ExpectedTestResults/Expressions/exprSeqTypes/SeqExprInstanceOf/instanceof73.txt"; |
| String expectedResult = getExpectedResult(resultFile); |
| URL fileURL = bundle.getEntry(inputFile); |
| loadDOMDocument(fileURL); |
| |
| // Get XML Schema Information for the Document |
| XSModel schema = getGrammar(); |
| |
| setupDynamicContext(schema); |
| |
| String xpath = extractXPathExpression(xqFile, inputFile); |
| String actual = null; |
| try { |
| compileXPath(xpath); |
| ResultSequence rs = evaluate(domDoc); |
| |
| |
| actual = buildResultString(rs); |
| |
| } catch (XPathParserException ex) { |
| actual = ex.code(); |
| } catch (StaticError ex) { |
| actual = ex.code(); |
| } catch (DynamicError ex) { |
| actual = ex.code(); |
| } |
| |
| assertEquals("XPath Result Error " + xqFile + ":", expectedResult, actual); |
| |
| |
| } |
| |
| //Evaluation of "instance of" expression for pattern "anyURI instance of xs:string". |
| public void test_instanceof74() throws Exception { |
| String inputFile = "/TestSources/emptydoc.xml"; |
| String xqFile = "/Queries/XQuery/Expressions/exprSeqTypes/SeqExprInstanceOf/instanceof74.xq"; |
| String resultFile = "/ExpectedTestResults/Expressions/exprSeqTypes/SeqExprInstanceOf/instanceof74.txt"; |
| String expectedResult = getExpectedResult(resultFile); |
| URL fileURL = bundle.getEntry(inputFile); |
| loadDOMDocument(fileURL); |
| |
| // Get XML Schema Information for the Document |
| XSModel schema = getGrammar(); |
| |
| setupDynamicContext(schema); |
| |
| String xpath = extractXPathExpression(xqFile, inputFile); |
| String actual = null; |
| try { |
| compileXPath(xpath); |
| ResultSequence rs = evaluate(domDoc); |
| |
| |
| actual = buildResultString(rs); |
| |
| } catch (XPathParserException ex) { |
| actual = ex.code(); |
| } catch (StaticError ex) { |
| actual = ex.code(); |
| } catch (DynamicError ex) { |
| actual = ex.code(); |
| } |
| |
| assertEquals("XPath Result Error " + xqFile + ":", expectedResult, actual); |
| |
| |
| } |
| |
| //Evaluation of "instance of" expression for pattern "anyURI instance of xs:decimal". |
| public void test_instanceof75() throws Exception { |
| String inputFile = "/TestSources/emptydoc.xml"; |
| String xqFile = "/Queries/XQuery/Expressions/exprSeqTypes/SeqExprInstanceOf/instanceof75.xq"; |
| String resultFile = "/ExpectedTestResults/Expressions/exprSeqTypes/SeqExprInstanceOf/instanceof75.txt"; |
| String expectedResult = getExpectedResult(resultFile); |
| URL fileURL = bundle.getEntry(inputFile); |
| loadDOMDocument(fileURL); |
| |
| // Get XML Schema Information for the Document |
| XSModel schema = getGrammar(); |
| |
| setupDynamicContext(schema); |
| |
| String xpath = extractXPathExpression(xqFile, inputFile); |
| String actual = null; |
| try { |
| compileXPath(xpath); |
| ResultSequence rs = evaluate(domDoc); |
| |
| |
| actual = buildResultString(rs); |
| |
| } catch (XPathParserException ex) { |
| actual = ex.code(); |
| } catch (StaticError ex) { |
| actual = ex.code(); |
| } catch (DynamicError ex) { |
| actual = ex.code(); |
| } |
| |
| assertEquals("XPath Result Error " + xqFile + ":", expectedResult, actual); |
| |
| |
| } |
| |
| //Evaluation of "instance of" expression for pattern "anyURI instance of xs:integer". |
| public void test_instanceof76() throws Exception { |
| String inputFile = "/TestSources/emptydoc.xml"; |
| String xqFile = "/Queries/XQuery/Expressions/exprSeqTypes/SeqExprInstanceOf/instanceof76.xq"; |
| String resultFile = "/ExpectedTestResults/Expressions/exprSeqTypes/SeqExprInstanceOf/instanceof76.txt"; |
| String expectedResult = getExpectedResult(resultFile); |
| URL fileURL = bundle.getEntry(inputFile); |
| loadDOMDocument(fileURL); |
| |
| // Get XML Schema Information for the Document |
| XSModel schema = getGrammar(); |
| |
| setupDynamicContext(schema); |
| |
| String xpath = extractXPathExpression(xqFile, inputFile); |
| String actual = null; |
| try { |
| compileXPath(xpath); |
| ResultSequence rs = evaluate(domDoc); |
| |
| |
| actual = buildResultString(rs); |
| |
| } catch (XPathParserException ex) { |
| actual = ex.code(); |
| } catch (StaticError ex) { |
| actual = ex.code(); |
| } catch (DynamicError ex) { |
| actual = ex.code(); |
| } |
| |
| assertEquals("XPath Result Error " + xqFile + ":", expectedResult, actual); |
| |
| |
| } |
| |
| //Evaluation of "instance of" expression for pattern "anyURI instance of xs:int". |
| public void test_instanceof77() throws Exception { |
| String inputFile = "/TestSources/emptydoc.xml"; |
| String xqFile = "/Queries/XQuery/Expressions/exprSeqTypes/SeqExprInstanceOf/instanceof77.xq"; |
| String resultFile = "/ExpectedTestResults/Expressions/exprSeqTypes/SeqExprInstanceOf/instanceof77.txt"; |
| String expectedResult = getExpectedResult(resultFile); |
| URL fileURL = bundle.getEntry(inputFile); |
| loadDOMDocument(fileURL); |
| |
| // Get XML Schema Information for the Document |
| XSModel schema = getGrammar(); |
| |
| setupDynamicContext(schema); |
| |
| String xpath = extractXPathExpression(xqFile, inputFile); |
| String actual = null; |
| try { |
| compileXPath(xpath); |
| ResultSequence rs = evaluate(domDoc); |
| |
| |
| actual = buildResultString(rs); |
| |
| } catch (XPathParserException ex) { |
| actual = ex.code(); |
| } catch (StaticError ex) { |
| actual = ex.code(); |
| } catch (DynamicError ex) { |
| actual = ex.code(); |
| } |
| |
| assertEquals("XPath Result Error " + xqFile + ":", expectedResult, actual); |
| |
| |
| } |
| |
| //Evaluation of "instance of" expression for pattern "string instance of xs:dateTime". |
| public void test_instanceof78() throws Exception { |
| String inputFile = "/TestSources/emptydoc.xml"; |
| String xqFile = "/Queries/XQuery/Expressions/exprSeqTypes/SeqExprInstanceOf/instanceof78.xq"; |
| String resultFile = "/ExpectedTestResults/Expressions/exprSeqTypes/SeqExprInstanceOf/instanceof78.txt"; |
| String expectedResult = getExpectedResult(resultFile); |
| URL fileURL = bundle.getEntry(inputFile); |
| loadDOMDocument(fileURL); |
| |
| // Get XML Schema Information for the Document |
| XSModel schema = getGrammar(); |
| |
| setupDynamicContext(schema); |
| |
| String xpath = extractXPathExpression(xqFile, inputFile); |
| String actual = null; |
| try { |
| compileXPath(xpath); |
| ResultSequence rs = evaluate(domDoc); |
| |
| |
| actual = buildResultString(rs); |
| |
| } catch (XPathParserException ex) { |
| actual = ex.code(); |
| } catch (StaticError ex) { |
| actual = ex.code(); |
| } catch (DynamicError ex) { |
| actual = ex.code(); |
| } |
| |
| assertEquals("XPath Result Error " + xqFile + ":", expectedResult, actual); |
| |
| |
| } |
| |
| //Evaluation of "instance of" expression for pattern "string instance of xs:time". |
| public void test_instanceof79() throws Exception { |
| String inputFile = "/TestSources/emptydoc.xml"; |
| String xqFile = "/Queries/XQuery/Expressions/exprSeqTypes/SeqExprInstanceOf/instanceof79.xq"; |
| String resultFile = "/ExpectedTestResults/Expressions/exprSeqTypes/SeqExprInstanceOf/instanceof79.txt"; |
| String expectedResult = getExpectedResult(resultFile); |
| URL fileURL = bundle.getEntry(inputFile); |
| loadDOMDocument(fileURL); |
| |
| // Get XML Schema Information for the Document |
| XSModel schema = getGrammar(); |
| |
| setupDynamicContext(schema); |
| |
| String xpath = extractXPathExpression(xqFile, inputFile); |
| String actual = null; |
| try { |
| compileXPath(xpath); |
| ResultSequence rs = evaluate(domDoc); |
| |
| |
| actual = buildResultString(rs); |
| |
| } catch (XPathParserException ex) { |
| actual = ex.code(); |
| } catch (StaticError ex) { |
| actual = ex.code(); |
| } catch (DynamicError ex) { |
| actual = ex.code(); |
| } |
| |
| assertEquals("XPath Result Error " + xqFile + ":", expectedResult, actual); |
| |
| |
| } |
| |
| //Evaluation of "instance of" expression for pattern "string instance of xs:date". |
| public void test_instanceof80() throws Exception { |
| String inputFile = "/TestSources/emptydoc.xml"; |
| String xqFile = "/Queries/XQuery/Expressions/exprSeqTypes/SeqExprInstanceOf/instanceof80.xq"; |
| String resultFile = "/ExpectedTestResults/Expressions/exprSeqTypes/SeqExprInstanceOf/instanceof80.txt"; |
| String expectedResult = getExpectedResult(resultFile); |
| URL fileURL = bundle.getEntry(inputFile); |
| loadDOMDocument(fileURL); |
| |
| // Get XML Schema Information for the Document |
| XSModel schema = getGrammar(); |
| |
| setupDynamicContext(schema); |
| |
| String xpath = extractXPathExpression(xqFile, inputFile); |
| String actual = null; |
| try { |
| compileXPath(xpath); |
| ResultSequence rs = evaluate(domDoc); |
| |
| |
| actual = buildResultString(rs); |
| |
| } catch (XPathParserException ex) { |
| actual = ex.code(); |
| } catch (StaticError ex) { |
| actual = ex.code(); |
| } catch (DynamicError ex) { |
| actual = ex.code(); |
| } |
| |
| assertEquals("XPath Result Error " + xqFile + ":", expectedResult, actual); |
| |
| |
| } |
| |
| //Evaluation of "instance of" expression for pattern "string instance of xs:boolean". |
| public void test_instanceof81() throws Exception { |
| String inputFile = "/TestSources/emptydoc.xml"; |
| String xqFile = "/Queries/XQuery/Expressions/exprSeqTypes/SeqExprInstanceOf/instanceof81.xq"; |
| String resultFile = "/ExpectedTestResults/Expressions/exprSeqTypes/SeqExprInstanceOf/instanceof81.txt"; |
| String expectedResult = getExpectedResult(resultFile); |
| URL fileURL = bundle.getEntry(inputFile); |
| loadDOMDocument(fileURL); |
| |
| // Get XML Schema Information for the Document |
| XSModel schema = getGrammar(); |
| |
| setupDynamicContext(schema); |
| |
| String xpath = extractXPathExpression(xqFile, inputFile); |
| String actual = null; |
| try { |
| compileXPath(xpath); |
| ResultSequence rs = evaluate(domDoc); |
| |
| |
| actual = buildResultString(rs); |
| |
| } catch (XPathParserException ex) { |
| actual = ex.code(); |
| } catch (StaticError ex) { |
| actual = ex.code(); |
| } catch (DynamicError ex) { |
| actual = ex.code(); |
| } |
| |
| assertEquals("XPath Result Error " + xqFile + ":", expectedResult, actual); |
| |
| |
| } |
| |
| //Evaluation of "instance of" expression for pattern "string instance of xs:float". |
| public void test_instanceof82() throws Exception { |
| String inputFile = "/TestSources/emptydoc.xml"; |
| String xqFile = "/Queries/XQuery/Expressions/exprSeqTypes/SeqExprInstanceOf/instanceof82.xq"; |
| String resultFile = "/ExpectedTestResults/Expressions/exprSeqTypes/SeqExprInstanceOf/instanceof82.txt"; |
| String expectedResult = getExpectedResult(resultFile); |
| URL fileURL = bundle.getEntry(inputFile); |
| loadDOMDocument(fileURL); |
| |
| // Get XML Schema Information for the Document |
| XSModel schema = getGrammar(); |
| |
| setupDynamicContext(schema); |
| |
| String xpath = extractXPathExpression(xqFile, inputFile); |
| String actual = null; |
| try { |
| compileXPath(xpath); |
| ResultSequence rs = evaluate(domDoc); |
| |
| |
| actual = buildResultString(rs); |
| |
| } catch (XPathParserException ex) { |
| actual = ex.code(); |
| } catch (StaticError ex) { |
| actual = ex.code(); |
| } catch (DynamicError ex) { |
| actual = ex.code(); |
| } |
| |
| assertEquals("XPath Result Error " + xqFile + ":", expectedResult, actual); |
| |
| |
| } |
| |
| //Evaluation of "instance of" expression for pattern "string instance of xs:double". |
| public void test_instanceof83() throws Exception { |
| String inputFile = "/TestSources/emptydoc.xml"; |
| String xqFile = "/Queries/XQuery/Expressions/exprSeqTypes/SeqExprInstanceOf/instanceof83.xq"; |
| String resultFile = "/ExpectedTestResults/Expressions/exprSeqTypes/SeqExprInstanceOf/instanceof83.txt"; |
| String expectedResult = getExpectedResult(resultFile); |
| URL fileURL = bundle.getEntry(inputFile); |
| loadDOMDocument(fileURL); |
| |
| // Get XML Schema Information for the Document |
| XSModel schema = getGrammar(); |
| |
| setupDynamicContext(schema); |
| |
| String xpath = extractXPathExpression(xqFile, inputFile); |
| String actual = null; |
| try { |
| compileXPath(xpath); |
| ResultSequence rs = evaluate(domDoc); |
| |
| |
| actual = buildResultString(rs); |
| |
| } catch (XPathParserException ex) { |
| actual = ex.code(); |
| } catch (StaticError ex) { |
| actual = ex.code(); |
| } catch (DynamicError ex) { |
| actual = ex.code(); |
| } |
| |
| assertEquals("XPath Result Error " + xqFile + ":", expectedResult, actual); |
| |
| |
| } |
| |
| //Evaluation of "instance of" expression for pattern "string instance of xs:anyURI". |
| public void test_instanceof84() throws Exception { |
| String inputFile = "/TestSources/emptydoc.xml"; |
| String xqFile = "/Queries/XQuery/Expressions/exprSeqTypes/SeqExprInstanceOf/instanceof84.xq"; |
| String resultFile = "/ExpectedTestResults/Expressions/exprSeqTypes/SeqExprInstanceOf/instanceof84.txt"; |
| String expectedResult = getExpectedResult(resultFile); |
| URL fileURL = bundle.getEntry(inputFile); |
| loadDOMDocument(fileURL); |
| |
| // Get XML Schema Information for the Document |
| XSModel schema = getGrammar(); |
| |
| setupDynamicContext(schema); |
| |
| String xpath = extractXPathExpression(xqFile, inputFile); |
| String actual = null; |
| try { |
| compileXPath(xpath); |
| ResultSequence rs = evaluate(domDoc); |
| |
| |
| actual = buildResultString(rs); |
| |
| } catch (XPathParserException ex) { |
| actual = ex.code(); |
| } catch (StaticError ex) { |
| actual = ex.code(); |
| } catch (DynamicError ex) { |
| actual = ex.code(); |
| } |
| |
| assertEquals("XPath Result Error " + xqFile + ":", expectedResult, actual); |
| |
| |
| } |
| |
| //Evaluation of "instance of" expression for pattern "string instance of xs:string". |
| public void test_instanceof85() throws Exception { |
| String inputFile = "/TestSources/emptydoc.xml"; |
| String xqFile = "/Queries/XQuery/Expressions/exprSeqTypes/SeqExprInstanceOf/instanceof85.xq"; |
| String resultFile = "/ExpectedTestResults/Expressions/exprSeqTypes/SeqExprInstanceOf/instanceof85.txt"; |
| String expectedResult = getExpectedResult(resultFile); |
| URL fileURL = bundle.getEntry(inputFile); |
| loadDOMDocument(fileURL); |
| |
| // Get XML Schema Information for the Document |
| XSModel schema = getGrammar(); |
| |
| setupDynamicContext(schema); |
| |
| String xpath = extractXPathExpression(xqFile, inputFile); |
| String actual = null; |
| try { |
| compileXPath(xpath); |
| ResultSequence rs = evaluate(domDoc); |
| |
| |
| actual = buildResultString(rs); |
| |
| } catch (XPathParserException ex) { |
| actual = ex.code(); |
| } catch (StaticError ex) { |
| actual = ex.code(); |
| } catch (DynamicError ex) { |
| actual = ex.code(); |
| } |
| |
| assertEquals("XPath Result Error " + xqFile + ":", expectedResult, actual); |
| |
| |
| } |
| |
| //Evaluation of "instance of" expression for pattern "string instance of xs:decimal". |
| public void test_instanceof86() throws Exception { |
| String inputFile = "/TestSources/emptydoc.xml"; |
| String xqFile = "/Queries/XQuery/Expressions/exprSeqTypes/SeqExprInstanceOf/instanceof86.xq"; |
| String resultFile = "/ExpectedTestResults/Expressions/exprSeqTypes/SeqExprInstanceOf/instanceof86.txt"; |
| String expectedResult = getExpectedResult(resultFile); |
| URL fileURL = bundle.getEntry(inputFile); |
| loadDOMDocument(fileURL); |
| |
| // Get XML Schema Information for the Document |
| XSModel schema = getGrammar(); |
| |
| setupDynamicContext(schema); |
| |
| String xpath = extractXPathExpression(xqFile, inputFile); |
| String actual = null; |
| try { |
| compileXPath(xpath); |
| ResultSequence rs = evaluate(domDoc); |
| |
| |
| actual = buildResultString(rs); |
| |
| } catch (XPathParserException ex) { |
| actual = ex.code(); |
| } catch (StaticError ex) { |
| actual = ex.code(); |
| } catch (DynamicError ex) { |
| actual = ex.code(); |
| } |
| |
| assertEquals("XPath Result Error " + xqFile + ":", expectedResult, actual); |
| |
| |
| } |
| |
| //Evaluation of "instance of" expression for pattern "string instance of xs:integer". |
| public void test_instanceof87() throws Exception { |
| String inputFile = "/TestSources/emptydoc.xml"; |
| String xqFile = "/Queries/XQuery/Expressions/exprSeqTypes/SeqExprInstanceOf/instanceof87.xq"; |
| String resultFile = "/ExpectedTestResults/Expressions/exprSeqTypes/SeqExprInstanceOf/instanceof87.txt"; |
| String expectedResult = getExpectedResult(resultFile); |
| URL fileURL = bundle.getEntry(inputFile); |
| loadDOMDocument(fileURL); |
| |
| // Get XML Schema Information for the Document |
| XSModel schema = getGrammar(); |
| |
| setupDynamicContext(schema); |
| |
| String xpath = extractXPathExpression(xqFile, inputFile); |
| String actual = null; |
| try { |
| compileXPath(xpath); |
| ResultSequence rs = evaluate(domDoc); |
| |
| |
| actual = buildResultString(rs); |
| |
| } catch (XPathParserException ex) { |
| actual = ex.code(); |
| } catch (StaticError ex) { |
| actual = ex.code(); |
| } catch (DynamicError ex) { |
| actual = ex.code(); |
| } |
| |
| assertEquals("XPath Result Error " + xqFile + ":", expectedResult, actual); |
| |
| |
| } |
| |
| //Evaluation of "instance of" expression for pattern "string instance of xs:int". |
| public void test_instanceof88() throws Exception { |
| String inputFile = "/TestSources/emptydoc.xml"; |
| String xqFile = "/Queries/XQuery/Expressions/exprSeqTypes/SeqExprInstanceOf/instanceof88.xq"; |
| String resultFile = "/ExpectedTestResults/Expressions/exprSeqTypes/SeqExprInstanceOf/instanceof88.txt"; |
| String expectedResult = getExpectedResult(resultFile); |
| URL fileURL = bundle.getEntry(inputFile); |
| loadDOMDocument(fileURL); |
| |
| // Get XML Schema Information for the Document |
| XSModel schema = getGrammar(); |
| |
| setupDynamicContext(schema); |
| |
| String xpath = extractXPathExpression(xqFile, inputFile); |
| String actual = null; |
| try { |
| compileXPath(xpath); |
| ResultSequence rs = evaluate(domDoc); |
| |
| |
| actual = buildResultString(rs); |
| |
| } catch (XPathParserException ex) { |
| actual = ex.code(); |
| } catch (StaticError ex) { |
| actual = ex.code(); |
| } catch (DynamicError ex) { |
| actual = ex.code(); |
| } |
| |
| assertEquals("XPath Result Error " + xqFile + ":", expectedResult, actual); |
| |
| |
| } |
| |
| //Evaluation of "instance of" expression for pattern "decimal instance of xs:dateTime". |
| public void test_instanceof89() throws Exception { |
| String inputFile = "/TestSources/emptydoc.xml"; |
| String xqFile = "/Queries/XQuery/Expressions/exprSeqTypes/SeqExprInstanceOf/instanceof89.xq"; |
| String resultFile = "/ExpectedTestResults/Expressions/exprSeqTypes/SeqExprInstanceOf/instanceof89.txt"; |
| String expectedResult = getExpectedResult(resultFile); |
| URL fileURL = bundle.getEntry(inputFile); |
| loadDOMDocument(fileURL); |
| |
| // Get XML Schema Information for the Document |
| XSModel schema = getGrammar(); |
| |
| setupDynamicContext(schema); |
| |
| String xpath = extractXPathExpression(xqFile, inputFile); |
| String actual = null; |
| try { |
| compileXPath(xpath); |
| ResultSequence rs = evaluate(domDoc); |
| |
| |
| actual = buildResultString(rs); |
| |
| } catch (XPathParserException ex) { |
| actual = ex.code(); |
| } catch (StaticError ex) { |
| actual = ex.code(); |
| } catch (DynamicError ex) { |
| actual = ex.code(); |
| } |
| |
| assertEquals("XPath Result Error " + xqFile + ":", expectedResult, actual); |
| |
| |
| } |
| |
| //Evaluation of "instance of" expression for pattern "decimal instance of xs:time". |
| public void test_instanceof90() throws Exception { |
| String inputFile = "/TestSources/emptydoc.xml"; |
| String xqFile = "/Queries/XQuery/Expressions/exprSeqTypes/SeqExprInstanceOf/instanceof90.xq"; |
| String resultFile = "/ExpectedTestResults/Expressions/exprSeqTypes/SeqExprInstanceOf/instanceof90.txt"; |
| String expectedResult = getExpectedResult(resultFile); |
| URL fileURL = bundle.getEntry(inputFile); |
| loadDOMDocument(fileURL); |
| |
| // Get XML Schema Information for the Document |
| XSModel schema = getGrammar(); |
| |
| setupDynamicContext(schema); |
| |
| String xpath = extractXPathExpression(xqFile, inputFile); |
| String actual = null; |
| try { |
| compileXPath(xpath); |
| ResultSequence rs = evaluate(domDoc); |
| |
| |
| actual = buildResultString(rs); |
| |
| } catch (XPathParserException ex) { |
| actual = ex.code(); |
| } catch (StaticError ex) { |
| actual = ex.code(); |
| } catch (DynamicError ex) { |
| actual = ex.code(); |
| } |
| |
| assertEquals("XPath Result Error " + xqFile + ":", expectedResult, actual); |
| |
| |
| } |
| |
| //Evaluation of "instance of" expression for pattern "decimal instance of xs:date". |
| public void test_instanceof91() throws Exception { |
| String inputFile = "/TestSources/emptydoc.xml"; |
| String xqFile = "/Queries/XQuery/Expressions/exprSeqTypes/SeqExprInstanceOf/instanceof91.xq"; |
| String resultFile = "/ExpectedTestResults/Expressions/exprSeqTypes/SeqExprInstanceOf/instanceof91.txt"; |
| String expectedResult = getExpectedResult(resultFile); |
| URL fileURL = bundle.getEntry(inputFile); |
| loadDOMDocument(fileURL); |
| |
| // Get XML Schema Information for the Document |
| XSModel schema = getGrammar(); |
| |
| setupDynamicContext(schema); |
| |
| String xpath = extractXPathExpression(xqFile, inputFile); |
| String actual = null; |
| try { |
| compileXPath(xpath); |
| ResultSequence rs = evaluate(domDoc); |
| |
| |
| actual = buildResultString(rs); |
| |
| } catch (XPathParserException ex) { |
| actual = ex.code(); |
| } catch (StaticError ex) { |
| actual = ex.code(); |
| } catch (DynamicError ex) { |
| actual = ex.code(); |
| } |
| |
| assertEquals("XPath Result Error " + xqFile + ":", expectedResult, actual); |
| |
| |
| } |
| |
| //Evaluation of "instance of" expression for pattern "decimal instance of xs:boolean". |
| public void test_instanceof92() throws Exception { |
| String inputFile = "/TestSources/emptydoc.xml"; |
| String xqFile = "/Queries/XQuery/Expressions/exprSeqTypes/SeqExprInstanceOf/instanceof92.xq"; |
| String resultFile = "/ExpectedTestResults/Expressions/exprSeqTypes/SeqExprInstanceOf/instanceof92.txt"; |
| String expectedResult = getExpectedResult(resultFile); |
| URL fileURL = bundle.getEntry(inputFile); |
| loadDOMDocument(fileURL); |
| |
| // Get XML Schema Information for the Document |
| XSModel schema = getGrammar(); |
| |
| setupDynamicContext(schema); |
| |
| String xpath = extractXPathExpression(xqFile, inputFile); |
| String actual = null; |
| try { |
| compileXPath(xpath); |
| ResultSequence rs = evaluate(domDoc); |
| |
| |
| actual = buildResultString(rs); |
| |
| } catch (XPathParserException ex) { |
| actual = ex.code(); |
| } catch (StaticError ex) { |
| actual = ex.code(); |
| } catch (DynamicError ex) { |
| actual = ex.code(); |
| } |
| |
| assertEquals("XPath Result Error " + xqFile + ":", expectedResult, actual); |
| |
| |
| } |
| |
| //Evaluation of "instance of" expression for pattern "decimal instance of xs:float". |
| public void test_instanceof93() throws Exception { |
| String inputFile = "/TestSources/emptydoc.xml"; |
| String xqFile = "/Queries/XQuery/Expressions/exprSeqTypes/SeqExprInstanceOf/instanceof93.xq"; |
| String resultFile = "/ExpectedTestResults/Expressions/exprSeqTypes/SeqExprInstanceOf/instanceof93.txt"; |
| String expectedResult = getExpectedResult(resultFile); |
| URL fileURL = bundle.getEntry(inputFile); |
| loadDOMDocument(fileURL); |
| |
| // Get XML Schema Information for the Document |
| XSModel schema = getGrammar(); |
| |
| setupDynamicContext(schema); |
| |
| String xpath = extractXPathExpression(xqFile, inputFile); |
| String actual = null; |
| try { |
| compileXPath(xpath); |
| ResultSequence rs = evaluate(domDoc); |
| |
| |
| actual = buildResultString(rs); |
| |
| } catch (XPathParserException ex) { |
| actual = ex.code(); |
| } catch (StaticError ex) { |
| actual = ex.code(); |
| } catch (DynamicError ex) { |
| actual = ex.code(); |
| } |
| |
| assertEquals("XPath Result Error " + xqFile + ":", expectedResult, actual); |
| |
| |
| } |
| |
| //Evaluation of "instance of" expression for pattern "decimal instance of xs:double". |
| public void test_instanceof94() throws Exception { |
| String inputFile = "/TestSources/emptydoc.xml"; |
| String xqFile = "/Queries/XQuery/Expressions/exprSeqTypes/SeqExprInstanceOf/instanceof94.xq"; |
| String resultFile = "/ExpectedTestResults/Expressions/exprSeqTypes/SeqExprInstanceOf/instanceof94.txt"; |
| String expectedResult = getExpectedResult(resultFile); |
| URL fileURL = bundle.getEntry(inputFile); |
| loadDOMDocument(fileURL); |
| |
| // Get XML Schema Information for the Document |
| XSModel schema = getGrammar(); |
| |
| setupDynamicContext(schema); |
| |
| String xpath = extractXPathExpression(xqFile, inputFile); |
| String actual = null; |
| try { |
| compileXPath(xpath); |
| ResultSequence rs = evaluate(domDoc); |
| |
| |
| actual = buildResultString(rs); |
| |
| } catch (XPathParserException ex) { |
| actual = ex.code(); |
| } catch (StaticError ex) { |
| actual = ex.code(); |
| } catch (DynamicError ex) { |
| actual = ex.code(); |
| } |
| |
| assertEquals("XPath Result Error " + xqFile + ":", expectedResult, actual); |
| |
| |
| } |
| |
| //Evaluation of "instance of" expression for pattern "decimal instance of xs:anyURI". |
| public void test_instanceof95() throws Exception { |
| String inputFile = "/TestSources/emptydoc.xml"; |
| String xqFile = "/Queries/XQuery/Expressions/exprSeqTypes/SeqExprInstanceOf/instanceof95.xq"; |
| String resultFile = "/ExpectedTestResults/Expressions/exprSeqTypes/SeqExprInstanceOf/instanceof95.txt"; |
| String expectedResult = getExpectedResult(resultFile); |
| URL fileURL = bundle.getEntry(inputFile); |
| loadDOMDocument(fileURL); |
| |
| // Get XML Schema Information for the Document |
| XSModel schema = getGrammar(); |
| |
| setupDynamicContext(schema); |
| |
| String xpath = extractXPathExpression(xqFile, inputFile); |
| String actual = null; |
| try { |
| compileXPath(xpath); |
| ResultSequence rs = evaluate(domDoc); |
| |
| |
| actual = buildResultString(rs); |
| |
| } catch (XPathParserException ex) { |
| actual = ex.code(); |
| } catch (StaticError ex) { |
| actual = ex.code(); |
| } catch (DynamicError ex) { |
| actual = ex.code(); |
| } |
| |
| assertEquals("XPath Result Error " + xqFile + ":", expectedResult, actual); |
| |
| |
| } |
| |
| //Evaluation of "instance of" expression for pattern "decimal instance of xs:string". |
| public void test_instanceof96() throws Exception { |
| String inputFile = "/TestSources/emptydoc.xml"; |
| String xqFile = "/Queries/XQuery/Expressions/exprSeqTypes/SeqExprInstanceOf/instanceof96.xq"; |
| String resultFile = "/ExpectedTestResults/Expressions/exprSeqTypes/SeqExprInstanceOf/instanceof96.txt"; |
| String expectedResult = getExpectedResult(resultFile); |
| URL fileURL = bundle.getEntry(inputFile); |
| loadDOMDocument(fileURL); |
| |
| // Get XML Schema Information for the Document |
| XSModel schema = getGrammar(); |
| |
| setupDynamicContext(schema); |
| |
| String xpath = extractXPathExpression(xqFile, inputFile); |
| String actual = null; |
| try { |
| compileXPath(xpath); |
| ResultSequence rs = evaluate(domDoc); |
| |
| |
| actual = buildResultString(rs); |
| |
| } catch (XPathParserException ex) { |
| actual = ex.code(); |
| } catch (StaticError ex) { |
| actual = ex.code(); |
| } catch (DynamicError ex) { |
| actual = ex.code(); |
| } |
| |
| assertEquals("XPath Result Error " + xqFile + ":", expectedResult, actual); |
| |
| |
| } |
| |
| //Evaluation of "instance of" expression for pattern "decimal instance of xs:decimal". |
| public void test_instanceof97() throws Exception { |
| String inputFile = "/TestSources/emptydoc.xml"; |
| String xqFile = "/Queries/XQuery/Expressions/exprSeqTypes/SeqExprInstanceOf/instanceof97.xq"; |
| String resultFile = "/ExpectedTestResults/Expressions/exprSeqTypes/SeqExprInstanceOf/instanceof97.txt"; |
| String expectedResult = getExpectedResult(resultFile); |
| URL fileURL = bundle.getEntry(inputFile); |
| loadDOMDocument(fileURL); |
| |
| // Get XML Schema Information for the Document |
| XSModel schema = getGrammar(); |
| |
| setupDynamicContext(schema); |
| |
| String xpath = extractXPathExpression(xqFile, inputFile); |
| String actual = null; |
| try { |
| compileXPath(xpath); |
| ResultSequence rs = evaluate(domDoc); |
| |
| |
| actual = buildResultString(rs); |
| |
| } catch (XPathParserException ex) { |
| actual = ex.code(); |
| } catch (StaticError ex) { |
| actual = ex.code(); |
| } catch (DynamicError ex) { |
| actual = ex.code(); |
| } |
| |
| assertEquals("XPath Result Error " + xqFile + ":", expectedResult, actual); |
| |
| |
| } |
| |
| //Evaluation of "instance of" expression for pattern "decimal instance of xs:integer". |
| public void test_instanceof98() throws Exception { |
| String inputFile = "/TestSources/emptydoc.xml"; |
| String xqFile = "/Queries/XQuery/Expressions/exprSeqTypes/SeqExprInstanceOf/instanceof98.xq"; |
| String resultFile = "/ExpectedTestResults/Expressions/exprSeqTypes/SeqExprInstanceOf/instanceof98.txt"; |
| String expectedResult = getExpectedResult(resultFile); |
| URL fileURL = bundle.getEntry(inputFile); |
| loadDOMDocument(fileURL); |
| |
| // Get XML Schema Information for the Document |
| XSModel schema = getGrammar(); |
| |
| setupDynamicContext(schema); |
| |
| String xpath = extractXPathExpression(xqFile, inputFile); |
| String actual = null; |
| try { |
| compileXPath(xpath); |
| ResultSequence rs = evaluate(domDoc); |
| |
| |
| actual = buildResultString(rs); |
| |
| } catch (XPathParserException ex) { |
| actual = ex.code(); |
| } catch (StaticError ex) { |
| actual = ex.code(); |
| } catch (DynamicError ex) { |
| actual = ex.code(); |
| } |
| |
| assertEquals("XPath Result Error " + xqFile + ":", expectedResult, actual); |
| |
| |
| } |
| |
| //Evaluation of "instance of" expression for pattern "decimal instance of xs:int". |
| public void test_instanceof99() throws Exception { |
| String inputFile = "/TestSources/emptydoc.xml"; |
| String xqFile = "/Queries/XQuery/Expressions/exprSeqTypes/SeqExprInstanceOf/instanceof99.xq"; |
| String resultFile = "/ExpectedTestResults/Expressions/exprSeqTypes/SeqExprInstanceOf/instanceof99.txt"; |
| String expectedResult = getExpectedResult(resultFile); |
| URL fileURL = bundle.getEntry(inputFile); |
| loadDOMDocument(fileURL); |
| |
| // Get XML Schema Information for the Document |
| XSModel schema = getGrammar(); |
| |
| setupDynamicContext(schema); |
| |
| String xpath = extractXPathExpression(xqFile, inputFile); |
| String actual = null; |
| try { |
| compileXPath(xpath); |
| ResultSequence rs = evaluate(domDoc); |
| |
| |
| actual = buildResultString(rs); |
| |
| } catch (XPathParserException ex) { |
| actual = ex.code(); |
| } catch (StaticError ex) { |
| actual = ex.code(); |
| } catch (DynamicError ex) { |
| actual = ex.code(); |
| } |
| |
| assertEquals("XPath Result Error " + xqFile + ":", expectedResult, actual); |
| |
| |
| } |
| |
| //Evaluation of "instance of" expression for pattern "integer instance of xs:dateTime". |
| public void test_instanceof100() throws Exception { |
| String inputFile = "/TestSources/emptydoc.xml"; |
| String xqFile = "/Queries/XQuery/Expressions/exprSeqTypes/SeqExprInstanceOf/instanceof100.xq"; |
| String resultFile = "/ExpectedTestResults/Expressions/exprSeqTypes/SeqExprInstanceOf/instanceof100.txt"; |
| String expectedResult = getExpectedResult(resultFile); |
| URL fileURL = bundle.getEntry(inputFile); |
| loadDOMDocument(fileURL); |
| |
| // Get XML Schema Information for the Document |
| XSModel schema = getGrammar(); |
| |
| setupDynamicContext(schema); |
| |
| String xpath = extractXPathExpression(xqFile, inputFile); |
| String actual = null; |
| try { |
| compileXPath(xpath); |
| ResultSequence rs = evaluate(domDoc); |
| |
| |
| actual = buildResultString(rs); |
| |
| } catch (XPathParserException ex) { |
| actual = ex.code(); |
| } catch (StaticError ex) { |
| actual = ex.code(); |
| } catch (DynamicError ex) { |
| actual = ex.code(); |
| } |
| |
| assertEquals("XPath Result Error " + xqFile + ":", expectedResult, actual); |
| |
| |
| } |
| |
| //Evaluation of "instance of" expression for pattern "integer instance of xs:time". |
| public void test_instanceof101() throws Exception { |
| String inputFile = "/TestSources/emptydoc.xml"; |
| String xqFile = "/Queries/XQuery/Expressions/exprSeqTypes/SeqExprInstanceOf/instanceof101.xq"; |
| String resultFile = "/ExpectedTestResults/Expressions/exprSeqTypes/SeqExprInstanceOf/instanceof101.txt"; |
| String expectedResult = getExpectedResult(resultFile); |
| URL fileURL = bundle.getEntry(inputFile); |
| loadDOMDocument(fileURL); |
| |
| // Get XML Schema Information for the Document |
| XSModel schema = getGrammar(); |
| |
| setupDynamicContext(schema); |
| |
| String xpath = extractXPathExpression(xqFile, inputFile); |
| String actual = null; |
| try { |
| compileXPath(xpath); |
| ResultSequence rs = evaluate(domDoc); |
| |
| |
| actual = buildResultString(rs); |
| |
| } catch (XPathParserException ex) { |
| actual = ex.code(); |
| } catch (StaticError ex) { |
| actual = ex.code(); |
| } catch (DynamicError ex) { |
| actual = ex.code(); |
| } |
| |
| assertEquals("XPath Result Error " + xqFile + ":", expectedResult, actual); |
| |
| |
| } |
| |
| //Evaluation of "instance of" expression for pattern "integer instance of xs:date". |
| public void test_instanceof102() throws Exception { |
| String inputFile = "/TestSources/emptydoc.xml"; |
| String xqFile = "/Queries/XQuery/Expressions/exprSeqTypes/SeqExprInstanceOf/instanceof102.xq"; |
| String resultFile = "/ExpectedTestResults/Expressions/exprSeqTypes/SeqExprInstanceOf/instanceof102.txt"; |
| String expectedResult = getExpectedResult(resultFile); |
| URL fileURL = bundle.getEntry(inputFile); |
| loadDOMDocument(fileURL); |
| |
| // Get XML Schema Information for the Document |
| XSModel schema = getGrammar(); |
| |
| setupDynamicContext(schema); |
| |
| String xpath = extractXPathExpression(xqFile, inputFile); |
| String actual = null; |
| try { |
| compileXPath(xpath); |
| ResultSequence rs = evaluate(domDoc); |
| |
| |
| actual = buildResultString(rs); |
| |
| } catch (XPathParserException ex) { |
| actual = ex.code(); |
| } catch (StaticError ex) { |
| actual = ex.code(); |
| } catch (DynamicError ex) { |
| actual = ex.code(); |
| } |
| |
| assertEquals("XPath Result Error " + xqFile + ":", expectedResult, actual); |
| |
| |
| } |
| |
| //Evaluation of "instance of" expression for pattern "integer instance of xs:boolean". |
| public void test_instanceof103() throws Exception { |
| String inputFile = "/TestSources/emptydoc.xml"; |
| String xqFile = "/Queries/XQuery/Expressions/exprSeqTypes/SeqExprInstanceOf/instanceof103.xq"; |
| String resultFile = "/ExpectedTestResults/Expressions/exprSeqTypes/SeqExprInstanceOf/instanceof103.txt"; |
| String expectedResult = getExpectedResult(resultFile); |
| URL fileURL = bundle.getEntry(inputFile); |
| loadDOMDocument(fileURL); |
| |
| // Get XML Schema Information for the Document |
| XSModel schema = getGrammar(); |
| |
| setupDynamicContext(schema); |
| |
| String xpath = extractXPathExpression(xqFile, inputFile); |
| String actual = null; |
| try { |
| compileXPath(xpath); |
| ResultSequence rs = evaluate(domDoc); |
| |
| |
| actual = buildResultString(rs); |
| |
| } catch (XPathParserException ex) { |
| actual = ex.code(); |
| } catch (StaticError ex) { |
| actual = ex.code(); |
| } catch (DynamicError ex) { |
| actual = ex.code(); |
| } |
| |
| assertEquals("XPath Result Error " + xqFile + ":", expectedResult, actual); |
| |
| |
| } |
| |
| //Evaluation of "instance of" expression for pattern "integer instance of xs:float". |
| public void test_instanceof104() throws Exception { |
| String inputFile = "/TestSources/emptydoc.xml"; |
| String xqFile = "/Queries/XQuery/Expressions/exprSeqTypes/SeqExprInstanceOf/instanceof104.xq"; |
| String resultFile = "/ExpectedTestResults/Expressions/exprSeqTypes/SeqExprInstanceOf/instanceof104.txt"; |
| String expectedResult = getExpectedResult(resultFile); |
| URL fileURL = bundle.getEntry(inputFile); |
| loadDOMDocument(fileURL); |
| |
| // Get XML Schema Information for the Document |
| XSModel schema = getGrammar(); |
| |
| setupDynamicContext(schema); |
| |
| String xpath = extractXPathExpression(xqFile, inputFile); |
| String actual = null; |
| try { |
| compileXPath(xpath); |
| ResultSequence rs = evaluate(domDoc); |
| |
| |
| actual = buildResultString(rs); |
| |
| } catch (XPathParserException ex) { |
| actual = ex.code(); |
| } catch (StaticError ex) { |
| actual = ex.code(); |
| } catch (DynamicError ex) { |
| actual = ex.code(); |
| } |
| |
| assertEquals("XPath Result Error " + xqFile + ":", expectedResult, actual); |
| |
| |
| } |
| |
| //Evaluation of "instance of" expression for pattern "integer instance of xs:double". |
| public void test_instanceof105() throws Exception { |
| String inputFile = "/TestSources/emptydoc.xml"; |
| String xqFile = "/Queries/XQuery/Expressions/exprSeqTypes/SeqExprInstanceOf/instanceof105.xq"; |
| String resultFile = "/ExpectedTestResults/Expressions/exprSeqTypes/SeqExprInstanceOf/instanceof105.txt"; |
| String expectedResult = getExpectedResult(resultFile); |
| URL fileURL = bundle.getEntry(inputFile); |
| loadDOMDocument(fileURL); |
| |
| // Get XML Schema Information for the Document |
| XSModel schema = getGrammar(); |
| |
| setupDynamicContext(schema); |
| |
| String xpath = extractXPathExpression(xqFile, inputFile); |
| String actual = null; |
| try { |
| compileXPath(xpath); |
| ResultSequence rs = evaluate(domDoc); |
| |
| |
| actual = buildResultString(rs); |
| |
| } catch (XPathParserException ex) { |
| actual = ex.code(); |
| } catch (StaticError ex) { |
| actual = ex.code(); |
| } catch (DynamicError ex) { |
| actual = ex.code(); |
| } |
| |
| assertEquals("XPath Result Error " + xqFile + ":", expectedResult, actual); |
| |
| |
| } |
| |
| //Evaluation of "instance of" expression for pattern "integer instance of xs:anyURI". |
| public void test_instanceof106() throws Exception { |
| String inputFile = "/TestSources/emptydoc.xml"; |
| String xqFile = "/Queries/XQuery/Expressions/exprSeqTypes/SeqExprInstanceOf/instanceof106.xq"; |
| String resultFile = "/ExpectedTestResults/Expressions/exprSeqTypes/SeqExprInstanceOf/instanceof106.txt"; |
| String expectedResult = getExpectedResult(resultFile); |
| URL fileURL = bundle.getEntry(inputFile); |
| loadDOMDocument(fileURL); |
| |
| // Get XML Schema Information for the Document |
| XSModel schema = getGrammar(); |
| |
| setupDynamicContext(schema); |
| |
| String xpath = extractXPathExpression(xqFile, inputFile); |
| String actual = null; |
| try { |
| compileXPath(xpath); |
| ResultSequence rs = evaluate(domDoc); |
| |
| |
| actual = buildResultString(rs); |
| |
| } catch (XPathParserException ex) { |
| actual = ex.code(); |
| } catch (StaticError ex) { |
| actual = ex.code(); |
| } catch (DynamicError ex) { |
| actual = ex.code(); |
| } |
| |
| assertEquals("XPath Result Error " + xqFile + ":", expectedResult, actual); |
| |
| |
| } |
| |
| //Evaluation of "instance of" expression for pattern "integer instance of xs:string". |
| public void test_instanceof107() throws Exception { |
| String inputFile = "/TestSources/emptydoc.xml"; |
| String xqFile = "/Queries/XQuery/Expressions/exprSeqTypes/SeqExprInstanceOf/instanceof107.xq"; |
| String resultFile = "/ExpectedTestResults/Expressions/exprSeqTypes/SeqExprInstanceOf/instanceof107.txt"; |
| String expectedResult = getExpectedResult(resultFile); |
| URL fileURL = bundle.getEntry(inputFile); |
| loadDOMDocument(fileURL); |
| |
| // Get XML Schema Information for the Document |
| XSModel schema = getGrammar(); |
| |
| setupDynamicContext(schema); |
| |
| String xpath = extractXPathExpression(xqFile, inputFile); |
| String actual = null; |
| try { |
| compileXPath(xpath); |
| ResultSequence rs = evaluate(domDoc); |
| |
| |
| actual = buildResultString(rs); |
| |
| } catch (XPathParserException ex) { |
| actual = ex.code(); |
| } catch (StaticError ex) { |
| actual = ex.code(); |
| } catch (DynamicError ex) { |
| actual = ex.code(); |
| } |
| |
| assertEquals("XPath Result Error " + xqFile + ":", expectedResult, actual); |
| |
| |
| } |
| |
| //Evaluation of "instance of" expression for pattern "integer instance of xs:decimal". |
| public void test_instanceof108() throws Exception { |
| String inputFile = "/TestSources/emptydoc.xml"; |
| String xqFile = "/Queries/XQuery/Expressions/exprSeqTypes/SeqExprInstanceOf/instanceof108.xq"; |
| String resultFile = "/ExpectedTestResults/Expressions/exprSeqTypes/SeqExprInstanceOf/instanceof108.txt"; |
| String expectedResult = getExpectedResult(resultFile); |
| URL fileURL = bundle.getEntry(inputFile); |
| loadDOMDocument(fileURL); |
| |
| // Get XML Schema Information for the Document |
| XSModel schema = getGrammar(); |
| |
| setupDynamicContext(schema); |
| |
| String xpath = extractXPathExpression(xqFile, inputFile); |
| String actual = null; |
| try { |
| compileXPath(xpath); |
| ResultSequence rs = evaluate(domDoc); |
| |
| |
| actual = buildResultString(rs); |
| |
| } catch (XPathParserException ex) { |
| actual = ex.code(); |
| } catch (StaticError ex) { |
| actual = ex.code(); |
| } catch (DynamicError ex) { |
| actual = ex.code(); |
| } |
| |
| assertEquals("XPath Result Error " + xqFile + ":", expectedResult, actual); |
| |
| |
| } |
| |
| //Evaluation of "instance of" expression for pattern "integer instance of xs:integer". |
| public void test_instanceof109() throws Exception { |
| String inputFile = "/TestSources/emptydoc.xml"; |
| String xqFile = "/Queries/XQuery/Expressions/exprSeqTypes/SeqExprInstanceOf/instanceof109.xq"; |
| String resultFile = "/ExpectedTestResults/Expressions/exprSeqTypes/SeqExprInstanceOf/instanceof109.txt"; |
| String expectedResult = getExpectedResult(resultFile); |
| URL fileURL = bundle.getEntry(inputFile); |
| loadDOMDocument(fileURL); |
| |
| // Get XML Schema Information for the Document |
| XSModel schema = getGrammar(); |
| |
| setupDynamicContext(schema); |
| |
| String xpath = extractXPathExpression(xqFile, inputFile); |
| String actual = null; |
| try { |
| compileXPath(xpath); |
| ResultSequence rs = evaluate(domDoc); |
| |
| |
| actual = buildResultString(rs); |
| |
| } catch (XPathParserException ex) { |
| actual = ex.code(); |
| } catch (StaticError ex) { |
| actual = ex.code(); |
| } catch (DynamicError ex) { |
| actual = ex.code(); |
| } |
| |
| assertEquals("XPath Result Error " + xqFile + ":", expectedResult, actual); |
| |
| |
| } |
| |
| //Evaluation of "instance of" expression for pattern "integer instance of xs:int". |
| public void test_instanceof110() throws Exception { |
| String inputFile = "/TestSources/emptydoc.xml"; |
| String xqFile = "/Queries/XQuery/Expressions/exprSeqTypes/SeqExprInstanceOf/instanceof110.xq"; |
| String resultFile = "/ExpectedTestResults/Expressions/exprSeqTypes/SeqExprInstanceOf/instanceof110.txt"; |
| String expectedResult = getExpectedResult(resultFile); |
| URL fileURL = bundle.getEntry(inputFile); |
| loadDOMDocument(fileURL); |
| |
| // Get XML Schema Information for the Document |
| XSModel schema = getGrammar(); |
| |
| setupDynamicContext(schema); |
| |
| String xpath = extractXPathExpression(xqFile, inputFile); |
| String actual = null; |
| try { |
| compileXPath(xpath); |
| ResultSequence rs = evaluate(domDoc); |
| |
| |
| actual = buildResultString(rs); |
| |
| } catch (XPathParserException ex) { |
| actual = ex.code(); |
| } catch (StaticError ex) { |
| actual = ex.code(); |
| } catch (DynamicError ex) { |
| actual = ex.code(); |
| } |
| |
| assertEquals("XPath Result Error " + xqFile + ":", expectedResult, actual); |
| |
| |
| } |
| |
| // Variant of "instance of" expression |
| public void test_k_SeqExprInstanceOf1() throws Exception { |
| String inputFile = "/TestSources/emptydoc.xml"; |
| String xqFile = "/Queries/XQuery/Expressions/seqExprTypes/SeqExprInstanceOf/K-SeqExprInstanceOf-1.xq"; |
| String resultFile = "/ExpectedTestResults/Expressions/seqExprTypes/SeqExprInstanceOf/K-SeqExprInstanceOf-1.txt"; |
| String expectedResult = getExpectedResult(resultFile); |
| URL fileURL = bundle.getEntry(inputFile); |
| loadDOMDocument(fileURL); |
| |
| // Get XML Schema Information for the Document |
| XSModel schema = getGrammar(); |
| |
| setupDynamicContext(schema); |
| |
| String xpath = extractXPathExpression(xqFile, inputFile); |
| String actual = null; |
| try { |
| compileXPath(xpath); |
| ResultSequence rs = evaluate(domDoc); |
| |
| |
| actual = buildResultString(rs); |
| |
| } catch (XPathParserException ex) { |
| actual = ex.code(); |
| } catch (StaticError ex) { |
| actual = ex.code(); |
| } catch (DynamicError ex) { |
| actual = ex.code(); |
| } |
| |
| assertEquals("XPath Result Error " + xqFile + ":", expectedResult, actual); |
| |
| |
| } |
| |
| // Variant of "instance of" expression |
| public void test_k_SeqExprInstanceOf2() throws Exception { |
| String inputFile = "/TestSources/emptydoc.xml"; |
| String xqFile = "/Queries/XQuery/Expressions/seqExprTypes/SeqExprInstanceOf/K-SeqExprInstanceOf-2.xq"; |
| String resultFile = "/ExpectedTestResults/Expressions/seqExprTypes/SeqExprInstanceOf/K-SeqExprInstanceOf-2.txt"; |
| String expectedResult = getExpectedResult(resultFile); |
| URL fileURL = bundle.getEntry(inputFile); |
| loadDOMDocument(fileURL); |
| |
| // Get XML Schema Information for the Document |
| XSModel schema = getGrammar(); |
| |
| setupDynamicContext(schema); |
| |
| String xpath = extractXPathExpression(xqFile, inputFile); |
| xpath = "1 instance of item((:comment:))"; |
| String actual = null; |
| try { |
| compileXPath(xpath); |
| ResultSequence rs = evaluate(domDoc); |
| |
| |
| actual = buildResultString(rs); |
| |
| } catch (XPathParserException ex) { |
| actual = ex.code(); |
| } catch (StaticError ex) { |
| actual = ex.code(); |
| } catch (DynamicError ex) { |
| actual = ex.code(); |
| } |
| |
| assertEquals("XPath Result Error " + xqFile + ":", expectedResult, actual); |
| |
| |
| } |
| |
| // Variant of "instance of" expression |
| public void test_k_SeqExprInstanceOf3() throws Exception { |
| String inputFile = "/TestSources/emptydoc.xml"; |
| String xqFile = "/Queries/XQuery/Expressions/seqExprTypes/SeqExprInstanceOf/K-SeqExprInstanceOf-3.xq"; |
| String resultFile = "/ExpectedTestResults/Expressions/seqExprTypes/SeqExprInstanceOf/K-SeqExprInstanceOf-3.txt"; |
| String expectedResult = getExpectedResult(resultFile); |
| URL fileURL = bundle.getEntry(inputFile); |
| loadDOMDocument(fileURL); |
| |
| // Get XML Schema Information for the Document |
| XSModel schema = getGrammar(); |
| |
| setupDynamicContext(schema); |
| |
| String xpath = extractXPathExpression(xqFile, inputFile); |
| String actual = null; |
| try { |
| compileXPath(xpath); |
| ResultSequence rs = evaluate(domDoc); |
| |
| |
| actual = buildResultString(rs); |
| |
| } catch (XPathParserException ex) { |
| actual = ex.code(); |
| } catch (StaticError ex) { |
| actual = ex.code(); |
| } catch (DynamicError ex) { |
| actual = ex.code(); |
| } |
| |
| assertEquals("XPath Result Error " + xqFile + ":", expectedResult, actual); |
| |
| |
| } |
| |
| // Variant of "instance of" expression |
| public void test_k_SeqExprInstanceOf4() throws Exception { |
| String inputFile = "/TestSources/emptydoc.xml"; |
| String xqFile = "/Queries/XQuery/Expressions/seqExprTypes/SeqExprInstanceOf/K-SeqExprInstanceOf-4.xq"; |
| String resultFile = "/ExpectedTestResults/Expressions/seqExprTypes/SeqExprInstanceOf/K-SeqExprInstanceOf-4.txt"; |
| String expectedResult = getExpectedResult(resultFile); |
| URL fileURL = bundle.getEntry(inputFile); |
| loadDOMDocument(fileURL); |
| |
| // Get XML Schema Information for the Document |
| XSModel schema = getGrammar(); |
| |
| setupDynamicContext(schema); |
| |
| String xpath = extractXPathExpression(xqFile, inputFile); |
| String actual = null; |
| try { |
| compileXPath(xpath); |
| ResultSequence rs = evaluate(domDoc); |
| |
| |
| actual = buildResultString(rs); |
| |
| } catch (XPathParserException ex) { |
| actual = ex.code(); |
| } catch (StaticError ex) { |
| actual = ex.code(); |
| } catch (DynamicError ex) { |
| actual = ex.code(); |
| } |
| |
| assertEquals("XPath Result Error " + xqFile + ":", expectedResult, actual); |
| |
| |
| } |
| |
| // Variant of "instance of" expression |
| public void test_k_SeqExprInstanceOf5() throws Exception { |
| String inputFile = "/TestSources/emptydoc.xml"; |
| String xqFile = "/Queries/XQuery/Expressions/seqExprTypes/SeqExprInstanceOf/K-SeqExprInstanceOf-5.xq"; |
| String resultFile = "/ExpectedTestResults/Expressions/seqExprTypes/SeqExprInstanceOf/K-SeqExprInstanceOf-5.txt"; |
| String expectedResult = getExpectedResult(resultFile); |
| URL fileURL = bundle.getEntry(inputFile); |
| loadDOMDocument(fileURL); |
| |
| // Get XML Schema Information for the Document |
| XSModel schema = getGrammar(); |
| |
| setupDynamicContext(schema); |
| |
| String xpath = extractXPathExpression(xqFile, inputFile); |
| String actual = null; |
| try { |
| compileXPath(xpath); |
| ResultSequence rs = evaluate(domDoc); |
| |
| |
| actual = buildResultString(rs); |
| |
| } catch (XPathParserException ex) { |
| actual = ex.code(); |
| } catch (StaticError ex) { |
| actual = ex.code(); |
| } catch (DynamicError ex) { |
| actual = ex.code(); |
| } |
| |
| assertEquals("XPath Result Error " + xqFile + ":", expectedResult, actual); |
| |
| |
| } |
| |
| // Variant of "instance of" expression |
| public void test_k_SeqExprInstanceOf6() throws Exception { |
| String inputFile = "/TestSources/emptydoc.xml"; |
| String xqFile = "/Queries/XQuery/Expressions/seqExprTypes/SeqExprInstanceOf/K-SeqExprInstanceOf-6.xq"; |
| String resultFile = "/ExpectedTestResults/Expressions/seqExprTypes/SeqExprInstanceOf/K-SeqExprInstanceOf-6.txt"; |
| String expectedResult = getExpectedResult(resultFile); |
| URL fileURL = bundle.getEntry(inputFile); |
| loadDOMDocument(fileURL); |
| |
| // Get XML Schema Information for the Document |
| XSModel schema = getGrammar(); |
| |
| setupDynamicContext(schema); |
| |
| String xpath = extractXPathExpression(xqFile, inputFile); |
| String actual = null; |
| try { |
| compileXPath(xpath); |
| ResultSequence rs = evaluate(domDoc); |
| |
| |
| actual = buildResultString(rs); |
| |
| } catch (XPathParserException ex) { |
| actual = ex.code(); |
| } catch (StaticError ex) { |
| actual = ex.code(); |
| } catch (DynamicError ex) { |
| actual = ex.code(); |
| } |
| |
| assertEquals("XPath Result Error " + xqFile + ":", expectedResult, actual); |
| |
| |
| } |
| |
| // Variant of "instance of" expression |
| public void test_k_SeqExprInstanceOf7() throws Exception { |
| String inputFile = "/TestSources/emptydoc.xml"; |
| String xqFile = "/Queries/XQuery/Expressions/seqExprTypes/SeqExprInstanceOf/K-SeqExprInstanceOf-7.xq"; |
| String resultFile = "/ExpectedTestResults/Expressions/seqExprTypes/SeqExprInstanceOf/K-SeqExprInstanceOf-7.txt"; |
| String expectedResult = getExpectedResult(resultFile); |
| URL fileURL = bundle.getEntry(inputFile); |
| loadDOMDocument(fileURL); |
| |
| // Get XML Schema Information for the Document |
| XSModel schema = getGrammar(); |
| |
| setupDynamicContext(schema); |
| |
| String xpath = extractXPathExpression(xqFile, inputFile); |
| String actual = null; |
| try { |
| compileXPath(xpath); |
| ResultSequence rs = evaluate(domDoc); |
| |
| |
| actual = buildResultString(rs); |
| |
| } catch (XPathParserException ex) { |
| actual = ex.code(); |
| } catch (StaticError ex) { |
| actual = ex.code(); |
| } catch (DynamicError ex) { |
| actual = ex.code(); |
| } |
| |
| assertEquals("XPath Result Error " + xqFile + ":", expectedResult, actual); |
| |
| |
| } |
| |
| // Variant of "instance of" expression |
| public void test_k_SeqExprInstanceOf8() throws Exception { |
| String inputFile = "/TestSources/emptydoc.xml"; |
| String xqFile = "/Queries/XQuery/Expressions/seqExprTypes/SeqExprInstanceOf/K-SeqExprInstanceOf-8.xq"; |
| String resultFile = "/ExpectedTestResults/Expressions/seqExprTypes/SeqExprInstanceOf/K-SeqExprInstanceOf-8.txt"; |
| String expectedResult = getExpectedResult(resultFile); |
| URL fileURL = bundle.getEntry(inputFile); |
| loadDOMDocument(fileURL); |
| |
| // Get XML Schema Information for the Document |
| XSModel schema = getGrammar(); |
| |
| setupDynamicContext(schema); |
| |
| String xpath = extractXPathExpression(xqFile, inputFile); |
| String actual = null; |
| try { |
| compileXPath(xpath); |
| ResultSequence rs = evaluate(domDoc); |
| |
| |
| actual = buildResultString(rs); |
| |
| } catch (XPathParserException ex) { |
| actual = ex.code(); |
| } catch (StaticError ex) { |
| actual = ex.code(); |
| } catch (DynamicError ex) { |
| actual = ex.code(); |
| } |
| |
| assertEquals("XPath Result Error " + xqFile + ":", expectedResult, actual); |
| |
| |
| } |
| |
| // Variant of "instance of" expression |
| public void test_k_SeqExprInstanceOf9() throws Exception { |
| String inputFile = "/TestSources/emptydoc.xml"; |
| String xqFile = "/Queries/XQuery/Expressions/seqExprTypes/SeqExprInstanceOf/K-SeqExprInstanceOf-9.xq"; |
| String resultFile = "/ExpectedTestResults/Expressions/seqExprTypes/SeqExprInstanceOf/K-SeqExprInstanceOf-9.txt"; |
| String expectedResult = getExpectedResult(resultFile); |
| URL fileURL = bundle.getEntry(inputFile); |
| loadDOMDocument(fileURL); |
| |
| // Get XML Schema Information for the Document |
| XSModel schema = getGrammar(); |
| |
| setupDynamicContext(schema); |
| |
| String xpath = extractXPathExpression(xqFile, inputFile); |
| String actual = null; |
| try { |
| compileXPath(xpath); |
| ResultSequence rs = evaluate(domDoc); |
| |
| |
| actual = buildResultString(rs); |
| |
| } catch (XPathParserException ex) { |
| actual = ex.code(); |
| } catch (StaticError ex) { |
| actual = ex.code(); |
| } catch (DynamicError ex) { |
| actual = ex.code(); |
| } |
| |
| assertEquals("XPath Result Error " + xqFile + ":", expectedResult, actual); |
| |
| |
| } |
| |
| // Variant of "instance of" expression |
| public void test_k_SeqExprInstanceOf10() throws Exception { |
| String inputFile = "/TestSources/emptydoc.xml"; |
| String xqFile = "/Queries/XQuery/Expressions/seqExprTypes/SeqExprInstanceOf/K-SeqExprInstanceOf-10.xq"; |
| String resultFile = "/ExpectedTestResults/Expressions/seqExprTypes/SeqExprInstanceOf/K-SeqExprInstanceOf-10.txt"; |
| String expectedResult = getExpectedResult(resultFile); |
| URL fileURL = bundle.getEntry(inputFile); |
| loadDOMDocument(fileURL); |
| |
| // Get XML Schema Information for the Document |
| XSModel schema = getGrammar(); |
| |
| setupDynamicContext(schema); |
| |
| String xpath = extractXPathExpression(xqFile, inputFile); |
| String actual = null; |
| try { |
| compileXPath(xpath); |
| ResultSequence rs = evaluate(domDoc); |
| |
| |
| actual = buildResultString(rs); |
| |
| } catch (XPathParserException ex) { |
| actual = ex.code(); |
| } catch (StaticError ex) { |
| actual = ex.code(); |
| } catch (DynamicError ex) { |
| actual = ex.code(); |
| } |
| |
| assertEquals("XPath Result Error " + xqFile + ":", expectedResult, actual); |
| |
| |
| } |
| |
| // Variant of "instance of" expression |
| public void test_k_SeqExprInstanceOf11() throws Exception { |
| String inputFile = "/TestSources/emptydoc.xml"; |
| String xqFile = "/Queries/XQuery/Expressions/seqExprTypes/SeqExprInstanceOf/K-SeqExprInstanceOf-11.xq"; |
| String resultFile = "/ExpectedTestResults/Expressions/seqExprTypes/SeqExprInstanceOf/K-SeqExprInstanceOf-11.txt"; |
| String expectedResult = getExpectedResult(resultFile); |
| URL fileURL = bundle.getEntry(inputFile); |
| loadDOMDocument(fileURL); |
| |
| // Get XML Schema Information for the Document |
| XSModel schema = getGrammar(); |
| |
| setupDynamicContext(schema); |
| |
| String xpath = extractXPathExpression(xqFile, inputFile); |
| String actual = null; |
| try { |
| compileXPath(xpath); |
| ResultSequence rs = evaluate(domDoc); |
| |
| |
| actual = buildResultString(rs); |
| |
| } catch (XPathParserException ex) { |
| actual = ex.code(); |
| } catch (StaticError ex) { |
| actual = ex.code(); |
| } catch (DynamicError ex) { |
| actual = ex.code(); |
| } |
| |
| assertEquals("XPath Result Error " + xqFile + ":", expectedResult, actual); |
| |
| |
| } |
| |
| // Variant of "instance of" expression |
| public void test_k_SeqExprInstanceOf12() throws Exception { |
| String inputFile = "/TestSources/emptydoc.xml"; |
| String xqFile = "/Queries/XQuery/Expressions/seqExprTypes/SeqExprInstanceOf/K-SeqExprInstanceOf-12.xq"; |
| String resultFile = "/ExpectedTestResults/Expressions/seqExprTypes/SeqExprInstanceOf/K-SeqExprInstanceOf-12.txt"; |
| String expectedResult = getExpectedResult(resultFile); |
| URL fileURL = bundle.getEntry(inputFile); |
| loadDOMDocument(fileURL); |
| |
| // Get XML Schema Information for the Document |
| XSModel schema = getGrammar(); |
| |
| setupDynamicContext(schema); |
| |
| String xpath = extractXPathExpression(xqFile, inputFile); |
| String actual = null; |
| try { |
| compileXPath(xpath); |
| ResultSequence rs = evaluate(domDoc); |
| |
| |
| actual = buildResultString(rs); |
| |
| } catch (XPathParserException ex) { |
| actual = ex.code(); |
| } catch (StaticError ex) { |
| actual = ex.code(); |
| } catch (DynamicError ex) { |
| actual = ex.code(); |
| } |
| |
| assertEquals("XPath Result Error " + xqFile + ":", expectedResult, actual); |
| |
| |
| } |
| |
| // Variant of "instance of" expression |
| public void test_k_SeqExprInstanceOf13() throws Exception { |
| String inputFile = "/TestSources/emptydoc.xml"; |
| String xqFile = "/Queries/XQuery/Expressions/seqExprTypes/SeqExprInstanceOf/K-SeqExprInstanceOf-13.xq"; |
| String resultFile = "/ExpectedTestResults/Expressions/seqExprTypes/SeqExprInstanceOf/K-SeqExprInstanceOf-13.txt"; |
| String expectedResult = getExpectedResult(resultFile); |
| URL fileURL = bundle.getEntry(inputFile); |
| loadDOMDocument(fileURL); |
| |
| // Get XML Schema Information for the Document |
| XSModel schema = getGrammar(); |
| |
| setupDynamicContext(schema); |
| |
| String xpath = extractXPathExpression(xqFile, inputFile); |
| String actual = null; |
| try { |
| compileXPath(xpath); |
| ResultSequence rs = evaluate(domDoc); |
| |
| |
| actual = buildResultString(rs); |
| |
| } catch (XPathParserException ex) { |
| actual = ex.code(); |
| } catch (StaticError ex) { |
| actual = ex.code(); |
| } catch (DynamicError ex) { |
| actual = ex.code(); |
| } |
| |
| assertEquals("XPath Result Error " + xqFile + ":", expectedResult, actual); |
| |
| |
| } |
| |
| // Variant of "instance of" expression |
| public void test_k_SeqExprInstanceOf14() throws Exception { |
| String inputFile = "/TestSources/emptydoc.xml"; |
| String xqFile = "/Queries/XQuery/Expressions/seqExprTypes/SeqExprInstanceOf/K-SeqExprInstanceOf-14.xq"; |
| String resultFile = "/ExpectedTestResults/Expressions/seqExprTypes/SeqExprInstanceOf/K-SeqExprInstanceOf-14.txt"; |
| String expectedResult = getExpectedResult(resultFile); |
| URL fileURL = bundle.getEntry(inputFile); |
| loadDOMDocument(fileURL); |
| |
| // Get XML Schema Information for the Document |
| XSModel schema = getGrammar(); |
| |
| setupDynamicContext(schema); |
| |
| String xpath = extractXPathExpression(xqFile, inputFile); |
| String actual = null; |
| try { |
| compileXPath(xpath); |
| ResultSequence rs = evaluate(domDoc); |
| |
| |
| actual = buildResultString(rs); |
| |
| } catch (XPathParserException ex) { |
| actual = ex.code(); |
| } catch (StaticError ex) { |
| actual = ex.code(); |
| } catch (DynamicError ex) { |
| actual = ex.code(); |
| } |
| |
| assertEquals("XPath Result Error " + xqFile + ":", expectedResult, actual); |
| |
| |
| } |
| |
| // Variant of "instance of" expression |
| public void test_k_SeqExprInstanceOf15() throws Exception { |
| String inputFile = "/TestSources/emptydoc.xml"; |
| String xqFile = "/Queries/XQuery/Expressions/seqExprTypes/SeqExprInstanceOf/K-SeqExprInstanceOf-15.xq"; |
| String resultFile = "/ExpectedTestResults/Expressions/seqExprTypes/SeqExprInstanceOf/K-SeqExprInstanceOf-15.txt"; |
| String expectedResult = getExpectedResult(resultFile); |
| URL fileURL = bundle.getEntry(inputFile); |
| loadDOMDocument(fileURL); |
| |
| // Get XML Schema Information for the Document |
| XSModel schema = getGrammar(); |
| |
| setupDynamicContext(schema); |
| |
| String xpath = extractXPathExpression(xqFile, inputFile); |
| String actual = null; |
| try { |
| compileXPath(xpath); |
| ResultSequence rs = evaluate(domDoc); |
| |
| |
| actual = buildResultString(rs); |
| |
| } catch (XPathParserException ex) { |
| actual = ex.code(); |
| } catch (StaticError ex) { |
| actual = ex.code(); |
| } catch (DynamicError ex) { |
| actual = ex.code(); |
| } |
| |
| assertEquals("XPath Result Error " + xqFile + ":", expectedResult, actual); |
| |
| |
| } |
| |
| // Variant of "instance of" expression |
| public void test_k_SeqExprInstanceOf16() throws Exception { |
| String inputFile = "/TestSources/emptydoc.xml"; |
| String xqFile = "/Queries/XQuery/Expressions/seqExprTypes/SeqExprInstanceOf/K-SeqExprInstanceOf-16.xq"; |
| String resultFile = "/ExpectedTestResults/Expressions/seqExprTypes/SeqExprInstanceOf/K-SeqExprInstanceOf-16.txt"; |
| String expectedResult = getExpectedResult(resultFile); |
| URL fileURL = bundle.getEntry(inputFile); |
| loadDOMDocument(fileURL); |
| |
| // Get XML Schema Information for the Document |
| XSModel schema = getGrammar(); |
| |
| setupDynamicContext(schema); |
| |
| String xpath = extractXPathExpression(xqFile, inputFile); |
| String actual = null; |
| try { |
| compileXPath(xpath); |
| ResultSequence rs = evaluate(domDoc); |
| |
| |
| actual = buildResultString(rs); |
| |
| } catch (XPathParserException ex) { |
| actual = ex.code(); |
| } catch (StaticError ex) { |
| actual = ex.code(); |
| } catch (DynamicError ex) { |
| actual = ex.code(); |
| } |
| |
| assertEquals("XPath Result Error " + xqFile + ":", expectedResult, actual); |
| |
| |
| } |
| |
| // Variant of "instance of" expression |
| public void test_k_SeqExprInstanceOf17() throws Exception { |
| String inputFile = "/TestSources/emptydoc.xml"; |
| String xqFile = "/Queries/XQuery/Expressions/seqExprTypes/SeqExprInstanceOf/K-SeqExprInstanceOf-17.xq"; |
| String resultFile = "/ExpectedTestResults/Expressions/seqExprTypes/SeqExprInstanceOf/K-SeqExprInstanceOf-17.txt"; |
| String expectedResult = getExpectedResult(resultFile); |
| URL fileURL = bundle.getEntry(inputFile); |
| loadDOMDocument(fileURL); |
| |
| // Get XML Schema Information for the Document |
| XSModel schema = getGrammar(); |
| |
| setupDynamicContext(schema); |
| |
| String xpath = extractXPathExpression(xqFile, inputFile); |
| String actual = null; |
| try { |
| compileXPath(xpath); |
| ResultSequence rs = evaluate(domDoc); |
| |
| |
| actual = buildResultString(rs); |
| |
| } catch (XPathParserException ex) { |
| actual = ex.code(); |
| } catch (StaticError ex) { |
| actual = ex.code(); |
| } catch (DynamicError ex) { |
| actual = ex.code(); |
| } |
| |
| assertEquals("XPath Result Error " + xqFile + ":", expectedResult, actual); |
| |
| |
| } |
| |
| // Variant of "instance of" expression |
| public void test_k_SeqExprInstanceOf18() throws Exception { |
| String inputFile = "/TestSources/emptydoc.xml"; |
| String xqFile = "/Queries/XQuery/Expressions/seqExprTypes/SeqExprInstanceOf/K-SeqExprInstanceOf-18.xq"; |
| String resultFile = "/ExpectedTestResults/Expressions/seqExprTypes/SeqExprInstanceOf/K-SeqExprInstanceOf-18.txt"; |
| String expectedResult = getExpectedResult(resultFile); |
| URL fileURL = bundle.getEntry(inputFile); |
| loadDOMDocument(fileURL); |
| |
| // Get XML Schema Information for the Document |
| XSModel schema = getGrammar(); |
| |
| setupDynamicContext(schema); |
| |
| String xpath = extractXPathExpression(xqFile, inputFile); |
| String actual = null; |
| try { |
| compileXPath(xpath); |
| ResultSequence rs = evaluate(domDoc); |
| |
| |
| actual = buildResultString(rs); |
| |
| } catch (XPathParserException ex) { |
| actual = ex.code(); |
| } catch (StaticError ex) { |
| actual = ex.code(); |
| } catch (DynamicError ex) { |
| actual = ex.code(); |
| } |
| |
| assertEquals("XPath Result Error " + xqFile + ":", expectedResult, actual); |
| |
| |
| } |
| |
| // Variant of "instance of" expression |
| public void test_k_SeqExprInstanceOf19() throws Exception { |
| String inputFile = "/TestSources/emptydoc.xml"; |
| String xqFile = "/Queries/XQuery/Expressions/seqExprTypes/SeqExprInstanceOf/K-SeqExprInstanceOf-19.xq"; |
| String resultFile = "/ExpectedTestResults/Expressions/seqExprTypes/SeqExprInstanceOf/K-SeqExprInstanceOf-19.txt"; |
| String expectedResult = getExpectedResult(resultFile); |
| URL fileURL = bundle.getEntry(inputFile); |
| loadDOMDocument(fileURL); |
| |
| // Get XML Schema Information for the Document |
| XSModel schema = getGrammar(); |
| |
| setupDynamicContext(schema); |
| |
| String xpath = extractXPathExpression(xqFile, inputFile); |
| String actual = null; |
| try { |
| compileXPath(xpath); |
| ResultSequence rs = evaluate(domDoc); |
| |
| |
| actual = buildResultString(rs); |
| |
| } catch (XPathParserException ex) { |
| actual = ex.code(); |
| } catch (StaticError ex) { |
| actual = ex.code(); |
| } catch (DynamicError ex) { |
| actual = ex.code(); |
| } |
| |
| assertEquals("XPath Result Error " + xqFile + ":", expectedResult, actual); |
| |
| |
| } |
| |
| // Variant of "instance of" expression |
| public void test_k_SeqExprInstanceOf20() throws Exception { |
| String inputFile = "/TestSources/emptydoc.xml"; |
| String xqFile = "/Queries/XQuery/Expressions/seqExprTypes/SeqExprInstanceOf/K-SeqExprInstanceOf-20.xq"; |
| String resultFile = "/ExpectedTestResults/Expressions/seqExprTypes/SeqExprInstanceOf/K-SeqExprInstanceOf-20.txt"; |
| String expectedResult = getExpectedResult(resultFile); |
| URL fileURL = bundle.getEntry(inputFile); |
| loadDOMDocument(fileURL); |
| |
| // Get XML Schema Information for the Document |
| XSModel schema = getGrammar(); |
| |
| setupDynamicContext(schema); |
| |
| String xpath = extractXPathExpression(xqFile, inputFile); |
| String actual = null; |
| try { |
| compileXPath(xpath); |
| ResultSequence rs = evaluate(domDoc); |
| |
| |
| actual = buildResultString(rs); |
| |
| } catch (XPathParserException ex) { |
| actual = ex.code(); |
| } catch (StaticError ex) { |
| actual = ex.code(); |
| } catch (DynamicError ex) { |
| actual = ex.code(); |
| } |
| |
| assertEquals("XPath Result Error " + xqFile + ":", expectedResult, actual); |
| |
| |
| } |
| |
| // Variant of "instance of" expression |
| public void test_k_SeqExprInstanceOf21() throws Exception { |
| String inputFile = "/TestSources/emptydoc.xml"; |
| String xqFile = "/Queries/XQuery/Expressions/seqExprTypes/SeqExprInstanceOf/K-SeqExprInstanceOf-21.xq"; |
| String resultFile = "/ExpectedTestResults/Expressions/seqExprTypes/SeqExprInstanceOf/K-SeqExprInstanceOf-21.txt"; |
| String expectedResult = getExpectedResult(resultFile); |
| URL fileURL = bundle.getEntry(inputFile); |
| loadDOMDocument(fileURL); |
| |
| // Get XML Schema Information for the Document |
| XSModel schema = getGrammar(); |
| |
| setupDynamicContext(schema); |
| |
| String xpath = extractXPathExpression(xqFile, inputFile); |
| String actual = null; |
| try { |
| compileXPath(xpath); |
| ResultSequence rs = evaluate(domDoc); |
| |
| |
| actual = buildResultString(rs); |
| |
| } catch (XPathParserException ex) { |
| actual = ex.code(); |
| } catch (StaticError ex) { |
| actual = ex.code(); |
| } catch (DynamicError ex) { |
| actual = ex.code(); |
| } |
| |
| assertEquals("XPath Result Error " + xqFile + ":", expectedResult, actual); |
| |
| |
| } |
| |
| // Variant of "instance of" expression |
| public void test_k_SeqExprInstanceOf22() throws Exception { |
| String inputFile = "/TestSources/emptydoc.xml"; |
| String xqFile = "/Queries/XQuery/Expressions/seqExprTypes/SeqExprInstanceOf/K-SeqExprInstanceOf-22.xq"; |
| String resultFile = "/ExpectedTestResults/Expressions/seqExprTypes/SeqExprInstanceOf/K-SeqExprInstanceOf-22.txt"; |
| String expectedResult = getExpectedResult(resultFile); |
| URL fileURL = bundle.getEntry(inputFile); |
| loadDOMDocument(fileURL); |
| |
| // Get XML Schema Information for the Document |
| XSModel schema = getGrammar(); |
| |
| setupDynamicContext(schema); |
| |
| String xpath = extractXPathExpression(xqFile, inputFile); |
| String actual = null; |
| try { |
| compileXPath(xpath); |
| ResultSequence rs = evaluate(domDoc); |
| |
| |
| actual = buildResultString(rs); |
| |
| } catch (XPathParserException ex) { |
| actual = ex.code(); |
| } catch (StaticError ex) { |
| actual = ex.code(); |
| } catch (DynamicError ex) { |
| actual = ex.code(); |
| } |
| |
| assertEquals("XPath Result Error " + xqFile + ":", expectedResult, actual); |
| |
| |
| } |
| |
| // Variant of "instance of" expression |
| public void test_k_SeqExprInstanceOf23() throws Exception { |
| String inputFile = "/TestSources/emptydoc.xml"; |
| String xqFile = "/Queries/XQuery/Expressions/seqExprTypes/SeqExprInstanceOf/K-SeqExprInstanceOf-23.xq"; |
| String resultFile = "/ExpectedTestResults/Expressions/seqExprTypes/SeqExprInstanceOf/K-SeqExprInstanceOf-23.txt"; |
| String expectedResult = getExpectedResult(resultFile); |
| URL fileURL = bundle.getEntry(inputFile); |
| loadDOMDocument(fileURL); |
| |
| // Get XML Schema Information for the Document |
| XSModel schema = getGrammar(); |
| |
| setupDynamicContext(schema); |
| |
| String xpath = extractXPathExpression(xqFile, inputFile); |
| String actual = null; |
| try { |
| compileXPath(xpath); |
| ResultSequence rs = evaluate(domDoc); |
| |
| |
| actual = buildResultString(rs); |
| |
| } catch (XPathParserException ex) { |
| actual = ex.code(); |
| } catch (StaticError ex) { |
| actual = ex.code(); |
| } catch (DynamicError ex) { |
| actual = ex.code(); |
| } |
| |
| assertEquals("XPath Result Error " + xqFile + ":", expectedResult, actual); |
| |
| |
| } |
| |
| // Variant of "instance of" expression |
| public void test_k_SeqExprInstanceOf24() throws Exception { |
| String inputFile = "/TestSources/emptydoc.xml"; |
| String xqFile = "/Queries/XQuery/Expressions/seqExprTypes/SeqExprInstanceOf/K-SeqExprInstanceOf-24.xq"; |
| String resultFile = "/ExpectedTestResults/Expressions/seqExprTypes/SeqExprInstanceOf/K-SeqExprInstanceOf-24.txt"; |
| String expectedResult = getExpectedResult(resultFile); |
| URL fileURL = bundle.getEntry(inputFile); |
| loadDOMDocument(fileURL); |
| |
| // Get XML Schema Information for the Document |
| XSModel schema = getGrammar(); |
| |
| setupDynamicContext(schema); |
| |
| String xpath = extractXPathExpression(xqFile, inputFile); |
| String actual = null; |
| try { |
| compileXPath(xpath); |
| ResultSequence rs = evaluate(domDoc); |
| |
| |
| actual = buildResultString(rs); |
| |
| } catch (XPathParserException ex) { |
| actual = ex.code(); |
| } catch (StaticError ex) { |
| actual = ex.code(); |
| } catch (DynamicError ex) { |
| actual = ex.code(); |
| } |
| |
| assertEquals("XPath Result Error " + xqFile + ":", expectedResult, actual); |
| |
| |
| } |
| |
| // Variant of "instance of" expression |
| public void test_k_SeqExprInstanceOf25() throws Exception { |
| String inputFile = "/TestSources/emptydoc.xml"; |
| String xqFile = "/Queries/XQuery/Expressions/seqExprTypes/SeqExprInstanceOf/K-SeqExprInstanceOf-25.xq"; |
| String resultFile = "/ExpectedTestResults/Expressions/seqExprTypes/SeqExprInstanceOf/K-SeqExprInstanceOf-25.txt"; |
| String expectedResult = getExpectedResult(resultFile); |
| URL fileURL = bundle.getEntry(inputFile); |
| loadDOMDocument(fileURL); |
| |
| // Get XML Schema Information for the Document |
| XSModel schema = getGrammar(); |
| |
| setupDynamicContext(schema); |
| |
| String xpath = extractXPathExpression(xqFile, inputFile); |
| String actual = null; |
| try { |
| compileXPath(xpath); |
| ResultSequence rs = evaluate(domDoc); |
| |
| |
| actual = buildResultString(rs); |
| |
| } catch (XPathParserException ex) { |
| actual = ex.code(); |
| } catch (StaticError ex) { |
| actual = ex.code(); |
| } catch (DynamicError ex) { |
| actual = ex.code(); |
| } |
| |
| assertEquals("XPath Result Error " + xqFile + ":", expectedResult, actual); |
| |
| |
| } |
| |
| // Variant of "instance of" expression |
| public void test_k_SeqExprInstanceOf26() throws Exception { |
| String inputFile = "/TestSources/emptydoc.xml"; |
| String xqFile = "/Queries/XQuery/Expressions/seqExprTypes/SeqExprInstanceOf/K-SeqExprInstanceOf-26.xq"; |
| String resultFile = "/ExpectedTestResults/Expressions/seqExprTypes/SeqExprInstanceOf/K-SeqExprInstanceOf-26.txt"; |
| String expectedResult = getExpectedResult(resultFile); |
| URL fileURL = bundle.getEntry(inputFile); |
| loadDOMDocument(fileURL); |
| |
| // Get XML Schema Information for the Document |
| XSModel schema = getGrammar(); |
| |
| setupDynamicContext(schema); |
| |
| String xpath = extractXPathExpression(xqFile, inputFile); |
| String actual = null; |
| try { |
| compileXPath(xpath); |
| ResultSequence rs = evaluate(domDoc); |
| |
| |
| actual = buildResultString(rs); |
| |
| } catch (XPathParserException ex) { |
| actual = ex.code(); |
| } catch (StaticError ex) { |
| actual = ex.code(); |
| } catch (DynamicError ex) { |
| actual = ex.code(); |
| } |
| |
| assertEquals("XPath Result Error " + xqFile + ":", expectedResult, actual); |
| |
| |
| } |
| |
| // Variant of "instance of" expression |
| public void test_k_SeqExprInstanceOf27() throws Exception { |
| String inputFile = "/TestSources/emptydoc.xml"; |
| String xqFile = "/Queries/XQuery/Expressions/seqExprTypes/SeqExprInstanceOf/K-SeqExprInstanceOf-27.xq"; |
| String resultFile = "/ExpectedTestResults/Expressions/seqExprTypes/SeqExprInstanceOf/K-SeqExprInstanceOf-27.txt"; |
| String expectedResult = getExpectedResult(resultFile); |
| URL fileURL = bundle.getEntry(inputFile); |
| loadDOMDocument(fileURL); |
| |
| // Get XML Schema Information for the Document |
| XSModel schema = getGrammar(); |
| |
| setupDynamicContext(schema); |
| |
| String xpath = extractXPathExpression(xqFile, inputFile); |
| String actual = null; |
| try { |
| compileXPath(xpath); |
| ResultSequence rs = evaluate(domDoc); |
| |
| |
| actual = buildResultString(rs); |
| |
| } catch (XPathParserException ex) { |
| actual = ex.code(); |
| } catch (StaticError ex) { |
| actual = ex.code(); |
| } catch (DynamicError ex) { |
| actual = ex.code(); |
| } |
| |
| assertEquals("XPath Result Error " + xqFile + ":", expectedResult, actual); |
| |
| |
| } |
| |
| // Variant of "instance of" expression |
| public void test_k_SeqExprInstanceOf28() throws Exception { |
| String inputFile = "/TestSources/emptydoc.xml"; |
| String xqFile = "/Queries/XQuery/Expressions/seqExprTypes/SeqExprInstanceOf/K-SeqExprInstanceOf-28.xq"; |
| String resultFile = "/ExpectedTestResults/Expressions/seqExprTypes/SeqExprInstanceOf/K-SeqExprInstanceOf-28.txt"; |
| String expectedResult = getExpectedResult(resultFile); |
| URL fileURL = bundle.getEntry(inputFile); |
| loadDOMDocument(fileURL); |
| |
| // Get XML Schema Information for the Document |
| XSModel schema = getGrammar(); |
| |
| setupDynamicContext(schema); |
| |
| String xpath = extractXPathExpression(xqFile, inputFile); |
| String actual = null; |
| try { |
| compileXPath(xpath); |
| ResultSequence rs = evaluate(domDoc); |
| |
| |
| actual = buildResultString(rs); |
| |
| } catch (XPathParserException ex) { |
| actual = ex.code(); |
| } catch (StaticError ex) { |
| actual = ex.code(); |
| } catch (DynamicError ex) { |
| actual = ex.code(); |
| } |
| |
| assertEquals("XPath Result Error " + xqFile + ":", expectedResult, actual); |
| |
| |
| } |
| |
| // Variant of "instance of" expression |
| public void test_k_SeqExprInstanceOf29() throws Exception { |
| String inputFile = "/TestSources/emptydoc.xml"; |
| String xqFile = "/Queries/XQuery/Expressions/seqExprTypes/SeqExprInstanceOf/K-SeqExprInstanceOf-29.xq"; |
| String resultFile = "/ExpectedTestResults/Expressions/seqExprTypes/SeqExprInstanceOf/K-SeqExprInstanceOf-29.txt"; |
| String expectedResult = getExpectedResult(resultFile); |
| URL fileURL = bundle.getEntry(inputFile); |
| loadDOMDocument(fileURL); |
| |
| // Get XML Schema Information for the Document |
| XSModel schema = getGrammar(); |
| |
| setupDynamicContext(schema); |
| |
| String xpath = extractXPathExpression(xqFile, inputFile); |
| String actual = null; |
| try { |
| compileXPath(xpath); |
| ResultSequence rs = evaluate(domDoc); |
| |
| |
| actual = buildResultString(rs); |
| |
| } catch (XPathParserException ex) { |
| actual = ex.code(); |
| } catch (StaticError ex) { |
| actual = ex.code(); |
| } catch (DynamicError ex) { |
| actual = ex.code(); |
| } |
| |
| assertEquals("XPath Result Error " + xqFile + ":", expectedResult, actual); |
| |
| |
| } |
| |
| // Variant of "instance of" expression |
| public void test_k_SeqExprInstanceOf30() throws Exception { |
| String inputFile = "/TestSources/emptydoc.xml"; |
| String xqFile = "/Queries/XQuery/Expressions/seqExprTypes/SeqExprInstanceOf/K-SeqExprInstanceOf-30.xq"; |
| String resultFile = "/ExpectedTestResults/Expressions/seqExprTypes/SeqExprInstanceOf/K-SeqExprInstanceOf-30.txt"; |
| String expectedResult = getExpectedResult(resultFile); |
| URL fileURL = bundle.getEntry(inputFile); |
| loadDOMDocument(fileURL); |
| |
| // Get XML Schema Information for the Document |
| XSModel schema = getGrammar(); |
| |
| setupDynamicContext(schema); |
| |
| String xpath = extractXPathExpression(xqFile, inputFile); |
| String actual = null; |
| try { |
| compileXPath(xpath); |
| ResultSequence rs = evaluate(domDoc); |
| |
| |
| actual = buildResultString(rs); |
| |
| } catch (XPathParserException ex) { |
| actual = ex.code(); |
| } catch (StaticError ex) { |
| actual = ex.code(); |
| } catch (DynamicError ex) { |
| actual = ex.code(); |
| } |
| |
| assertEquals("XPath Result Error " + xqFile + ":", expectedResult, actual); |
| |
| |
| } |
| |
| // Variant of "instance of" expression |
| public void test_k_SeqExprInstanceOf31() throws Exception { |
| String inputFile = "/TestSources/emptydoc.xml"; |
| String xqFile = "/Queries/XQuery/Expressions/seqExprTypes/SeqExprInstanceOf/K-SeqExprInstanceOf-31.xq"; |
| String resultFile = "/ExpectedTestResults/Expressions/seqExprTypes/SeqExprInstanceOf/K-SeqExprInstanceOf-31.txt"; |
| String expectedResult = getExpectedResult(resultFile); |
| URL fileURL = bundle.getEntry(inputFile); |
| loadDOMDocument(fileURL); |
| |
| // Get XML Schema Information for the Document |
| XSModel schema = getGrammar(); |
| |
| setupDynamicContext(schema); |
| |
| String xpath = extractXPathExpression(xqFile, inputFile); |
| String actual = null; |
| try { |
| compileXPath(xpath); |
| ResultSequence rs = evaluate(domDoc); |
| |
| |
| actual = buildResultString(rs); |
| |
| } catch (XPathParserException ex) { |
| actual = ex.code(); |
| } catch (StaticError ex) { |
| actual = ex.code(); |
| } catch (DynamicError ex) { |
| actual = ex.code(); |
| } |
| |
| assertEquals("XPath Result Error " + xqFile + ":", expectedResult, actual); |
| |
| |
| } |
| |
| // Variant of "instance of" expression |
| public void test_k_SeqExprInstanceOf32() throws Exception { |
| String inputFile = "/TestSources/emptydoc.xml"; |
| String xqFile = "/Queries/XQuery/Expressions/seqExprTypes/SeqExprInstanceOf/K-SeqExprInstanceOf-32.xq"; |
| String resultFile = "/ExpectedTestResults/Expressions/seqExprTypes/SeqExprInstanceOf/K-SeqExprInstanceOf-32.txt"; |
| String expectedResult = getExpectedResult(resultFile); |
| URL fileURL = bundle.getEntry(inputFile); |
| loadDOMDocument(fileURL); |
| |
| // Get XML Schema Information for the Document |
| XSModel schema = getGrammar(); |
| |
| setupDynamicContext(schema); |
| |
| String xpath = "not(1 instance of text((:comment:)))"; |
| String actual = null; |
| try { |
| compileXPath(xpath); |
| ResultSequence rs = evaluate(domDoc); |
| |
| |
| actual = buildResultString(rs); |
| |
| } catch (XPathParserException ex) { |
| actual = ex.code(); |
| } catch (StaticError ex) { |
| actual = ex.code(); |
| } catch (DynamicError ex) { |
| actual = ex.code(); |
| } |
| |
| assertEquals("XPath Result Error " + xqFile + ":", expectedResult, actual); |
| |
| |
| } |
| |
| // Variant of "instance of" expression |
| public void test_k_SeqExprInstanceOf33() throws Exception { |
| String inputFile = "/TestSources/emptydoc.xml"; |
| String xqFile = "/Queries/XQuery/Expressions/seqExprTypes/SeqExprInstanceOf/K-SeqExprInstanceOf-33.xq"; |
| String resultFile = "/ExpectedTestResults/Expressions/seqExprTypes/SeqExprInstanceOf/K-SeqExprInstanceOf-33.txt"; |
| String expectedResult = getExpectedResult(resultFile); |
| URL fileURL = bundle.getEntry(inputFile); |
| loadDOMDocument(fileURL); |
| |
| // Get XML Schema Information for the Document |
| XSModel schema = getGrammar(); |
| |
| setupDynamicContext(schema); |
| |
| String xpath = "not(1 instance of node((:comment:)))"; |
| String actual = null; |
| try { |
| compileXPath(xpath); |
| ResultSequence rs = evaluate(domDoc); |
| |
| |
| actual = buildResultString(rs); |
| |
| } catch (XPathParserException ex) { |
| actual = ex.code(); |
| } catch (StaticError ex) { |
| actual = ex.code(); |
| } catch (DynamicError ex) { |
| actual = ex.code(); |
| } |
| |
| assertEquals("XPath Result Error " + xqFile + ":", expectedResult, actual); |
| |
| |
| } |
| |
| // Variant of "instance of" expression |
| public void test_k_SeqExprInstanceOf34() throws Exception { |
| String inputFile = "/TestSources/emptydoc.xml"; |
| String xqFile = "/Queries/XQuery/Expressions/seqExprTypes/SeqExprInstanceOf/K-SeqExprInstanceOf-34.xq"; |
| String resultFile = "/ExpectedTestResults/Expressions/seqExprTypes/SeqExprInstanceOf/K-SeqExprInstanceOf-34.txt"; |
| String expectedResult = getExpectedResult(resultFile); |
| URL fileURL = bundle.getEntry(inputFile); |
| loadDOMDocument(fileURL); |
| |
| // Get XML Schema Information for the Document |
| XSModel schema = getGrammar(); |
| |
| setupDynamicContext(schema); |
| |
| String xpath = "not(1 instance of element((:comment:)))"; |
| String actual = null; |
| try { |
| compileXPath(xpath); |
| ResultSequence rs = evaluate(domDoc); |
| |
| |
| actual = buildResultString(rs); |
| |
| } catch (XPathParserException ex) { |
| actual = ex.code(); |
| } catch (StaticError ex) { |
| actual = ex.code(); |
| } catch (DynamicError ex) { |
| actual = ex.code(); |
| } |
| |
| assertEquals("XPath Result Error " + xqFile + ":", expectedResult, actual); |
| |
| |
| } |
| |
| // Variant of "instance of" expression |
| public void test_k_SeqExprInstanceOf35() throws Exception { |
| String inputFile = "/TestSources/emptydoc.xml"; |
| String xqFile = "/Queries/XQuery/Expressions/seqExprTypes/SeqExprInstanceOf/K-SeqExprInstanceOf-35.xq"; |
| String resultFile = "/ExpectedTestResults/Expressions/seqExprTypes/SeqExprInstanceOf/K-SeqExprInstanceOf-35.txt"; |
| String expectedResult = getExpectedResult(resultFile); |
| URL fileURL = bundle.getEntry(inputFile); |
| loadDOMDocument(fileURL); |
| |
| // Get XML Schema Information for the Document |
| XSModel schema = getGrammar(); |
| |
| setupDynamicContext(schema); |
| |
| String xpath = "not(1 instance of processing-instruction((:comment:)))"; |
| String actual = null; |
| try { |
| compileXPath(xpath); |
| ResultSequence rs = evaluate(domDoc); |
| |
| |
| actual = buildResultString(rs); |
| |
| } catch (XPathParserException ex) { |
| actual = ex.code(); |
| } catch (StaticError ex) { |
| actual = ex.code(); |
| } catch (DynamicError ex) { |
| actual = ex.code(); |
| } |
| |
| assertEquals("XPath Result Error " + xqFile + ":", expectedResult, actual); |
| |
| |
| } |
| |
| // Variant of "instance of" expression |
| public void test_k_SeqExprInstanceOf36() throws Exception { |
| String inputFile = "/TestSources/emptydoc.xml"; |
| String xqFile = "/Queries/XQuery/Expressions/seqExprTypes/SeqExprInstanceOf/K-SeqExprInstanceOf-36.xq"; |
| String resultFile = "/ExpectedTestResults/Expressions/seqExprTypes/SeqExprInstanceOf/K-SeqExprInstanceOf-36.txt"; |
| String expectedResult = getExpectedResult(resultFile); |
| URL fileURL = bundle.getEntry(inputFile); |
| loadDOMDocument(fileURL); |
| |
| // Get XML Schema Information for the Document |
| XSModel schema = getGrammar(); |
| |
| setupDynamicContext(schema); |
| |
| // XQuery is hardcoded here since the de-commentizer would catch this, too |
| String xpath = "not(1 instance of comment((:comment:)))"; |
| String actual = null; |
| try { |
| compileXPath(xpath); |
| ResultSequence rs = evaluate(domDoc); |
| |
| |
| actual = buildResultString(rs); |
| |
| } catch (XPathParserException ex) { |
| actual = ex.code(); |
| } catch (StaticError ex) { |
| actual = ex.code(); |
| } catch (DynamicError ex) { |
| actual = ex.code(); |
| } |
| |
| assertEquals("XPath Result Error " + xqFile + ":", expectedResult, actual); |
| |
| |
| } |
| |
| // Variant of "instance of" expression |
| public void test_k_SeqExprInstanceOf37() throws Exception { |
| String inputFile = "/TestSources/emptydoc.xml"; |
| String xqFile = "/Queries/XQuery/Expressions/seqExprTypes/SeqExprInstanceOf/K-SeqExprInstanceOf-37.xq"; |
| String resultFile = "/ExpectedTestResults/Expressions/seqExprTypes/SeqExprInstanceOf/K-SeqExprInstanceOf-37.txt"; |
| String expectedResult = getExpectedResult(resultFile); |
| URL fileURL = bundle.getEntry(inputFile); |
| loadDOMDocument(fileURL); |
| |
| // Get XML Schema Information for the Document |
| XSModel schema = getGrammar(); |
| |
| setupDynamicContext(schema); |
| |
| String xpath = extractXPathExpression(xqFile, inputFile); |
| String actual = null; |
| try { |
| compileXPath(xpath); |
| ResultSequence rs = evaluate(domDoc); |
| |
| |
| actual = buildResultString(rs); |
| |
| } catch (XPathParserException ex) { |
| actual = ex.code(); |
| } catch (StaticError ex) { |
| actual = ex.code(); |
| } catch (DynamicError ex) { |
| actual = ex.code(); |
| } |
| |
| assertEquals("XPath Result Error " + xqFile + ":", expectedResult, actual); |
| |
| |
| } |
| |
| // Variant of "instance of" expression |
| public void test_k_SeqExprInstanceOf38() throws Exception { |
| String inputFile = "/TestSources/emptydoc.xml"; |
| String xqFile = "/Queries/XQuery/Expressions/seqExprTypes/SeqExprInstanceOf/K-SeqExprInstanceOf-38.xq"; |
| String resultFile = "/ExpectedTestResults/Expressions/seqExprTypes/SeqExprInstanceOf/K-SeqExprInstanceOf-38.txt"; |
| String expectedResult = getExpectedResult(resultFile); |
| URL fileURL = bundle.getEntry(inputFile); |
| loadDOMDocument(fileURL); |
| |
| // Get XML Schema Information for the Document |
| XSModel schema = getGrammar(); |
| |
| setupDynamicContext(schema); |
| |
| String xpath = extractXPathExpression(xqFile, inputFile); |
| String actual = null; |
| try { |
| compileXPath(xpath); |
| ResultSequence rs = evaluate(domDoc); |
| |
| |
| actual = buildResultString(rs); |
| |
| } catch (XPathParserException ex) { |
| actual = ex.code(); |
| } catch (StaticError ex) { |
| actual = ex.code(); |
| } catch (DynamicError ex) { |
| actual = ex.code(); |
| } |
| |
| assertEquals("XPath Result Error " + xqFile + ":", expectedResult, actual); |
| |
| |
| } |
| |
| // Variant of "instance of" expression |
| public void test_k_SeqExprInstanceOf39() throws Exception { |
| String inputFile = "/TestSources/emptydoc.xml"; |
| String xqFile = "/Queries/XQuery/Expressions/seqExprTypes/SeqExprInstanceOf/K-SeqExprInstanceOf-39.xq"; |
| String resultFile = "/ExpectedTestResults/Expressions/seqExprTypes/SeqExprInstanceOf/K-SeqExprInstanceOf-39.txt"; |
| String expectedResult = getExpectedResult(resultFile); |
| URL fileURL = bundle.getEntry(inputFile); |
| loadDOMDocument(fileURL); |
| |
| // Get XML Schema Information for the Document |
| XSModel schema = getGrammar(); |
| |
| setupDynamicContext(schema); |
| |
| String xpath = extractXPathExpression(xqFile, inputFile); |
| String actual = null; |
| try { |
| compileXPath(xpath); |
| ResultSequence rs = evaluate(domDoc); |
| |
| |
| actual = buildResultString(rs); |
| |
| } catch (XPathParserException ex) { |
| actual = ex.code(); |
| } catch (StaticError ex) { |
| actual = ex.code(); |
| } catch (DynamicError ex) { |
| actual = ex.code(); |
| } |
| |
| assertEquals("XPath Result Error " + xqFile + ":", expectedResult, actual); |
| |
| |
| } |
| |
| // Variant of "instance of" expression |
| public void test_k_SeqExprInstanceOf40() throws Exception { |
| String inputFile = "/TestSources/emptydoc.xml"; |
| String xqFile = "/Queries/XQuery/Expressions/seqExprTypes/SeqExprInstanceOf/K-SeqExprInstanceOf-40.xq"; |
| String resultFile = "/ExpectedTestResults/Expressions/seqExprTypes/SeqExprInstanceOf/K-SeqExprInstanceOf-40.txt"; |
| String expectedResult = getExpectedResult(resultFile); |
| URL fileURL = bundle.getEntry(inputFile); |
| loadDOMDocument(fileURL); |
| |
| // Get XML Schema Information for the Document |
| XSModel schema = getGrammar(); |
| |
| setupDynamicContext(schema); |
| |
| String xpath = "() instance of empty-sequence((:comment:))"; |
| String actual = null; |
| try { |
| compileXPath(xpath); |
| ResultSequence rs = evaluate(domDoc); |
| |
| |
| actual = buildResultString(rs); |
| |
| } catch (XPathParserException ex) { |
| actual = ex.code(); |
| } catch (StaticError ex) { |
| actual = ex.code(); |
| } catch (DynamicError ex) { |
| actual = ex.code(); |
| } |
| |
| assertEquals("XPath Result Error " + xqFile + ":", expectedResult, actual); |
| |
| |
| } |
| |
| // Variant of "instance of" expression |
| public void test_k_SeqExprInstanceOf41() throws Exception { |
| String inputFile = "/TestSources/emptydoc.xml"; |
| String xqFile = "/Queries/XQuery/Expressions/seqExprTypes/SeqExprInstanceOf/K-SeqExprInstanceOf-41.xq"; |
| String resultFile = "/ExpectedTestResults/Expressions/seqExprTypes/SeqExprInstanceOf/K-SeqExprInstanceOf-41.txt"; |
| String expectedResult = getExpectedResult(resultFile); |
| URL fileURL = bundle.getEntry(inputFile); |
| loadDOMDocument(fileURL); |
| |
| // Get XML Schema Information for the Document |
| XSModel schema = getGrammar(); |
| |
| setupDynamicContext(schema); |
| |
| String xpath = extractXPathExpression(xqFile, inputFile); |
| String actual = null; |
| try { |
| compileXPath(xpath); |
| ResultSequence rs = evaluate(domDoc); |
| |
| |
| actual = buildResultString(rs); |
| |
| } catch (XPathParserException ex) { |
| actual = ex.code(); |
| } catch (StaticError ex) { |
| actual = ex.code(); |
| } catch (DynamicError ex) { |
| actual = ex.code(); |
| } |
| |
| assertEquals("XPath Result Error " + xqFile + ":", expectedResult, actual); |
| |
| |
| } |
| |
| |
| // Variant of "instance of" expression |
| public void test_k_SeqExprInstanceOf42() throws Exception { |
| String inputFile = "/TestSources/emptydoc.xml"; |
| String xqFile = "/Queries/XQuery/Expressions/seqExprTypes/SeqExprInstanceOf/K-SeqExprInstanceOf-42.xq"; |
| String resultFile = "/ExpectedTestResults/Expressions/seqExprTypes/SeqExprInstanceOf/K-SeqExprInstanceOf-42.txt"; |
| String expectedResult = getExpectedResult(resultFile); |
| URL fileURL = bundle.getEntry(inputFile); |
| loadDOMDocument(fileURL); |
| |
| // Get XML Schema Information for the Document |
| XSModel schema = getGrammar(); |
| |
| setupDynamicContext(schema); |
| |
| String xpath = extractXPathExpression(xqFile, inputFile); |
| String actual = null; |
| try { |
| compileXPath(xpath); |
| ResultSequence rs = evaluate(domDoc); |
| |
| |
| actual = buildResultString(rs); |
| |
| } catch (XPathParserException ex) { |
| actual = ex.code(); |
| } catch (StaticError ex) { |
| actual = ex.code(); |
| } catch (DynamicError ex) { |
| actual = ex.code(); |
| } |
| |
| assertEquals("XPath Result Error " + xqFile + ":", expectedResult, actual); |
| |
| |
| } |
| |
| // Variant of "instance of" expression |
| public void test_k_SeqExprInstanceOf43() throws Exception { |
| String inputFile = "/TestSources/emptydoc.xml"; |
| String xqFile = "/Queries/XQuery/Expressions/seqExprTypes/SeqExprInstanceOf/K-SeqExprInstanceOf-43.xq"; |
| String resultFile = "/ExpectedTestResults/Expressions/seqExprTypes/SeqExprInstanceOf/K-SeqExprInstanceOf-43.txt"; |
| String expectedResult = getExpectedResult(resultFile); |
| URL fileURL = bundle.getEntry(inputFile); |
| loadDOMDocument(fileURL); |
| |
| // Get XML Schema Information for the Document |
| XSModel schema = getGrammar(); |
| |
| setupDynamicContext(schema); |
| |
| String xpath = extractXPathExpression(xqFile, inputFile); |
| String actual = null; |
| try { |
| compileXPath(xpath); |
| ResultSequence rs = evaluate(domDoc); |
| |
| |
| actual = buildResultString(rs); |
| |
| } catch (XPathParserException ex) { |
| actual = ex.code(); |
| } catch (StaticError ex) { |
| actual = ex.code(); |
| } catch (DynamicError ex) { |
| actual = ex.code(); |
| } |
| |
| assertEquals("XPath Result Error " + xqFile + ":", expectedResult, actual); |
| |
| |
| } |
| |
| // Variant of "instance of" expression |
| public void test_k_SeqExprInstanceOf44() throws Exception { |
| String inputFile = "/TestSources/emptydoc.xml"; |
| String xqFile = "/Queries/XQuery/Expressions/seqExprTypes/SeqExprInstanceOf/K-SeqExprInstanceOf-44.xq"; |
| String resultFile = "/ExpectedTestResults/Expressions/seqExprTypes/SeqExprInstanceOf/K-SeqExprInstanceOf-44.txt"; |
| String expectedResult = getExpectedResult(resultFile); |
| URL fileURL = bundle.getEntry(inputFile); |
| loadDOMDocument(fileURL); |
| |
| // Get XML Schema Information for the Document |
| XSModel schema = getGrammar(); |
| |
| setupDynamicContext(schema); |
| |
| String xpath = extractXPathExpression(xqFile, inputFile); |
| String actual = null; |
| try { |
| compileXPath(xpath); |
| ResultSequence rs = evaluate(domDoc); |
| |
| |
| actual = buildResultString(rs); |
| |
| } catch (XPathParserException ex) { |
| actual = ex.code(); |
| } catch (StaticError ex) { |
| actual = ex.code(); |
| } catch (DynamicError ex) { |
| actual = ex.code(); |
| } |
| |
| assertEquals("XPath Result Error " + xqFile + ":", expectedResult, actual); |
| |
| |
| } |
| |
| // Variant of "instance of" expression |
| public void test_k_SeqExprInstanceOf45() throws Exception { |
| String inputFile = "/TestSources/emptydoc.xml"; |
| String xqFile = "/Queries/XQuery/Expressions/seqExprTypes/SeqExprInstanceOf/K-SeqExprInstanceOf-45.xq"; |
| String resultFile = "/ExpectedTestResults/Expressions/seqExprTypes/SeqExprInstanceOf/K-SeqExprInstanceOf-45.txt"; |
| String expectedResult = getExpectedResult(resultFile); |
| URL fileURL = bundle.getEntry(inputFile); |
| loadDOMDocument(fileURL); |
| |
| // Get XML Schema Information for the Document |
| XSModel schema = getGrammar(); |
| |
| setupDynamicContext(schema); |
| |
| String xpath = extractXPathExpression(xqFile, inputFile); |
| String actual = null; |
| try { |
| compileXPath(xpath); |
| ResultSequence rs = evaluate(domDoc); |
| |
| |
| actual = buildResultString(rs); |
| |
| } catch (XPathParserException ex) { |
| actual = ex.code(); |
| } catch (StaticError ex) { |
| actual = ex.code(); |
| } catch (DynamicError ex) { |
| actual = ex.code(); |
| } |
| |
| assertEquals("XPath Result Error " + xqFile + ":", expectedResult, actual); |
| |
| |
| } |
| |
| // Variant of "instance of" expression |
| public void test_k_SeqExprInstanceOf46() throws Exception { |
| String inputFile = "/TestSources/emptydoc.xml"; |
| String xqFile = "/Queries/XQuery/Expressions/seqExprTypes/SeqExprInstanceOf/K-SeqExprInstanceOf-46.xq"; |
| String resultFile = "/ExpectedTestResults/Expressions/seqExprTypes/SeqExprInstanceOf/K-SeqExprInstanceOf-46.txt"; |
| String expectedResult = getExpectedResult(resultFile); |
| URL fileURL = bundle.getEntry(inputFile); |
| loadDOMDocument(fileURL); |
| |
| // Get XML Schema Information for the Document |
| XSModel schema = getGrammar(); |
| |
| setupDynamicContext(schema); |
| |
| String xpath = extractXPathExpression(xqFile, inputFile); |
| String actual = null; |
| try { |
| compileXPath(xpath); |
| ResultSequence rs = evaluate(domDoc); |
| |
| |
| actual = buildResultString(rs); |
| |
| } catch (XPathParserException ex) { |
| actual = ex.code(); |
| } catch (StaticError ex) { |
| actual = ex.code(); |
| } catch (DynamicError ex) { |
| actual = ex.code(); |
| } |
| |
| assertEquals("XPath Result Error " + xqFile + ":", expectedResult, actual); |
| |
| |
| } |
| |
| // Variant of "instance of" expression |
| public void test_k_SeqExprInstanceOf47() throws Exception { |
| String inputFile = "/TestSources/emptydoc.xml"; |
| String xqFile = "/Queries/XQuery/Expressions/seqExprTypes/SeqExprInstanceOf/K-SeqExprInstanceOf-47.xq"; |
| String resultFile = "/ExpectedTestResults/Expressions/seqExprTypes/SeqExprInstanceOf/K-SeqExprInstanceOf-47.txt"; |
| String expectedResult = getExpectedResult(resultFile); |
| URL fileURL = bundle.getEntry(inputFile); |
| loadDOMDocument(fileURL); |
| |
| // Get XML Schema Information for the Document |
| XSModel schema = getGrammar(); |
| |
| setupDynamicContext(schema); |
| |
| String xpath = extractXPathExpression(xqFile, inputFile); |
| String actual = null; |
| try { |
| compileXPath(xpath); |
| ResultSequence rs = evaluate(domDoc); |
| |
| |
| actual = buildResultString(rs); |
| |
| } catch (XPathParserException ex) { |
| actual = ex.code(); |
| } catch (StaticError ex) { |
| actual = ex.code(); |
| } catch (DynamicError ex) { |
| actual = ex.code(); |
| } |
| |
| assertEquals("XPath Result Error " + xqFile + ":", expectedResult, actual); |
| |
| |
| } |
| |
| // Variant of "instance of" expression |
| public void test_k_SeqExprInstanceOf48() throws Exception { |
| String inputFile = "/TestSources/emptydoc.xml"; |
| String xqFile = "/Queries/XQuery/Expressions/seqExprTypes/SeqExprInstanceOf/K-SeqExprInstanceOf-48.xq"; |
| String resultFile = "/ExpectedTestResults/Expressions/seqExprTypes/SeqExprInstanceOf/K-SeqExprInstanceOf-48.txt"; |
| String expectedResult = getExpectedResult(resultFile); |
| URL fileURL = bundle.getEntry(inputFile); |
| loadDOMDocument(fileURL); |
| |
| // Get XML Schema Information for the Document |
| XSModel schema = getGrammar(); |
| |
| setupDynamicContext(schema); |
| |
| String xpath = extractXPathExpression(xqFile, inputFile); |
| String actual = null; |
| try { |
| compileXPath(xpath); |
| ResultSequence rs = evaluate(domDoc); |
| |
| |
| actual = buildResultString(rs); |
| |
| } catch (XPathParserException ex) { |
| actual = ex.code(); |
| } catch (StaticError ex) { |
| actual = ex.code(); |
| } catch (DynamicError ex) { |
| actual = ex.code(); |
| } |
| |
| assertEquals("XPath Result Error " + xqFile + ":", expectedResult, actual); |
| |
| |
| } |
| |
| // Variant of "instance of" expression |
| public void test_k_SeqExprInstanceOf49() throws Exception { |
| String inputFile = "/TestSources/emptydoc.xml"; |
| String xqFile = "/Queries/XQuery/Expressions/seqExprTypes/SeqExprInstanceOf/K-SeqExprInstanceOf-49.xq"; |
| String expectedResult = "XPST0081"; |
| URL fileURL = bundle.getEntry(inputFile); |
| loadDOMDocument(fileURL); |
| |
| // Get XML Schema Information for the Document |
| XSModel schema = getGrammar(); |
| |
| setupDynamicContext(schema); |
| |
| String xpath = extractXPathExpression(xqFile, inputFile); |
| String actual = null; |
| try { |
| compileXPath(xpath); |
| ResultSequence rs = evaluate(domDoc); |
| |
| |
| actual = buildResultString(rs); |
| |
| } catch (XPathParserException ex) { |
| actual = ex.code(); |
| } catch (StaticError ex) { |
| actual = ex.code(); |
| } catch (DynamicError ex) { |
| actual = ex.code(); |
| } |
| |
| assertEquals("XPath Result Error " + xqFile + ":", expectedResult, actual); |
| |
| |
| } |
| |
| // Variant of "instance of" expression |
| public void test_k_SeqExprInstanceOf50() throws Exception { |
| String inputFile = "/TestSources/emptydoc.xml"; |
| String xqFile = "/Queries/XQuery/Expressions/seqExprTypes/SeqExprInstanceOf/K-SeqExprInstanceOf-50.xq"; |
| String expectedResult = "XPST0051"; |
| URL fileURL = bundle.getEntry(inputFile); |
| loadDOMDocument(fileURL); |
| |
| // Get XML Schema Information for the Document |
| XSModel schema = getGrammar(); |
| |
| setupDynamicContext(schema); |
| |
| String xpath = extractXPathExpression(xqFile, inputFile); |
| String actual = null; |
| try { |
| compileXPath(xpath); |
| ResultSequence rs = evaluate(domDoc); |
| |
| |
| actual = buildResultString(rs); |
| |
| } catch (XPathParserException ex) { |
| actual = ex.code(); |
| } catch (StaticError ex) { |
| actual = ex.code(); |
| } catch (DynamicError ex) { |
| actual = ex.code(); |
| } |
| |
| assertEquals("XPath Result Error " + xqFile + ":", expectedResult, actual); |
| |
| |
| } |
| |
| // Variant of "instance of" expression |
| public void test_k_SeqExprInstanceOf51() throws Exception { |
| String inputFile = "/TestSources/emptydoc.xml"; |
| String xqFile = "/Queries/XQuery/Expressions/seqExprTypes/SeqExprInstanceOf/K-SeqExprInstanceOf-51.xq"; |
| String expectedResult = "XPST0051"; |
| URL fileURL = bundle.getEntry(inputFile); |
| loadDOMDocument(fileURL); |
| |
| // Get XML Schema Information for the Document |
| XSModel schema = getGrammar(); |
| |
| setupDynamicContext(schema); |
| |
| String xpath = extractXPathExpression(xqFile, inputFile); |
| String actual = null; |
| try { |
| compileXPath(xpath); |
| ResultSequence rs = evaluate(domDoc); |
| |
| |
| actual = buildResultString(rs); |
| |
| } catch (XPathParserException ex) { |
| actual = ex.code(); |
| } catch (StaticError ex) { |
| actual = ex.code(); |
| } catch (DynamicError ex) { |
| actual = ex.code(); |
| } |
| |
| assertEquals("XPath Result Error " + xqFile + ":", expectedResult, actual); |
| |
| |
| } |
| |
| // Variant of "instance of" expression |
| public void test_k_SeqExprInstanceOf52() throws Exception { |
| String inputFile = "/TestSources/emptydoc.xml"; |
| String xqFile = "/Queries/XQuery/Expressions/seqExprTypes/SeqExprInstanceOf/K-SeqExprInstanceOf-52.xq"; |
| String expectedResult = "XPST0051"; |
| URL fileURL = bundle.getEntry(inputFile); |
| loadDOMDocument(fileURL); |
| |
| // Get XML Schema Information for the Document |
| XSModel schema = getGrammar(); |
| |
| setupDynamicContext(schema); |
| |
| String xpath = extractXPathExpression(xqFile, inputFile); |
| String actual = null; |
| try { |
| compileXPath(xpath); |
| ResultSequence rs = evaluate(domDoc); |
| |
| |
| actual = buildResultString(rs); |
| |
| } catch (XPathParserException ex) { |
| actual = ex.code(); |
| } catch (StaticError ex) { |
| actual = ex.code(); |
| } catch (DynamicError ex) { |
| actual = ex.code(); |
| } |
| |
| assertEquals("XPath Result Error " + xqFile + ":", expectedResult, actual); |
| |
| |
| } |
| |
| // Variant of "instance of" expression |
| public void test_k_SeqExprInstanceOf53() throws Exception { |
| String inputFile = "/TestSources/emptydoc.xml"; |
| String xqFile = "/Queries/XQuery/Expressions/seqExprTypes/SeqExprInstanceOf/K-SeqExprInstanceOf-53.xq"; |
| String expectedResult = "XPST0051"; |
| URL fileURL = bundle.getEntry(inputFile); |
| loadDOMDocument(fileURL); |
| |
| // Get XML Schema Information for the Document |
| XSModel schema = getGrammar(); |
| |
| setupDynamicContext(schema); |
| |
| String xpath = extractXPathExpression(xqFile, inputFile); |
| String actual = null; |
| try { |
| compileXPath(xpath); |
| ResultSequence rs = evaluate(domDoc); |
| |
| |
| actual = buildResultString(rs); |
| |
| } catch (XPathParserException ex) { |
| actual = ex.code(); |
| } catch (StaticError ex) { |
| actual = ex.code(); |
| } catch (DynamicError ex) { |
| actual = ex.code(); |
| } |
| |
| assertEquals("XPath Result Error " + xqFile + ":", expectedResult, actual); |
| |
| |
| } |
| |
| // Variant of "instance of" expression |
| public void test_k_SeqExprInstanceOf54() throws Exception { |
| String inputFile = "/TestSources/emptydoc.xml"; |
| String xqFile = "/Queries/XQuery/Expressions/seqExprTypes/SeqExprInstanceOf/K-SeqExprInstanceOf-54.xq"; |
| String expectedResult = "XPST0003"; |
| URL fileURL = bundle.getEntry(inputFile); |
| loadDOMDocument(fileURL); |
| |
| // Get XML Schema Information for the Document |
| XSModel schema = getGrammar(); |
| |
| setupDynamicContext(schema); |
| |
| String xpath = extractXPathExpression(xqFile, inputFile); |
| String actual = null; |
| try { |
| compileXPath(xpath); |
| ResultSequence rs = evaluate(domDoc); |
| |
| |
| actual = buildResultString(rs); |
| |
| } catch (XPathParserException ex) { |
| actual = ex.code(); |
| } catch (StaticError ex) { |
| actual = ex.code(); |
| } catch (DynamicError ex) { |
| actual = ex.code(); |
| } |
| |
| assertEquals("XPath Result Error " + xqFile + ":", expectedResult, actual); |
| |
| |
| } |
| |
| // Variant of "instance of" expression |
| public void test_k_SeqExprInstanceOf55() throws Exception { |
| String inputFile = "/TestSources/emptydoc.xml"; |
| String xqFile = "/Queries/XQuery/Expressions/seqExprTypes/SeqExprInstanceOf/K-SeqExprInstanceOf-55.xq"; |
| String expectedResult = "XPST0003"; |
| URL fileURL = bundle.getEntry(inputFile); |
| loadDOMDocument(fileURL); |
| |
| // Get XML Schema Information for the Document |
| XSModel schema = getGrammar(); |
| |
| setupDynamicContext(schema); |
| |
| String xpath = extractXPathExpression(xqFile, inputFile); |
| String actual = null; |
| try { |
| compileXPath(xpath); |
| ResultSequence rs = evaluate(domDoc); |
| |
| |
| actual = buildResultString(rs); |
| |
| } catch (XPathParserException ex) { |
| actual = ex.code(); |
| } catch (StaticError ex) { |
| actual = ex.code(); |
| } catch (DynamicError ex) { |
| actual = ex.code(); |
| } |
| |
| assertEquals("XPath Result Error " + xqFile + ":", expectedResult, actual); |
| |
| |
| } |
| |
| // Variant of "instance of" expression |
| public void test_k_SeqExprInstanceOf56() throws Exception { |
| String inputFile = "/TestSources/emptydoc.xml"; |
| String xqFile = "/Queries/XQuery/Expressions/seqExprTypes/SeqExprInstanceOf/K-SeqExprInstanceOf-56.xq"; |
| String expectedResult = "FOER0000"; |
| URL fileURL = bundle.getEntry(inputFile); |
| loadDOMDocument(fileURL); |
| |
| // Get XML Schema Information for the Document |
| XSModel schema = getGrammar(); |
| |
| setupDynamicContext(schema); |
| |
| String xpath = extractXPathExpression(xqFile, inputFile); |
| String actual = null; |
| try { |
| compileXPath(xpath); |
| ResultSequence rs = evaluate(domDoc); |
| |
| |
| actual = buildResultString(rs); |
| |
| } catch (XPathParserException ex) { |
| actual = ex.code(); |
| } catch (StaticError ex) { |
| actual = ex.code(); |
| } catch (DynamicError ex) { |
| actual = ex.code(); |
| } |
| |
| assertEquals("XPath Result Error " + xqFile + ":", expectedResult, actual); |
| |
| |
| } |
| |
| // Variant of "instance of" expression |
| public void test_k_SeqExprInstanceOf57() throws Exception { |
| String inputFile = "/TestSources/emptydoc.xml"; |
| String xqFile = "/Queries/XQuery/Expressions/seqExprTypes/SeqExprInstanceOf/K-SeqExprInstanceOf-57.xq"; |
| String expectedResult = "FOER0000"; |
| URL fileURL = bundle.getEntry(inputFile); |
| loadDOMDocument(fileURL); |
| |
| // Get XML Schema Information for the Document |
| XSModel schema = getGrammar(); |
| |
| setupDynamicContext(schema); |
| |
| String xpath = extractXPathExpression(xqFile, inputFile); |
| String actual = null; |
| try { |
| compileXPath(xpath); |
| ResultSequence rs = evaluate(domDoc); |
| |
| |
| actual = buildResultString(rs); |
| |
| } catch (XPathParserException ex) { |
| actual = ex.code(); |
| } catch (StaticError ex) { |
| actual = ex.code(); |
| } catch (DynamicError ex) { |
| actual = ex.code(); |
| } |
| |
| assertEquals("XPath Result Error " + xqFile + ":", expectedResult, actual); |
| |
| |
| } |
| |
| // Variant of "instance of" expression |
| public void test_k_SeqExprInstanceOf58() throws Exception { |
| String inputFile = "/TestSources/emptydoc.xml"; |
| String xqFile = "/Queries/XQuery/Expressions/seqExprTypes/SeqExprInstanceOf/K-SeqExprInstanceOf-58.xq"; |
| String expectedResult = "FOER0000"; |
| URL fileURL = bundle.getEntry(inputFile); |
| loadDOMDocument(fileURL); |
| |
| // Get XML Schema Information for the Document |
| XSModel schema = getGrammar(); |
| |
| setupDynamicContext(schema); |
| |
| String xpath = extractXPathExpression(xqFile, inputFile); |
| String actual = null; |
| try { |
| compileXPath(xpath); |
| ResultSequence rs = evaluate(domDoc); |
| |
| |
| actual = buildResultString(rs); |
| |
| } catch (XPathParserException ex) { |
| actual = ex.code(); |
| } catch (StaticError ex) { |
| actual = ex.code(); |
| } catch (DynamicError ex) { |
| actual = ex.code(); |
| } |
| |
| assertEquals("XPath Result Error " + xqFile + ":", expectedResult, actual); |
| |
| |
| } |
| |
| // Variant of "instance of" expression |
| public void test_k_SeqExprInstanceOf59() throws Exception { |
| String inputFile = "/TestSources/emptydoc.xml"; |
| String xqFile = "/Queries/XQuery/Expressions/seqExprTypes/SeqExprInstanceOf/K-SeqExprInstanceOf-59.xq"; |
| String expectedResult = "FOER0000"; |
| URL fileURL = bundle.getEntry(inputFile); |
| loadDOMDocument(fileURL); |
| |
| // Get XML Schema Information for the Document |
| XSModel schema = getGrammar(); |
| |
| setupDynamicContext(schema); |
| |
| String xpath = extractXPathExpression(xqFile, inputFile); |
| String actual = null; |
| try { |
| compileXPath(xpath); |
| ResultSequence rs = evaluate(domDoc); |
| |
| |
| actual = buildResultString(rs); |
| |
| } catch (XPathParserException ex) { |
| actual = ex.code(); |
| } catch (StaticError ex) { |
| actual = ex.code(); |
| } catch (DynamicError ex) { |
| actual = ex.code(); |
| } |
| |
| assertEquals("XPath Result Error " + xqFile + ":", expectedResult, actual); |
| |
| |
| } |
| |
| // Variant of "instance of" expression |
| public void test_k_SeqExprInstanceOf60() throws Exception { |
| String inputFile = "/TestSources/emptydoc.xml"; |
| String xqFile = "/Queries/XQuery/Expressions/seqExprTypes/SeqExprInstanceOf/K-SeqExprInstanceOf-60.xq"; |
| String expectedResult = "FOER0000"; |
| URL fileURL = bundle.getEntry(inputFile); |
| loadDOMDocument(fileURL); |
| |
| // Get XML Schema Information for the Document |
| XSModel schema = getGrammar(); |
| |
| setupDynamicContext(schema); |
| |
| String xpath = extractXPathExpression(xqFile, inputFile); |
| String actual = null; |
| try { |
| compileXPath(xpath); |
| ResultSequence rs = evaluate(domDoc); |
| |
| |
| actual = buildResultString(rs); |
| |
| } catch (XPathParserException ex) { |
| actual = ex.code(); |
| } catch (StaticError ex) { |
| actual = ex.code(); |
| } catch (DynamicError ex) { |
| actual = ex.code(); |
| } |
| |
| assertEquals("XPath Result Error " + xqFile + ":", expectedResult, actual); |
| |
| |
| } |
| |
| // Variant of "instance of" expression |
| public void test_k_SeqExprInstanceOf61() throws Exception { |
| String inputFile = "/TestSources/emptydoc.xml"; |
| String xqFile = "/Queries/XQuery/Expressions/seqExprTypes/SeqExprInstanceOf/K-SeqExprInstanceOf-61.xq"; |
| String expectedResult = "FOER0000"; |
| URL fileURL = bundle.getEntry(inputFile); |
| loadDOMDocument(fileURL); |
| |
| // Get XML Schema Information for the Document |
| XSModel schema = getGrammar(); |
| |
| setupDynamicContext(schema); |
| |
| String xpath = extractXPathExpression(xqFile, inputFile); |
| String actual = null; |
| try { |
| compileXPath(xpath); |
| ResultSequence rs = evaluate(domDoc); |
| |
| |
| actual = buildResultString(rs); |
| |
| } catch (XPathParserException ex) { |
| actual = ex.code(); |
| } catch (StaticError ex) { |
| actual = ex.code(); |
| } catch (DynamicError ex) { |
| actual = ex.code(); |
| } |
| |
| assertEquals("XPath Result Error " + xqFile + ":", expectedResult, actual); |
| |
| |
| } |
| |
| // Variant of "instance of" expression |
| public void test_k_SeqExprInstanceOf62() throws Exception { |
| String inputFile = "/TestSources/emptydoc.xml"; |
| String xqFile = "/Queries/XQuery/Expressions/seqExprTypes/SeqExprInstanceOf/K-SeqExprInstanceOf-62.xq"; |
| String expectedResult = "FOER0000"; |
| URL fileURL = bundle.getEntry(inputFile); |
| loadDOMDocument(fileURL); |
| |
| // Get XML Schema Information for the Document |
| XSModel schema = getGrammar(); |
| |
| setupDynamicContext(schema); |
| |
| String xpath = extractXPathExpression(xqFile, inputFile); |
| String actual = null; |
| try { |
| compileXPath(xpath); |
| ResultSequence rs = evaluate(domDoc); |
| |
| |
| actual = buildResultString(rs); |
| |
| } catch (XPathParserException ex) { |
| actual = ex.code(); |
| } catch (StaticError ex) { |
| actual = ex.code(); |
| } catch (DynamicError ex) { |
| actual = ex.code(); |
| } |
| |
| assertEquals("XPath Result Error " + xqFile + ":", expectedResult, actual); |
| |
| |
| } |
| |
| // Variant of "instance of" expression |
| public void test_k_SeqExprInstanceOf63() throws Exception { |
| String inputFile = "/TestSources/emptydoc.xml"; |
| String xqFile = "/Queries/XQuery/Expressions/seqExprTypes/SeqExprInstanceOf/K-SeqExprInstanceOf-63.xq"; |
| String expectedResult = "FOER0000"; |
| URL fileURL = bundle.getEntry(inputFile); |
| loadDOMDocument(fileURL); |
| |
| // Get XML Schema Information for the Document |
| XSModel schema = getGrammar(); |
| |
| setupDynamicContext(schema); |
| |
| String xpath = extractXPathExpression(xqFile, inputFile); |
| String actual = null; |
| try { |
| compileXPath(xpath); |
| ResultSequence rs = evaluate(domDoc); |
| |
| |
| actual = buildResultString(rs); |
| |
| } catch (XPathParserException ex) { |
| actual = ex.code(); |
| } catch (StaticError ex) { |
| actual = ex.code(); |
| } catch (DynamicError ex) { |
| actual = ex.code(); |
| } |
| |
| assertEquals("XPath Result Error " + xqFile + ":", expectedResult, actual); |
| |
| |
| } |
| |
| // Variant of "instance of" expression |
| public void test_k_SeqExprInstanceOf64() throws Exception { |
| String inputFile = "/TestSources/emptydoc.xml"; |
| String xqFile = "/Queries/XQuery/Expressions/seqExprTypes/SeqExprInstanceOf/K-SeqExprInstanceOf-64.xq"; |
| String resultFile = "/ExpectedTestResults/Expressions/seqExprTypes/SeqExprInstanceOf/K-SeqExprInstanceOf-64.txt"; |
| String expectedResult = getExpectedResult(resultFile); |
| URL fileURL = bundle.getEntry(inputFile); |
| loadDOMDocument(fileURL); |
| |
| // Get XML Schema Information for the Document |
| XSModel schema = getGrammar(); |
| |
| setupDynamicContext(schema); |
| |
| String xpath = extractXPathExpression(xqFile, inputFile); |
| String actual = null; |
| try { |
| compileXPath(xpath); |
| ResultSequence rs = evaluate(domDoc); |
| |
| |
| actual = buildResultString(rs); |
| |
| } catch (XPathParserException ex) { |
| actual = ex.code(); |
| } catch (StaticError ex) { |
| actual = ex.code(); |
| } catch (DynamicError ex) { |
| actual = ex.code(); |
| } |
| |
| assertEquals("XPath Result Error " + xqFile + ":", expectedResult, actual); |
| |
| |
| } |
| |
| // Variant of "instance of" expression |
| public void test_k_SeqExprInstanceOf65() throws Exception { |
| String inputFile = "/TestSources/emptydoc.xml"; |
| String xqFile = "/Queries/XQuery/Expressions/seqExprTypes/SeqExprInstanceOf/K-SeqExprInstanceOf-65.xq"; |
| String resultFile = "/ExpectedTestResults/Expressions/seqExprTypes/SeqExprInstanceOf/K-SeqExprInstanceOf-65.txt"; |
| String expectedResult = getExpectedResult(resultFile); |
| URL fileURL = bundle.getEntry(inputFile); |
| loadDOMDocument(fileURL); |
| |
| // Get XML Schema Information for the Document |
| XSModel schema = getGrammar(); |
| |
| setupDynamicContext(schema); |
| |
| String xpath = extractXPathExpression(xqFile, inputFile); |
| String actual = null; |
| try { |
| compileXPath(xpath); |
| ResultSequence rs = evaluate(domDoc); |
| |
| |
| actual = buildResultString(rs); |
| |
| } catch (XPathParserException ex) { |
| actual = ex.code(); |
| } catch (StaticError ex) { |
| actual = ex.code(); |
| } catch (DynamicError ex) { |
| actual = ex.code(); |
| } |
| |
| assertEquals("XPath Result Error " + xqFile + ":", expectedResult, actual); |
| |
| |
| } |
| |
| // Variant of "instance of" expression |
| public void test_k_SeqExprInstanceOf66() throws Exception { |
| String inputFile = "/TestSources/emptydoc.xml"; |
| String xqFile = "/Queries/XQuery/Expressions/seqExprTypes/SeqExprInstanceOf/K-SeqExprInstanceOf-66.xq"; |
| String resultFile = "/ExpectedTestResults/Expressions/seqExprTypes/SeqExprInstanceOf/K-SeqExprInstanceOf-66.txt"; |
| String expectedResult = getExpectedResult(resultFile); |
| URL fileURL = bundle.getEntry(inputFile); |
| loadDOMDocument(fileURL); |
| |
| // Get XML Schema Information for the Document |
| XSModel schema = getGrammar(); |
| |
| setupDynamicContext(schema); |
| |
| String xpath = extractXPathExpression(xqFile, inputFile); |
| String actual = null; |
| try { |
| compileXPath(xpath); |
| ResultSequence rs = evaluate(domDoc); |
| |
| |
| actual = buildResultString(rs); |
| |
| } catch (XPathParserException ex) { |
| actual = ex.code(); |
| } catch (StaticError ex) { |
| actual = ex.code(); |
| } catch (DynamicError ex) { |
| actual = ex.code(); |
| } |
| |
| assertEquals("XPath Result Error " + xqFile + ":", expectedResult, actual); |
| } |
| |
| } |
| |