X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=blobdiff_plain;f=lib%2FText%2FTradition%2FParser%2FTEI.pm;h=78ae54215ad3791d4b3f0d7f0d03e8d73d99dc7d;hb=62a39b8f5d0ae86b26350664828069a2a44f5645;hp=285b78007a48ef8c776c7943862479e61a6f99b3;hpb=f6066bac61bc5609c60d48df17aad924c8944177;p=scpubgit%2Fstemmatology.git
diff --git a/lib/Text/Tradition/Parser/TEI.pm b/lib/Text/Tradition/Parser/TEI.pm
index 285b780..78ae542 100644
--- a/lib/Text/Tradition/Parser/TEI.pm
+++ b/lib/Text/Tradition/Parser/TEI.pm
@@ -2,6 +2,7 @@ package Text::Tradition::Parser::TEI;
use strict;
use warnings;
+use Text::Tradition::Parser::Util qw( collate_variants );
use XML::LibXML;
use XML::LibXML::XPathContext;
@@ -9,86 +10,496 @@ use XML::LibXML::XPathContext;
Text::Tradition::Parser::TEI
+=head1 SYNOPSIS
+
+ use Text::Tradition;
+
+ my $t_from_file = Text::Tradition->new(
+ 'name' => 'my text',
+ 'input' => 'TEI',
+ 'file' => '/path/to/parallel_seg_file.xml'
+ );
+
+ my $t_from_string = Text::Tradition->new(
+ 'name' => 'my text',
+ 'input' => 'TEI',
+ 'string' => $parallel_seg_xml,
+ );
+
+
=head1 DESCRIPTION
-Parser module for Text::Tradition, given a TEI parallel-segmentation
-file that describes a text and its variants.
+Parser module for Text::Tradition, given a TEI parallel-segmentation file
+that describes a text and its variants. Normally called upon
+initialization of Text::Tradition.
+
+The witnesses for the tradition are taken from the