@Override
    public void init (AbstractQueue<QueueElement> inq, 
                    AbstractQueue<QueueElement> outq, Properties props) 
            throws ParserConfigurationException, 
                   TransformerConfigurationException, 
                   FileNotFoundException, IOException {
        this.inq = inq;
        this.outq = outq;
        this.props = props;

        // Prepare a document builder.
        docBuilderFactory = DocumentBuilderFactory.newInstance();
        docBuilderFactory.setNamespaceAware(true);
        docBuilder = docBuilderFactory.newDocumentBuilder();
        
        validator = new DTDValidator();
        
        String strStyleFile = props.getProperty("styleFile");
        if (strStyleFile != null) {
            tcHM = StyleReader.getTagCategories(strStyleFile);
            
            // Just for debugging purposes.
            if (props.getProperty("debug", "false").equalsIgnoreCase("true")) {
                for (Map.Entry<String,TagCategory> entry : tcHM.entrySet()) {
                    StringBuffer sb = new StringBuffer();
                    sb.append(entry.getKey() + ": ");
                    Iterator<String> iter =entry.getValue().getTags();
                    while (iter.hasNext()) {
                        sb.append(iter.next() + "; ");
                    }
                    logger.finest(sb.toString());
                }
            }
        }
    }