X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=blobdiff_plain;f=lib%2FText%2FTradition%2FParser%2FGraphML.pm;h=fbc0d3a3767f8dcc7d0b80acb285ffc6f37718b5;hb=1f7aa795ef1c5a8567cf241e59c496ea56576ede;hp=9fe29119a965d049e9fff1fffb326d6d8dc75095;hpb=3837c155d39333869a93adf1e8375960ffbf3a92;p=scpubgit%2Fstemmatology.git diff --git a/lib/Text/Tradition/Parser/GraphML.pm b/lib/Text/Tradition/Parser/GraphML.pm index 9fe2911..fbc0d3a 100644 --- a/lib/Text/Tradition/Parser/GraphML.pm +++ b/lib/Text/Tradition/Parser/GraphML.pm @@ -8,7 +8,7 @@ use vars qw/ @EXPORT_OK $xpc /; use XML::LibXML; use XML::LibXML::XPathContext; -@EXPORT_OK = qw/ graphml_parse populate_witness_path /; +@EXPORT_OK = qw/ graphml_parse /; =head1 NAME @@ -130,28 +130,6 @@ sub graphml_parse { return $graph_hash; } -=head2 B( $tradition ) - -Given a tradition, populate the 'path' and 'uncorrected_path' attributes -of all of its witnesses. Useful for all formats based on the graph itself. - -=cut - -sub populate_witness_path { - my ( $tradition, $ante_corr ) = @_; - my $c = $tradition->collation; - print STDERR "Walking paths for witnesses\n"; - foreach my $wit ( $tradition->witnesses ) { - my @path = $c->reading_sequence( $c->start, $c->end, $wit->sigil ); - $wit->path( \@path ); - if( $ante_corr->{$wit->sigil} ) { - # Get the uncorrected path too - my @uc = $c->reading_sequence( $c->start, $c->end, - $wit->sigil . $c->ac_label, $wit->sigil ); - $wit->uncorrected_path( \@uc ); - } - } -} sub _lookup_node_data { my( $xmlnode, $key ) = @_;