org.mmbase.util
Class XSLTransformer

java.lang.Object
  |
  +--org.mmbase.util.XSLTransformer

public class XSLTransformer
extends java.lang.Object

Make XSL Transformations

Version:
$Id: XSLTransformer.java,v 1.7 2001/05/23 14:03:49 michiel Exp $ $Log: XSLTransformer.java,v $ Revision 1.7 2001/05/23 14:03:49 michiel michiel: Uses Xalan 2 now. I only tested with its main. Revision 1.6 2001/04/19 15:32:26 pierre pierre: added logging Revision 1.5 2000/10/31 14:52:28 vpro Rico: removed import Revision 1.4 2000/10/19 11:54:12 case cjr: Set entityresolver for XSL transformations so local DTD's of XML documents are found. (Formerly, DTD's were looked for at mmbase.org, which resulted in failure if an mmbase machine didn't have access to the net.) Revision 1.3 2000/10/18 12:48:53 case cjr: added a method to cut off the part that prevents XSL from being used to create merely part of a new xml document. I hope someone knows a real xml/xsl way to accomplish the same result. Revision 1.2 2000/08/10 19:53:54 case cjr: Removed an obsolete comment Revision 1.1 2000/08/09 12:45:24 case cjr: implements a transform(xmlPath,xslPath) method that returns a string
Author:
Case Roole, cjr@dds.nl

Constructor Summary
XSLTransformer()
          Empty constructor
 
Method Summary
static void main(java.lang.String[] argv)
          Invocation of the class from the commandline for testing.
 java.lang.String transform(java.lang.String xmlPath, java.lang.String xslPath)
          Transform an XML document using a certain XSL document.
 java.lang.String transform(java.lang.String xmlPath, java.lang.String xslPath, boolean cutXML)
          Transform an XML document using a certain XSL document.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

XSLTransformer

public XSLTransformer()
Empty constructor
Method Detail

transform

public java.lang.String transform(java.lang.String xmlPath,
                                  java.lang.String xslPath)
Transform an XML document using a certain XSL document.
Parameters:
xmlPath - Path to XML file
xslPath - Path to XSL file
Returns:
String with converted XML document

transform

public java.lang.String transform(java.lang.String xmlPath,
                                  java.lang.String xslPath,
                                  boolean cutXML)
Transform an XML document using a certain XSL document.
Parameters:
xmlPath - Path to XML file
xslPath - Path to XSL file
cutXML - if true, cuts the <?xml> line that normally starts an xml document
Returns:
String with converted XML document

main

public static void main(java.lang.String[] argv)
Invocation of the class from the commandline for testing.


MMBase 2001