Package org.eclipse.wst.xml.core.internal.validation

Examples of org.eclipse.wst.xml.core.internal.validation.XMLValidationConfiguration


  public ValidationReport validate(String uri, InputStream inputstream, NestedValidatorContext context, ValidationResult result)
  {
    XMLValidator validator = XMLValidator.getInstance();

    XMLValidationConfiguration configuration = new XMLValidationConfiguration();
    try
    {
      //Preferences pluginPreferences = XMLCorePlugin.getDefault().getPluginPreferences();
      configuration.setFeature(XMLValidationConfiguration.INDICATE_NO_GRAMMAR, indicateNoGrammar);
      final IPreferencesService preferencesService = Platform.getPreferencesService();
      configuration.setFeature(XMLValidationConfiguration.INDICATE_NO_DOCUMENT_ELEMENT, preferencesService.getInt(XMLCorePlugin.getDefault().getBundle().getSymbolicName(), XMLCorePreferenceNames.INDICATE_NO_DOCUMENT_ELEMENT, -1, fPreferenceScopes));
      configuration.setFeature(XMLValidationConfiguration.USE_XINCLUDE, preferencesService.getBoolean(XMLCorePlugin.getDefault().getBundle().getSymbolicName(), XMLCorePreferenceNames.USE_XINCLUDE, false, fPreferenceScopes));
      configuration.setFeature(XMLValidationConfiguration.HONOUR_ALL_SCHEMA_LOCATIONS, preferencesService.getBoolean(XMLCorePlugin.getDefault().getBundle().getSymbolicName(), XMLCorePreferenceNames.HONOUR_ALL_SCHEMA_LOCATIONS, true, fPreferenceScopes));
    }
    catch(Exception e)
    {
      // TODO: Unable to set the preference. Log this problem.
    }
View Full Code Here

TOP

Related Classes of org.eclipse.wst.xml.core.internal.validation.XMLValidationConfiguration

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.