Search in sources :

Example 1 with XSLValidationReport

use of org.eclipse.wst.xsl.core.internal.validation.XSLValidationReport in project webtools.sourceediting by eclipse.

the class AbstractModelTest method validate.

/**
 * Validate the file
 *
 * @param file
 * @return
 * @throws CoreException
 * @throws XPathExpressionException
 * @throws IOException
 */
protected XSLValidationReport validate(IFile file) throws CoreException, XPathExpressionException, IOException {
    XSLValidationReport report = new XSLValidationReport(file.getLocationURI().toString());
    XSLValidator.getInstance().validate(file, report, true);
    StylesheetModel model = XSLCore.getInstance().getStylesheet(file);
    assertFalse("Stylesheet model is null", model == null);
    Map<Integer, String> expectedErrors = calculateErrorsAndWarnings(file);
    validateErrors(model, report, expectedErrors);
    return report;
}
Also used : XSLValidationReport(org.eclipse.wst.xsl.core.internal.validation.XSLValidationReport) StylesheetModel(org.eclipse.wst.xsl.core.model.StylesheetModel)

Example 2 with XSLValidationReport

use of org.eclipse.wst.xsl.core.internal.validation.XSLValidationReport in project webtools.sourceediting by eclipse.

the class AbstractValidationTest method validate.

/**
 * Validate the file
 *
 * @param file
 * @return
 * @throws CoreException
 * @throws XPathExpressionException
 * @throws IOException
 */
protected XSLValidationReport validate(IFile file) throws CoreException, XPathExpressionException, IOException {
    XSLValidationReport report = new XSLValidationReport(file.getLocationURI().toString());
    XSLValidator.getInstance().validate(file, report, true);
    StylesheetModel model = XSLCore.getInstance().getStylesheet(file);
    assertFalse("Stylesheet model is null", model == null);
    Map<Integer, String> expectedErrors = calculateErrorsAndWarnings(file);
    validateErrors(model, report, expectedErrors);
    return report;
}
Also used : XSLValidationReport(org.eclipse.wst.xsl.core.internal.validation.XSLValidationReport) StylesheetModel(org.eclipse.wst.xsl.core.model.StylesheetModel)

Aggregations

XSLValidationReport (org.eclipse.wst.xsl.core.internal.validation.XSLValidationReport)2 StylesheetModel (org.eclipse.wst.xsl.core.model.StylesheetModel)2