removing namspace prefixes on holdings extentions
authormiker <miker@dcc99617-32d9-48b4-a31d-7c20da2025e4>
Fri, 1 May 2009 01:24:49 +0000 (01:24 +0000)
committermiker <miker@dcc99617-32d9-48b4-a31d-7c20da2025e4>
Fri, 1 May 2009 01:24:49 +0000 (01:24 +0000)
git-svn-id: svn://svn.open-ils.org/ILS/trunk@13027 dcc99617-32d9-48b4-a31d-7c20da2025e4

Open-ILS/src/perlmods/OpenILS/Application/SuperCat.pm
Open-ILS/src/perlmods/OpenILS/WWW/SuperCat.pm

index 34cea01..1344432 100644 (file)
@@ -683,7 +683,7 @@ sub new_record_holdings {
        $year += 1900;
        $month += 1;
 
-       $client->respond("<holdings:volumes xmlns:holdings='http://open-ils.org/spec/holdings/v1'>");
+       $client->respond("<volumes xmlns='http://open-ils.org/spec/holdings/v1'>");
 
        for my $cn (@{$tree->call_numbers}) {
         next unless ( $cn->deleted eq 'f' || $cn->deleted == 0 );
@@ -705,7 +705,7 @@ sub new_record_holdings {
 
                my $cn_label = $cn->label;
 
-               my $xml = "<holdings:volume id='$cn_tag' lib='$cn_lib' label='$cn_label'><holdings:copies>";
+               my $xml = "<volume id='$cn_tag' lib='$cn_lib' label='$cn_label'><copies>";
                
                for my $cp (@{$cn->copies}) {
 
@@ -721,34 +721,34 @@ sub new_record_holdings {
                        my $cp_lib = escape($cp->circ_lib->shortname);
                        my $cp_bc = escape($cp->barcode);
 
-                       $xml .= "<holdings:copy id='$cp_tag' barcode='$cp_bc'><holdings:status>$cp_stat</holdings:status>".
-                               "<holdings:location>$cp_loc</holdings:location><holdings:circlib>$cp_lib</holdings:circlib><holdings:copy_notes>";
+                       $xml .= "<copy id='$cp_tag' barcode='$cp_bc'><status>$cp_stat</status>".
+                               "<location>$cp_loc</location><circlib>$cp_lib</circlib><copy_notes>";
 
                        if ($cp->notes) {
                                for my $note ( @{$cp->notes} ) {
                                        next unless ( $note->pub eq 't' );
-                                       $xml .= sprintf('<holdings:copy_note date="%s" title="%s">%s</holdings:copy_note>',$note->create_date, escape($note->title), escape($note->value));
+                                       $xml .= sprintf('<copy_note date="%s" title="%s">%s</copy_note>',$note->create_date, escape($note->title), escape($note->value));
                                }
                        }
 
-                       $xml .= "</holdings:copy_notes><holdings:statcats>";
+                       $xml .= "</copy_notes><statcats>";
 
                        if ($cp->stat_cat_entries) {
                                for my $sce ( @{$cp->stat_cat_entries} ) {
                                        next unless ( $sce->stat_cat->opac_visible eq 't' );
-                                       $xml .= sprintf('<holdings:statcat name="%s">%s</holdings:statcat>',escape($sce->stat_cat->name) ,escape($sce->value));
+                                       $xml .= sprintf('<statcat name="%s">%s</statcat>',escape($sce->stat_cat->name) ,escape($sce->value));
                                }
                        }
 
-                       $xml .= "</holdings:statcats></holdings:copy>";
+                       $xml .= "</statcats></copy>";
                }
                
-               $xml .= "</holdings:copies></holdings:volume>";
+               $xml .= "</copies></volume>";
 
                $client->respond($xml)
        }
 
-       return "</holdings:volumes>";
+       return "</volumes>";
 }
 __PACKAGE__->register_method(
        method    => 'new_record_holdings',
index 9e6ee71..2323238 100644 (file)
@@ -42,7 +42,7 @@ $browse_types{call_number}{xml} = sub {
        my $year = (gmtime())[5] + 1900;
        my $content = '';
 
-       $content .= "<hold:volumes  xmlns:hold='http://open-ils.org/spec/holdings/v1'>";
+       $content .= "<volumes  xmlns='http://open-ils.org/spec/holdings/v1'>";
 
        for my $cn (@$tree) {
                (my $cn_class = $cn->class_name) =~ s/::/-/gso;
@@ -69,17 +69,17 @@ $browse_types{call_number}{xml} = sub {
 
                my $rec_tag = "tag:open-ils.org,$year:$rec_class/".$cn->record->id.'/'.$cn->owning_lib->shortname;
 
-               $content .= "<hold:volume id='$cn_tag' lib='$cn_lib' label='$cn_label'>";
-               $content .= "<act:owning_lib xmlns:act='http://open-ils.org/spec/actors/v1' id='$ou_tag' name='$ou_name'/>";
+               $content .= "<volume id='$cn_tag' lib='$cn_lib' label='$cn_label'>";
+               $content .= "<owning_lib xmlns:act='http://open-ils.org/spec/actors/v1' id='$ou_tag' name='$ou_name'/>";
 
                my $r_doc = $parser->parse_string($cn->record->marc);
                $r_doc->documentElement->setAttribute( id => $rec_tag );
                $content .= $U->entityize($r_doc->documentElement->toString);
 
-               $content .= "</hold:volume>";
+               $content .= "</volume>";
        }
 
-       $content .= '</hold:volumes>';
+       $content .= '</volumes>';
        return ("Content-type: application/xml\n\n",$content);
 };