--- /dev/null
+package mir.misc;
+
+import java.io.InputStream;
+import java.io.IOException;
+import java.io.OutputStream;
+import org.xml.sax.SAXException;
+import com.icl.saxon.trax.Transformer;
+import com.icl.saxon.trax.Templates;
+import com.icl.saxon.trax.Result;
+import com.icl.saxon.PreparedStyleSheet;
+import org.xml.sax.InputSource;
+
+/**
+ * Title: XmlSaxonStyler
+ * Description: Implement XmlStyler
+ * Copyright: Copyright (c) 2001
+ * Company: Indymedia
+ * @author idfx
+ * @version 1.0
+ */
+
+public class XmlSaxonStyler implements XmlStyler{
+
+ private XmlSaxonStyler() {}
+ private static XmlSaxonStyler styler = new XmlSaxonStyler();
+ public static XmlSaxonStyler getInstance(){
+ return styler;
+ }
+
+ public void style( String styleKey, InputStream is, OutputStream os )
+ throws SAXException {
+
+ Templates styleSheet = XslStyleCache.getPreparedStyleSheet( styleKey );
+ Transformer transformer = styleSheet.newTransformer();
+ transformer.transform( new InputSource( is ), new Result( os ) );
+ }
+
+ public void style( Transformer transformer, InputStream is, OutputStream os )
+ throws SAXException {
+
+ transformer.transform( new InputSource( is ), new Result( os ) );
+ }
+}
\ No newline at end of file