private void runContentHandler(XMLReader pReader, ContentHandler pHandler, InputSource pSource)
throws SAXException, IOException {
String logDir = System.getProperty("org.apache.ws.jaxme.xs.logDir");
FileOutputStream fos = null;
try {
SchemaTransformer transformer = getData().getXSObjectFactory().getSchemaTransformer();
if (transformer != null) {
transformer.parse(pSource, pReader);
final InputSource newSource = transformer.getTransformedInputSource();
newSource.setSystemId(pSource.getSystemId());
newSource.setPublicId(pSource.getPublicId());
pSource = newSource;
pReader = transformer.getTransformedXMLReader();
}
if (logDir != null) {
File tmpFile = File.createTempFile("jaxmexs", ".xsd", new File(logDir));
fos = new FileOutputStream(tmpFile);
LoggingContentHandler lch = new LoggingContentHandler(fos);