use XML::Xalan; my $tr = new XML::Xalan::Transformer; my $LONCAPA_metadata=(< Felicia Berryman, MSU HHMI First Year Online Biology default 1011110523 biomolecules,practice seniso 1011110523 html bio@msu, bio@msu (Michigan State University), bio@msu (Michigan State University), bio@msu (Michigan State University) Bio Information, Large Biomolecules - Intro, Large Biomolecules - Review END #http://metamanagement.comm.nsdlib.org/overview.html#NSDL #http://www.dlib.vt.edu/projects/OAi/marcxml/marcxml.html #http://www.openarchives.org/OAI/openarchivesprotocol.html my $NSDL_metadata1=(< The Cornell Law Quarterly 1915-1916 http://heinonline.org/HeinOnline/show.pl? handle=hein.journals/clqv1%26id=1%26size=4 Available by Subscription. See http://www.wshein.com END my $NSDL_metadata2=(< Grassmann's space analysis Hyde, E. W. (Edward Wyllys) LCSH:Ausdehnungslehre; LCCN QA205.H99 J. Wiley & Sons Created: 1906; Available: 1991 text http://resolver.library.cornell.edu/math/1796949 eng Public Domain END my $compiled = $tr->compile_stylesheet_file("foo.xsl"); my $parsed = $tr->parse_file("foo.xml"); my $dest_file="abc.xml"; $tr->transform_to_file($parsed, $compiled, $dest_file) or die $tr->errstr;