001 package com.thaiopensource.validate.xerces; 002 003 import com.thaiopensource.validate.SchemaReaderFactory; 004 import com.thaiopensource.validate.SchemaReader; 005 import com.thaiopensource.validate.Option; 006 import com.thaiopensource.validate.xerces.SchemaReaderImpl; 007 import com.thaiopensource.xml.util.WellKnownNamespaces; 008 import org.apache.xerces.parsers.XMLGrammarPreparser; 009 010 public class XsdSchemaReaderFactory implements SchemaReaderFactory { 011 public XsdSchemaReaderFactory() { 012 // Force a linkage error if Xerces is not available 013 new XMLGrammarPreparser(); 014 } 015 016 public SchemaReader createSchemaReader(String namespaceUri) { 017 if (WellKnownNamespaces.XML_SCHEMA.equals(namespaceUri)) 018 return new SchemaReaderImpl(); 019 return null; 020 } 021 022 public Option getOption(String uri) { 023 return null; 024 } 025 }