use XML::Xalan;

my $tr = new XML::Xalan::Transformer;

my $LONCAPA_metadata=(<<END);
<abstract></abstract>
<author>Felicia Berryman, MSU HHMI First Year Online Biology</author>
<copyright>default</copyright>
<creationdate>1011110523</creationdate>
<dependencies></dependencies>
<keywords>biomolecules,practice</keywords>
<language>seniso</language>
<lastrevisiondate>1011110523</lastrevisiondate>
<mime>html</mime>
<notes></notes>
<owner>bio@msu, bio@msu (Michigan State University), bio@msu (Michigan State University), bio@msu (Michigan State University)</owner>
<subject>Bio Information, Large Biomolecules - Intro, Large Biomolecules - Review</subject>
<title></title>
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=(<<END);
<dc xmlns="http://purl.org/dc/elements/1.1/" 
    xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" 
    xsi:schemaLocation="http://purl.org/dc/elements/1.1/
                        http://www.openarchives.org/OAI/1.1/dc.xsd">
<title>The Cornell Law Quarterly</title>
<date>1915-1916</date>
<identifier>http://heinonline.org/HeinOnline/show.pl?
            handle=hein.journals/clqv1%26id=1%26size=4</identifier>
<rights>Available by Subscription. See http://www.wshein.com</rights>
</dc>
END
my $NSDL_metadata2=(<<END);
<dc:dc xmlns:dc="http://purl.org/dc/elements/1.1/" 
       xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" 
       xsi:schemaLocation="http://purl.org/dc/elements/1.1/
                           http://www.openarchives.org/OAI/1.1/dc.xsd">
<dc:title>Grassmann's space analysis</dc:title> 
<dc:creator>Hyde, E. W. (Edward Wyllys)</dc:creator>
<dc:subject>LCSH:Ausdehnungslehre; LCCN QA205.H99</dc:subject>
<dc:publisher>J. Wiley &amp; Sons</dc:publisher>
<dc:date>Created: 1906; Available: 1991</dc:date>
<dc:type>text</dc:type>
<dc:identifier>http://resolver.library.cornell.edu/math/1796949</dc:identifier>
<dc:language>eng</dc:language>
<dc:rights>Public Domain</dc:rights>
</dc:dc>
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;
