| 1 |
package com.thaiopensource.validate.rng; |
| 2 |
|
| 3 |
import com.thaiopensource.relaxng.parse.Parseable; |
| 4 |
import com.thaiopensource.relaxng.parse.compact.CompactParseable; |
| 5 |
import com.thaiopensource.relaxng.pattern.Pattern; |
| 6 |
import com.thaiopensource.relaxng.pattern.NameClass; |
| 7 |
import com.thaiopensource.relaxng.pattern.CommentListImpl; |
| 8 |
import com.thaiopensource.relaxng.pattern.AnnotationsImpl; |
| 9 |
import com.thaiopensource.resolver.xml.sax.SAX; |
| 10 |
import com.thaiopensource.resolver.xml.sax.SAXResolver; |
| 11 |
import com.thaiopensource.util.PropertyMap; |
| 12 |
import com.thaiopensource.util.VoidValue; |
| 13 |
import com.thaiopensource.validate.SchemaReader; |
| 14 |
import com.thaiopensource.validate.rng.impl.SchemaReaderImpl; |
| 15 |
import org.xml.sax.ErrorHandler; |
| 16 |
import org.xml.sax.Locator; |
| 17 |
|
| 18 |
import javax.xml.transform.sax.SAXSource; |
| 19 |
|
| 20 |
public class CompactSchemaReader extends SchemaReaderImpl { |
| 21 |
private static final SchemaReader theInstance = new CompactSchemaReader(); |
| 22 |
|
| 23 |
private CompactSchemaReader() { |
| 24 |
} |
| 25 |
|
| 26 |
public static SchemaReader getInstance() { |
| 27 |
return theInstance; |
| 28 |
} |
| 29 |
|
| 30 |
protected Parseable<Pattern, NameClass, Locator, VoidValue, CommentListImpl, AnnotationsImpl> createParseable(SAXSource source, SAXResolver saxResolver, ErrorHandler eh, PropertyMap properties) { |
| 31 |
return new CompactParseable<Pattern, NameClass, Locator, VoidValue, CommentListImpl, AnnotationsImpl>(SAX.createInput(source.getInputSource()), saxResolver.getResolver(), eh); |
| 32 |
} |
| 33 |
} |