FileDocCategorySizeDatePackage
XSLTransform.javaAPI DocExample620Sat Apr 23 22:35:42 BST 2005None

XSLTransform

public class XSLTransform extends Object

Fields Summary
Constructors Summary
Methods Summary
public static voidmain(java.lang.String[] args)

		if ( args.length < 2 || !args[0].endsWith(".xsl") ) {
			System.err.println("usage: XSLTransform file.xsl file.xml");
			System.exit(1);
		}
		TransformerFactory factory = TransformerFactory.newInstance();
		Transformer transformer = 
			factory.newTransformer( new StreamSource( args[0] ) );
		StreamSource xmlsource = new StreamSource( args[1] );
		StreamResult output = new StreamResult( System.out );
		transformer.transform( xmlsource, output );