Changeset 28488
- Timestamp:
- 2013-10-17T17:03:01+13:00 (10 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
gs2-extensions/apache-jena/trunk/src/perllib/jenaTDBBuildproc.pm
r28468 r28488 85 85 my ($hashmap,$value) = @_; 86 86 87 print STDERR "*** checking value = '$value'\n";88 89 print STDERR "*** lookup = ", $hashmap->{$value}, "\n";90 91 87 my $lookup = (defined $hashmap->{$value}) ? $hashmap->{$value} : "\@$value\@"; 92 88 … … 179 175 } 180 176 177 sub make_ttl_safe 178 { 179 my ($front,$str,$back) = @_; 180 181 $str =~ s/\\/\\\\/g; 182 183 $str =~ s/\&#x([0-9A-F]+);/chr(hex($1))/eig; 184 $str =~ s/\&#([0-9]+);/chr($1)/eig; 185 186 $str =~ s/[\r\n]+/\\n/g; 187 188 return "$front$str$back"; 189 } 181 190 182 191 sub textedit { … … 198 207 199 208 my $section_text = &docprint::get_section_xml($doc_obj,$doc_obj->get_top_section()); 209 210 # $section_text =~ s/[\r\n]+$//s; # remove very last newline char 211 212 ## $section_text =~ s/&#x([0-9A-F]+);/chr(hex($1))/eig; 213 ## $section_text =~ s/\&#([0-9]+);/chr($1)/eig; 214 215 # $section_text =~ s/\\/\\\\/g; 216 217 # $section_text =~ s/\&#x([0-9A-F]+);/chr(hex($1))/eig; 218 # $section_text =~ s/\&#([0-9]+);/chr($1)/eig; 219 220 # $section_text =~ s/(\r|\n)+/<br \/>/gs; 221 # $section_text =~ s/[\r\n]+/ /gs; 222 223 ## $section_text =~ s/\n/ AND /gs; 224 225 # open(DOUT,">/tmp/debug.xml") || die "Failed to open"; 226 # print DOUT $section_text; 227 # print DOUT "\n"; 228 # close DOUT; 229 # exit -1; 230 231 $section_text =~ s/(<Metadata[^>]*>)(.*?)(<\/Metadata>)/&make_ttl_safe($1,$2,$3)/gse; 232 233 ## $1&make_ttl_safe($2)$3 234 235 ## print STDERR "*** st = $section_text\n\n"; 236 237 200 238 print $outhandler $section_text; 201 239 … … 212 250 213 251 my $cmd = "gs-triplestore-add $collection \"$tmp_doc_filename\""; 214 252 215 253 my $status = system($cmd); 216 254 if ($status != 0) {
Note:
See TracChangeset
for help on using the changeset viewer.