PML/Backend/PMLTransform.pm

filter: Statementstmt 80.0% 8 / 10 Branchbran n/a Conditioncond n/a MC/DCmcdc n/a Subroutinesub 75.0% 3 / 4 Podpod 0.0% 0 / 1 totaltotal 73.3% 11 / 15 CC 1 SCAR 2.2
CC
1
Cov
80%
test
2.0
BEGIN
1.0
BEGIN
1.0
CRAP 1.2
« PML/Schema/Attribute.pm ↑ Summary PML/Schema/Type.pm »
1 package Treex::PML::Backend::PMLTransform;
2  
3 1 ▶use vars qw($VERSION);
Subroutine BEGIN: called CC=1 SCAR=0.0
4 1 ▶BEGIN {
Subroutine BEGIN: called CC=1 SCAR=0.0
5 1 $VERSION='2.29'; # version template
6 }
7  
8 1 ▶use Treex::PML::Backend::PML qw(open_backend close_backend read write);
Subroutine BEGIN: called CC=1 SCAR=0.0
9  
10 0 ▶sub test {
Subroutine test: not called CC=1 SCAR=6.9
Pod undocumented
11 0 local $Treex::PML::Backend::PML::TRANSFORM=1;
12 0 return &Treex::PML::Backend::PML::test;
13 }
14  
15 1 1;
16  
17 =pod
18  
19 =head1 NAME
20  
21 Treex::PML::Backend::PMLTransform - I/O backend implementing on-the-fly XML to PML conversion
22  
23 =head1 SYNOPSIS
24  
25 use Treex::PML;
26 Treex::PML::AddBackends(qw(PMLTransform))
27  
28 my $document = Treex::PML::Factory->createDocumentFromFile('input.xml');
29 ...
30 $document->save();
31  
32 =head1 DESCRIPTION
33  
34 This module implements a Treex::PML input/output backend which accepts
35 any XML file and attempts to convert it to PML using user-defined
36 transformations (XSLT 1.0, Perl, or external command). See
37 L<Treex::PML::Instance/"CONFIGURATION"> for details.
38  
39 WARNING: since this backend accepts every XML file, it should be added as
40 the last backend (otherwise other backends working with XML will not
41 be tried).
42  
43 =head2 BUGS
44  
45 If your system uses libxslt version 1.1.27, the XSLT transformation
46 does not work. Upgrade your system.
47  
48 =head1 COPYRIGHT AND LICENSE
49  
50 Copyright (C) 2006-2010 by Petr Pajas, 2010-2024 Jan Stepanek
51  
52 This library is free software; you can redistribute it and/or modify
53 it under the same terms as Perl itself, either Perl version 5.8.2 or,
54 at your option, any later version of Perl 5 you may have available.
55  
56 =cut
« PML/Schema/Attribute.pm ↑ Summary PML/Schema/Type.pm »