Start line:  
End line:  

Snippet Preview

Snippet HTML Code

Stack Overflow Questions
 package com.thaiopensource.validate.schematron;
 
Properties for controlling schema reading and validation specific to Schematron.
public class SchematronProperty {
  private SchematronProperty() { }

  
PropertyId that specifies the Schematron phase to use. This applies during schema creation.
  public static final StringPropertyId PHASE = new StringPropertyId("PHASE");
  static public class PhaseOption extends StringOption {
    private PhaseOption() {
      super();
    }
    public String normalize(String valuethrows OptionArgumentFormatException {
      value = value.trim();
      if (!value.equals("#ALL") && !Naming.isNcname(value))
        throw new OptionArgumentFormatException();
      return value;
    }
  }
  public static final StringOption PHASE_OPTION = new PhaseOption();

  
PropertyId thats specifies that diagnostic messages should be included. This applies during validation.
  public static final FlagPropertyId DIAGNOSE = new FlagPropertyId("DIAGNOSE");
  public static Option getOption(String uri) {
    if (!uri.startsWith(.))
      return null;
    uri = uri.substring(..length());
    if (uri.equals("diagnose"))
      return new FlagOption();
    if (uri.equals("phase"))
      return ;
    return null;
  }
New to GrepCode? Check out our FAQ X