Commit 45ced838 authored by Jonathon Duerig's avatar Jonathon Duerig

Accept https and other variants of the RSpec namespace for now.

parent d03f700b
...@@ -35,13 +35,6 @@ $RSPEC_2 = "2"; ...@@ -35,13 +35,6 @@ $RSPEC_2 = "2";
my $TB = "@prefix@"; my $TB = "@prefix@";
my $TBOPS = "@TBOPSEMAIL@"; my $TBOPS = "@TBOPSEMAIL@";
my $NS_0_1 = "http://www.protogeni.net/resources/rspec/0.1";
my $NS_0_2 = "http://www.protogeni.net/resources/rspec/0.2";
my $NS_2 = "http://www.protogeni.net/resources/rspec/2";
my $NS_0_1_WRONG = "http://protogeni.net/resources/rspec/0.1";
my $NS_0_2_WRONG = "http://protogeni.net/resources/rspec/0.2";
my $NS_2_WRONG = "http://protogeni.net/resources/rspec/2";
# Returns the document element by parsing a given string. If the # Returns the document element by parsing a given string. If the
# string fails to parse, returns undefined. # string fails to parse, returns undefined.
sub Parse($) sub Parse($)
...@@ -83,11 +76,11 @@ sub GetVersion($) ...@@ -83,11 +76,11 @@ sub GetVersion($)
my $result = $RSPEC_0_1; my $result = $RSPEC_0_1;
my $ns = $node->namespaceURI(); my $ns = $node->namespaceURI();
if (defined($ns)) { if (defined($ns)) {
if ($ns eq $NS_0_1 || $ns eq $NS_0_1_WRONG) { if ($ns =~ /protogeni.net\/resources\/rspec\/0.1$/) {
$result = $RSPEC_0_1; $result = $RSPEC_0_1;
} elsif ($ns eq $NS_0_2 || $ns eq $NS_0_2_WRONG) { } elsif ($ns =~ /protogeni.net\/resources\/rspec\/0.2$/) {
$result = $RSPEC_0_2; $result = $RSPEC_0_2;
} elsif ($ns eq $NS_2 || $ns eq $NS_2_WRONG) { } elsif ($ns =~ /protogeni.net\/resources\/rspec\/2$/) {
$result = $RSPEC_2; $result = $RSPEC_2;
} else { } else {
carp("Unknown rspec namespace: " . $ns); carp("Unknown rspec namespace: " . $ns);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment