KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > com > thaiopensource > validate > xerces > XsdSchemaReaderFactory


1 package com.thaiopensource.validate.xerces;
2
3 import com.thaiopensource.validate.SchemaReaderFactory;
4 import com.thaiopensource.validate.SchemaReader;
5 import com.thaiopensource.validate.Option;
6 import com.thaiopensource.validate.xerces.SchemaReaderImpl;
7 import com.thaiopensource.xml.util.WellKnownNamespaces;
8 import org.apache.xerces.parsers.XMLGrammarPreparser;
9
10 public class XsdSchemaReaderFactory implements SchemaReaderFactory {
11   public XsdSchemaReaderFactory() {
12     // Force a linkage error if Xerces is not available
13
new XMLGrammarPreparser();
14   }
15
16   public SchemaReader createSchemaReader(String JavaDoc namespaceUri) {
17     if (WellKnownNamespaces.XML_SCHEMA.equals(namespaceUri))
18       return new SchemaReaderImpl();
19     return null;
20   }
21
22   public Option getOption(String JavaDoc uri) {
23     return null;
24   }
25 }
26
Popular Tags