NAME
Treex::PML::Instance::Reader
DESCRIPTION
This module provides implements the load() method of Treex::PML::Instance and is not intended for direct use.
IMPLEMENTATION NOTES
The module analyses a Treex::PML::Schema and generates Perl code to parse PML instances conforming to that schema (by generating handlers for individual data types). XML::CompactTree::XS (or XML::CompactTree) is used to first slurp the XML into in-memory Perl data structures (much faster than using SAX, XML::LibXML::Reader, DOM, or any other parsing strategy known). The Perl code generated by this module transforms these data structures into the coresponding Treex::PML objects.
The handlers for last 50 PML schemas are cached in memory, to boost processing large collections of PML instances conforming to only a few distinct schemas.
The module also implements automatic pluggable XSLT, external command, or Perl pre-processing (transformation) of the input document; this pre-processing can be specified in a configuration file (pmlbackend_conf.xml
, see "CONFIGURATION" in Treex::PML::Instance for more details).
DEBUGGING
If the environment variable PML_COMPILE_DUMP=1 is set, the module dumps the generated code to the .pml_compile.d/
folder in the current working directory. This is very for debugging or profiling the generated code.
SEE ALSO
Treex::PML::Instance, Treex::PML::Instance::Writer,
COPYRIGHT AND LICENSE
Copyright (C) 2008-2010 by Petr Pajas, 2010-2024 Jan Stepanek
This library is free software; you can redistribute it and/or modify it under the same terms as Perl itself, either Perl version 5.8.2 or, at your option, any later version of Perl 5 you may have available.
BUGS
None reported... yet.