All Downloads are FREE. Search and download functionalities are using the official Maven repository.

com.thaiopensource.relaxng.impl.RecoverAfterFunction Maven / Gradle / Ivy

Go to download

A branch of Jing used by the Nu Html Checker. (Jing is a tool for validating documents against RelaxNG schemas.)

The newest version!
package com.thaiopensource.relaxng.impl;

class RecoverAfterFunction extends AbstractPatternFunction {
  private final ValidatorPatternBuilder builder;

  RecoverAfterFunction(ValidatorPatternBuilder builder) {
    this.builder = builder;
  }

  public Object caseOther(Pattern p) {
    throw new RuntimeException("recover after botch");
  }

  public Object caseChoice(ChoicePattern p) {
    return builder.makeChoice(p.getOperand1().applyForPattern(this),
			      p.getOperand2().applyForPattern(this));
  }

  public Object caseAfter(AfterPattern p) {
    return p.getOperand2();
  }
}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy