NAME

DTA::CAB::Format::XmlLing - Datum parser|formatter: XML: fast quick-and-dirty "flat" XML formatter using TEI att.linguistic features

SYNOPSIS

 ##========================================================================
 ## PRELIMINARIES
 
 use DTA::CAB::Format::XmlLing;
 
 ##========================================================================
 ## Constructors etc.
 
 $fmt = CLASS_OR_OBJ->new(%args);
 $xmlparser = $fmt->xmlparser();
 
 ##========================================================================
 ## Methods: Output: MIME & HTTP stuff
 
 $short = $fmt->shortName();
 $ext = $fmt->defaultExtension();
 
 ##========================================================================
 ## Methods: Output: quick and dirty
 
 $fmt = $fmt->putDocument($doc);
 

DESCRIPTION

Globals

Variable: @ISA

DTA::CAB::Format::XmlLing inherits from DTA::CAB::Format::XmlTokWrapFast.

Constructors etc.

new
 $fmt = CLASS_OR_OBJ->new(%args);

object structure: HASH ref

    {
     ##-- input: new
     doc   => $doc,         ##-- cached parsed DTA::CAB::Document
     ##-- input: inherited (but unused)
     #xdoc => $xdoc,                          ##-- XML::LibXML::Document
     #xprs => $xprs,                          ##-- override: XML::Parser parser
     ##-- output: inherited from DTA::CAB::Format
     utf8  => $bool,                         ##-- always true
     level => $level,                        ##-- output formatting level (default=0; unused)
    }
xmlparser
 $xmlparser = $fmt->xmlparser();

returns cached $fmt->{xprs} if available, otherwise caches & returns new XML::Parser

Methods: Output: MIME & HTTP stuff

shortName
 $short = $fmt->shortName();

returns "official" short name for this format; override returns "ltxml".

defaultExtension
 $ext = $fmt->defaultExtension();

returns default filename extension for this format (default='.lt.xml')

Methods: Output: quick and dirty

putDocument
 $fmt = $fmt->putDocument($doc);

quick and dirty output using TEI att.linguistic attributes only; see http://www.tei-c.org/release/doc/tei-p5-doc/en/html/ref-att.linguistic.html.

EXAMPLE

An example file in the format accepted/generated by this module is:

 <?xml version="1.0" encoding="UTF-8"?>
 <?xml version="1.0" encoding="UTF-8"?>
 <text>
        <w lemma="wie" pos="PWAV" norm="wie">wie</w>
        <w join="right" lemma="öde" pos="ADJD" norm="öde">oede</w>
        <w join="left" lemma="!" pos="$." norm="!">!</w>
  </s>
 </text>

AUTHOR

Bryan Jurish <moocow@cpan.org>

COPYRIGHT AND LICENSE

Copyright (C) 2018-2019 by Bryan Jurish

This package is free software; you can redistribute it and/or modify it under the same terms as Perl itself, either Perl version 5.24.1 or, at your option, any later version of Perl 5 you may have available.

SEE ALSO

dta-cab-analyze.perl(1), dta-cab-convert.perl(1), dta-cab-http-server.perl(1), dta-cab-http-client.perl(1), dta-cab-xmlrpc-server.perl(1), dta-cab-xmlrpc-client.perl(1), DTA::CAB::Server(3pm), DTA::CAB::Client(3pm), DTA::CAB::Format(3pm), DTA::CAB(3pm), perl(1), ...