NAME
Treex::PML::Instance::Writer
DESCRIPTION
This module provides implements the save() 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 serialize PML instances conforming to that schema (by generating handlers for individual data types). The Perl code generated by this module transforms Treex::PML objects directly into XML (we intentionally avoid using of abstract interfaces like SAX or XML::Writer for speed).
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 post-processing (transformation) of the resulting document; this post-processing can be specified in a configuration file (pmlbackend_conf.xml
, see "CONFIGURATION" in Treex::PML::Instance for more details).
TODO
Implement post-processing via an external command or Perl module.
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::Reader,
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.