2007-10-11 17:06:08 +00:00
|
|
|
require "functions.pl";
|
2007-10-10 21:48:12 +00:00
|
|
|
|
|
|
|
#create or resume session
|
2008-04-15 18:56:13 +00:00
|
|
|
CGI::Session->name($config->{"page_cookie_name"});
|
2007-10-29 16:47:16 +00:00
|
|
|
$query = new CGI;
|
2007-12-17 22:52:36 +00:00
|
|
|
$session = new CGI::Session;
|
2007-10-10 21:48:12 +00:00
|
|
|
|
2007-10-29 15:00:40 +00:00
|
|
|
@userinfo = get_userinfo_from_sid($session->id);
|
2007-10-10 21:48:12 +00:00
|
|
|
|
2008-04-27 21:18:29 +00:00
|
|
|
my $doc = XML::LibXML::Document->new( "1.0", "UTF-8" );
|
|
|
|
|
|
|
|
my $page = get_page_array(@userinfo);
|
|
|
|
|
|
|
|
$page->setNamespace("http://www.w3.org/2002/xforms", "xforms", 0);
|
|
|
|
$page->setNamespace("http://www.w3.org/2001/XMLSchema", "xsd", 0);
|
|
|
|
$page->setNamespace("http://www.w3.org/2001/XMLSchema-instance", "xsi", 0);
|
|
|
|
|
|
|
|
my $instance = XML::LibXML::Element->new( "instance" );
|
|
|
|
$instance->setNamespace("http://www.w3.org/2002/xforms", "xforms");
|
|
|
|
|
|
|
|
my $video = XML::LibXML::Element->new( "video" );
|
|
|
|
|
2008-04-30 06:28:58 +00:00
|
|
|
my $node = XML::LibXML::Element->new( "abstract" );
|
|
|
|
$node->setNamespace( "http://purl.org/dc/terms/", "dcterms" );
|
|
|
|
$node->setNamespace( "http://www.w3.org/2001/XMLSchema-instance", "xsi", 0 );
|
|
|
|
$node->setAttributeNS( "http://www.w3.org/2001/XMLSchema-instance", "type", "xsd:string" );
|
|
|
|
$video->appendChild($node);
|
|
|
|
|
|
|
|
$node = XML::LibXML::Element->new( "alternative" );
|
|
|
|
$node->setNamespace( "http://purl.org/dc/terms/", "dcterms" );
|
2008-04-27 21:18:29 +00:00
|
|
|
$node->setNamespace( "http://www.w3.org/2001/XMLSchema-instance", "xsi", 0 );
|
|
|
|
$node->setAttributeNS( "http://www.w3.org/2001/XMLSchema-instance", "type", "xsd:normalizedString" );
|
|
|
|
$video->appendChild($node);
|
|
|
|
|
2008-04-30 06:28:58 +00:00
|
|
|
$node = XML::LibXML::Element->new( "contributor" );
|
|
|
|
$node->setNamespace( "http://purl.org/dc/terms/", "dcterms" );
|
2008-04-27 21:18:29 +00:00
|
|
|
$node->setNamespace( "http://www.w3.org/2001/XMLSchema-instance", "xsi", 0 );
|
|
|
|
$node->setAttributeNS( "http://www.w3.org/2001/XMLSchema-instance", "type", "xsd:normalizedString" );
|
|
|
|
$video->appendChild($node);
|
|
|
|
|
2008-04-30 06:28:58 +00:00
|
|
|
$node = XML::LibXML::Element->new( "created" );
|
|
|
|
$node->setNamespace( "http://purl.org/dc/terms/", "dcterms" );
|
2008-04-27 21:18:29 +00:00
|
|
|
$node->setNamespace( "http://www.w3.org/2001/XMLSchema-instance", "xsi", 0 );
|
2008-04-30 06:28:58 +00:00
|
|
|
$node->setAttributeNS( "http://www.w3.org/2001/XMLSchema-instance", "type", "xsd:date" );
|
2008-04-27 21:18:29 +00:00
|
|
|
$video->appendChild($node);
|
|
|
|
|
2008-04-30 06:28:58 +00:00
|
|
|
$node = XML::LibXML::Element->new( "creator" );
|
|
|
|
$node->setNamespace( "http://purl.org/dc/terms/", "dcterms" );
|
2008-04-27 21:18:29 +00:00
|
|
|
$node->setNamespace( "http://www.w3.org/2001/XMLSchema-instance", "xsi", 0 );
|
2008-04-30 06:28:58 +00:00
|
|
|
$node->setAttributeNS( "http://www.w3.org/2001/XMLSchema-instance", "type", "xsd:normalizedString" );
|
2008-04-27 21:18:29 +00:00
|
|
|
$video->appendChild($node);
|
|
|
|
|
2008-04-30 06:28:58 +00:00
|
|
|
$node = XML::LibXML::Element->new( "hasFormat" );
|
|
|
|
$node->setNamespace( "http://purl.org/dc/terms/", "dcterms" );
|
2008-04-27 21:18:29 +00:00
|
|
|
$node->setNamespace( "http://www.w3.org/2001/XMLSchema-instance", "xsi", 0 );
|
2008-04-30 06:28:58 +00:00
|
|
|
$node->setAttributeNS( "http://www.w3.org/2001/XMLSchema-instance", "type", "xsd:normalizedString" );
|
2008-04-27 21:18:29 +00:00
|
|
|
$video->appendChild($node);
|
|
|
|
|
2008-04-30 06:28:58 +00:00
|
|
|
$node = XML::LibXML::Element->new( "isFormatOf" );
|
|
|
|
$node->setNamespace( "http://purl.org/dc/terms/", "dcterms" );
|
2008-04-27 21:18:29 +00:00
|
|
|
$node->setNamespace( "http://www.w3.org/2001/XMLSchema-instance", "xsi", 0 );
|
2008-04-30 06:28:58 +00:00
|
|
|
$node->setAttributeNS( "http://www.w3.org/2001/XMLSchema-instance", "type", "xsd:normalizedString" );
|
2008-04-27 21:18:29 +00:00
|
|
|
$video->appendChild($node);
|
|
|
|
|
2008-04-30 06:28:58 +00:00
|
|
|
$node = XML::LibXML::Element->new( "isPartOf" );
|
|
|
|
$node->setNamespace( "http://purl.org/dc/terms/", "dcterms" );
|
2008-04-27 21:18:29 +00:00
|
|
|
$node->setNamespace( "http://www.w3.org/2001/XMLSchema-instance", "xsi", 0 );
|
|
|
|
$node->setAttributeNS( "http://www.w3.org/2001/XMLSchema-instance", "type", "xsd:normalizedString" );
|
|
|
|
$video->appendChild($node);
|
|
|
|
|
2008-04-30 06:28:58 +00:00
|
|
|
$node = XML::LibXML::Element->new( "language" );
|
|
|
|
$node->setNamespace( "http://purl.org/dc/terms/", "dcterms" );
|
2008-04-27 21:18:29 +00:00
|
|
|
$node->setNamespace( "http://www.w3.org/2001/XMLSchema-instance", "xsi", 0 );
|
|
|
|
$node->setAttributeNS( "http://www.w3.org/2001/XMLSchema-instance", "type", "xsd:language" );
|
|
|
|
$video->appendChild($node);
|
|
|
|
|
2008-04-30 06:28:58 +00:00
|
|
|
$node = XML::LibXML::Element->new( "license" );
|
|
|
|
$node->setNamespace( "http://purl.org/dc/terms/", "dcterms" );
|
|
|
|
$node->setNamespace( "http://www.w3.org/2001/XMLSchema-instance", "xsi", 0 );
|
|
|
|
$node->setAttributeNS( "http://www.w3.org/2001/XMLSchema-instance", "type", "xsd:normalizedString" );
|
|
|
|
$video->appendChild($node);
|
|
|
|
|
|
|
|
$node = XML::LibXML::Element->new( "references" );
|
|
|
|
$node->setNamespace( "http://purl.org/dc/terms/", "dcterms" );
|
2008-04-29 14:07:28 +00:00
|
|
|
$node->setNamespace( "http://www.w3.org/2001/XMLSchema-instance", "xsi", 0 );
|
|
|
|
$node->setAttributeNS( "http://www.w3.org/2001/XMLSchema-instance", "type", "xsd:normalizedString" );
|
|
|
|
$video->appendChild($node);
|
|
|
|
|
2008-04-30 06:28:58 +00:00
|
|
|
$node = XML::LibXML::Element->new( "replaces" );
|
|
|
|
$node->setNamespace( "http://purl.org/dc/terms/", "dcterms" );
|
2008-04-29 14:07:28 +00:00
|
|
|
$node->setNamespace( "http://www.w3.org/2001/XMLSchema-instance", "xsi", 0 );
|
|
|
|
$node->setAttributeNS( "http://www.w3.org/2001/XMLSchema-instance", "type", "xsd:normalizedString" );
|
|
|
|
$video->appendChild($node);
|
|
|
|
|
2008-04-30 06:28:58 +00:00
|
|
|
$node = XML::LibXML::Element->new( "rightsHolder" );
|
|
|
|
$node->setNamespace( "http://purl.org/dc/terms/", "dcterms" );
|
2008-04-29 14:07:28 +00:00
|
|
|
$node->setNamespace( "http://www.w3.org/2001/XMLSchema-instance", "xsi", 0 );
|
|
|
|
$node->setAttributeNS( "http://www.w3.org/2001/XMLSchema-instance", "type", "xsd:normalizedString" );
|
|
|
|
$video->appendChild($node);
|
|
|
|
|
2008-04-30 06:28:58 +00:00
|
|
|
$node = XML::LibXML::Element->new( "source" );
|
|
|
|
$node->setNamespace( "http://purl.org/dc/terms/", "dcterms" );
|
2008-04-29 14:07:28 +00:00
|
|
|
$node->setNamespace( "http://www.w3.org/2001/XMLSchema-instance", "xsi", 0 );
|
2008-04-30 06:28:58 +00:00
|
|
|
$node->setAttributeNS( "http://www.w3.org/2001/XMLSchema-instance", "type", "xsd:normalizedString" );
|
2008-04-29 14:07:28 +00:00
|
|
|
$video->appendChild($node);
|
|
|
|
|
2008-04-30 06:28:58 +00:00
|
|
|
$node = XML::LibXML::Element->new( "spatial" );
|
|
|
|
$node->setNamespace( "http://purl.org/dc/terms/", "dcterms" );
|
2008-04-29 14:07:28 +00:00
|
|
|
$node->setNamespace( "http://www.w3.org/2001/XMLSchema-instance", "xsi", 0 );
|
2008-04-30 06:28:58 +00:00
|
|
|
$node->setAttributeNS( "http://www.w3.org/2001/XMLSchema-instance", "type", "xsd:normalizedString" );
|
2008-04-29 14:07:28 +00:00
|
|
|
$video->appendChild($node);
|
|
|
|
|
2008-04-30 06:28:58 +00:00
|
|
|
$node = XML::LibXML::Element->new( "subject" );
|
|
|
|
$node->setNamespace( "http://purl.org/dc/terms/", "dcterms" );
|
2008-04-29 14:07:28 +00:00
|
|
|
$node->setNamespace( "http://www.w3.org/2001/XMLSchema-instance", "xsi", 0 );
|
2008-04-30 06:28:58 +00:00
|
|
|
$node->setAttributeNS( "http://www.w3.org/2001/XMLSchema-instance", "type", "xsd:normalizedString" );
|
|
|
|
$video->appendChild($node);
|
|
|
|
|
|
|
|
$node = XML::LibXML::Element->new( "temporal" );
|
|
|
|
$node->setNamespace( "http://purl.org/dc/terms/", "dcterms" );
|
|
|
|
$node->setNamespace( "http://www.w3.org/2001/XMLSchema-instance", "xsi", 0 );
|
|
|
|
$node->setAttributeNS( "http://www.w3.org/2001/XMLSchema-instance", "type", "xsd:date" );
|
|
|
|
$video->appendChild($node);
|
|
|
|
|
|
|
|
$node = XML::LibXML::Element->new( "title" );
|
|
|
|
$node->setNamespace( "http://purl.org/dc/terms/", "dcterms" );
|
|
|
|
$node->setNamespace( "http://www.w3.org/2001/XMLSchema-instance", "xsi", 0 );
|
|
|
|
$node->setAttributeNS( "http://www.w3.org/2001/XMLSchema-instance", "type", "xsd:normalizedString" );
|
2008-04-29 14:07:28 +00:00
|
|
|
$video->appendChild($node);
|
|
|
|
|
|
|
|
$node = XML::LibXML::Element->new( "data" );
|
|
|
|
$node->setNamespace( "http://www.w3.org/2001/XMLSchema-instance", "xsi", 0 );
|
|
|
|
$node->setAttributeNS( "http://www.w3.org/2001/XMLSchema-instance", "type", "xsd:base64Binary" );
|
|
|
|
$video->appendChild($node);
|
|
|
|
|
2008-04-27 21:18:29 +00:00
|
|
|
$instance->appendChild($video);
|
|
|
|
|
|
|
|
$page->appendChild($instance);
|
|
|
|
|
|
|
|
$doc->setDocumentElement($page);
|
|
|
|
|
|
|
|
output_page($doc);
|