Annotation of nsdl/prototypes/metadata_convert.pl, revision 1.1

1.1     ! harris41    1: use XML::Xalan;
        !             2: 
        !             3: my $tr = new XML::Xalan::Transformer;
        !             4: 
        !             5: my $LONCAPA_metadata=(<<END);
        !             6: <abstract></abstract>
        !             7: <author>Felicia Berryman, MSU HHMI First Year Online Biology</author>
        !             8: <copyright>default</copyright>
        !             9: <creationdate>1011110523</creationdate>
        !            10: <dependencies></dependencies>
        !            11: <keywords>biomolecules,practice</keywords>
        !            12: <language>seniso</language>
        !            13: <lastrevisiondate>1011110523</lastrevisiondate>
        !            14: <mime>html</mime>
        !            15: <notes></notes>
        !            16: <owner>bio@msu, bio@msu (Michigan State University), bio@msu (Michigan State University), bio@msu (Michigan State University)</owner>
        !            17: <subject>Bio Information, Large Biomolecules - Intro, Large Biomolecules - Review</subject>
        !            18: <title></title>
        !            19: END
        !            20: 
        !            21: #http://metamanagement.comm.nsdlib.org/overview.html#NSDL
        !            22: #http://www.dlib.vt.edu/projects/OAi/marcxml/marcxml.html
        !            23: #http://www.openarchives.org/OAI/openarchivesprotocol.html
        !            24: my $NSDL_metadata1=(<<END);
        !            25: <dc xmlns="http://purl.org/dc/elements/1.1/        !            26:     xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance        !            27:     xsi:schemaLocation="http://purl.org/dc/elements/1.1/
        !            28:                         http://www.openarchives.org/OAI/1.1/dc.xsd">
        !            29: <title>The Cornell Law Quarterly</title>
        !            30: <date>1915-1916</date>
        !            31: <identifier>http://heinonline.org/HeinOnline/show.pl?
        !            32:             handle=hein.journals/clqv1%26id=1%26size=4</identifier>
        !            33: <rights>Available by Subscription. See http://www.wshein.com</rights>
        !            34: </dc>
        !            35: END
        !            36: my $NSDL_metadata2=(<<END);
        !            37: <dc:dc xmlns:dc="http://purl.org/dc/elements/1.1/        !            38:        xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance        !            39:        xsi:schemaLocation="http://purl.org/dc/elements/1.1/
        !            40:                            http://www.openarchives.org/OAI/1.1/dc.xsd">
        !            41: <dc:title>Grassmann's space analysis</dc:title> 
        !            42: <dc:creator>Hyde, E. W. (Edward Wyllys)</dc:creator>
        !            43: <dc:subject>LCSH:Ausdehnungslehre; LCCN QA205.H99</dc:subject>
        !            44: <dc:publisher>J. Wiley &amp; Sons</dc:publisher>
        !            45: <dc:date>Created: 1906; Available: 1991</dc:date>
        !            46: <dc:type>text</dc:type>
        !            47: <dc:identifier>http://resolver.library.cornell.edu/math/1796949</dc:identifier>
        !            48: <dc:language>eng</dc:language>
        !            49: <dc:rights>Public Domain</dc:rights>
        !            50: </dc:dc>
        !            51: END
        !            52: 
        !            53: 
        !            54: my $compiled = $tr->compile_stylesheet_file("foo.xsl");
        !            55: my $parsed = $tr->parse_file("foo.xml");
        !            56: my $dest_file="abc.xml";
        !            57: $tr->transform_to_file($parsed, $compiled, $dest_file)
        !            58:     or die $tr->errstr;

FreeBSD-CVSweb <freebsd-cvsweb@FreeBSD.org>