com.thaiopensource.validate.rng.CompactSchemaReader Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of wicketstuff-jing Show documentation
Show all versions of wicketstuff-jing Show documentation
Jing is a validator for RELAX NG and other schema languages. This
project was taken from http://code.google.com/p/jing-trang and
mavenized for inclusion in the Wicket Stuff HTML Validator.
The code was taken from the 20091111 release.
package com.thaiopensource.validate.rng;
import com.thaiopensource.relaxng.parse.Parseable;
import com.thaiopensource.relaxng.parse.compact.CompactParseable;
import com.thaiopensource.relaxng.pattern.Pattern;
import com.thaiopensource.relaxng.pattern.NameClass;
import com.thaiopensource.relaxng.pattern.CommentListImpl;
import com.thaiopensource.relaxng.pattern.AnnotationsImpl;
import com.thaiopensource.resolver.xml.sax.SAX;
import com.thaiopensource.resolver.xml.sax.SAXResolver;
import com.thaiopensource.util.PropertyMap;
import com.thaiopensource.util.VoidValue;
import com.thaiopensource.validate.SchemaReader;
import com.thaiopensource.validate.rng.impl.SchemaReaderImpl;
import org.xml.sax.ErrorHandler;
import org.xml.sax.Locator;
import javax.xml.transform.sax.SAXSource;
public class CompactSchemaReader extends SchemaReaderImpl {
private static final SchemaReader theInstance = new CompactSchemaReader();
private CompactSchemaReader() {
}
public static SchemaReader getInstance() {
return theInstance;
}
protected Parseable createParseable(SAXSource source, SAXResolver saxResolver, ErrorHandler eh, PropertyMap properties) {
return new CompactParseable(SAX.createInput(source.getInputSource()), saxResolver.getResolver(), eh);
}
}