annotate _test/temp.pl @ 245:7c517134c42f

Added Unsupported media type Web exception corrected resourceLocation setting in the resource Implemented localizable resources for text messages fixed TT view scopings, INIT block in controls now sets globals correctly.
author sergey
date Mon, 29 Oct 2012 03:15:22 +0400
parents edf011437be8
children 8d36073411b1
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
210
6adaeb86945d added IMPL::Web::AutoLocator
sergey
parents: 209
diff changeset
1 #!/usr/bin/perl
6adaeb86945d added IMPL::Web::AutoLocator
sergey
parents: 209
diff changeset
2 use strict;
6adaeb86945d added IMPL::Web::AutoLocator
sergey
parents: 209
diff changeset
3
215
77a9934a44af sync, migrating to XML::Compile
cin
parents: 210
diff changeset
4 use XML::Compile::Schema;
219
sergey
parents: 215
diff changeset
5 use XML::Compile::Util qw(pack_type pack_id);
215
77a9934a44af sync, migrating to XML::Compile
cin
parents: 210
diff changeset
6 use Data::Dumper;
210
6adaeb86945d added IMPL::Web::AutoLocator
sergey
parents: 209
diff changeset
7 use Time::HiRes qw(gettimeofday tv_interval);
6adaeb86945d added IMPL::Web::AutoLocator
sergey
parents: 209
diff changeset
8
219
sergey
parents: 215
diff changeset
9 my $schema = XML::Compile::Schema->new('Resources/resources.xsd');
215
77a9934a44af sync, migrating to XML::Compile
cin
parents: 210
diff changeset
10
77a9934a44af sync, migrating to XML::Compile
cin
parents: 210
diff changeset
11 $schema->printIndex();
210
6adaeb86945d added IMPL::Web::AutoLocator
sergey
parents: 209
diff changeset
12
219
sergey
parents: 215
diff changeset
13 my $type = pack_type 'http://implab.org/schemas/resources', 'resources';
220
5c82c15b25b1 sync, updated schema
sergey
parents: 219
diff changeset
14 my $reader = $schema->compile(
5c82c15b25b1 sync, updated schema
sergey
parents: 219
diff changeset
15 READER => $type,
5c82c15b25b1 sync, updated schema
sergey
parents: 219
diff changeset
16 xsi_type => {
223
edf011437be8 updated resources schema
sergey
parents: 220
diff changeset
17 pack_type('http://implab.org/schemas/resources','AbstractResult') => 'AUTO'
220
5c82c15b25b1 sync, updated schema
sergey
parents: 219
diff changeset
18 }
5c82c15b25b1 sync, updated schema
sergey
parents: 219
diff changeset
19 );
210
6adaeb86945d added IMPL::Web::AutoLocator
sergey
parents: 209
diff changeset
20
6adaeb86945d added IMPL::Web::AutoLocator
sergey
parents: 209
diff changeset
21 my $t = [gettimeofday];
6adaeb86945d added IMPL::Web::AutoLocator
sergey
parents: 209
diff changeset
22
219
sergey
parents: 215
diff changeset
23 my $obj = $reader->('Resources/sample.xml');
210
6adaeb86945d added IMPL::Web::AutoLocator
sergey
parents: 209
diff changeset
24
215
77a9934a44af sync, migrating to XML::Compile
cin
parents: 210
diff changeset
25 print "Parsing small Xml file: ",tv_interval($t,[gettimeofday]),"\n";
210
6adaeb86945d added IMPL::Web::AutoLocator
sergey
parents: 209
diff changeset
26
215
77a9934a44af sync, migrating to XML::Compile
cin
parents: 210
diff changeset
27 print Dumper( $obj );
77a9934a44af sync, migrating to XML::Compile
cin
parents: 210
diff changeset
28
77a9934a44af sync, migrating to XML::Compile
cin
parents: 210
diff changeset
29