1XML::LibXSLT::Quick(3)User Contributed Perl DocumentationXML::LibXSLT::Quick(3)
2
3
4

NAME

6       XML::LibXSLT::Quick - an easier to use (= "quicker") interface to
7       XML::LibXSLT
8

SYNOPSIS

10           use XML::LibXSLT::Quick ();
11
12           my $stylesheet =
13               XML::LibXSLT::Quick->new( { location => 'example/1.xsl', } );
14           my $xml1_text = _utf8_slurp('example/1.xml');
15           my $out_fn = 'foo.xml';
16           $stylesheet->generic_transform(
17               +{
18                   type => 'file',
19                   path => $out_fn,
20               },
21               $xml1_text,
22           );
23

DESCRIPTION

25       This is a module that wraps XML::LibXSLT with an easier to use
26       interface.
27
28       It can be used to process XML documents using XSLT (Extensible
29       Stylesheet Language Transformations)
30       <https://en.wikipedia.org/wiki/XSLT> stylesheets.
31

METHODS

33   XML::LibXSLT::Quick->new({ location=>"./xslt/my.xslt", });
34       TBD.
35
36   $obj->stylesheet()
37       The result of parse_stylesheet().
38
39   $obj->xml_parser()
40       The XML::LibXML instance.
41
42   $obj->generic_transform($dest, $source)
43       To be discussed.
44
45       See "t/using-quick-wrapper.t" .
46
47       $dest can be:
48
49       "\$my_string_var"
50
51       "{type => 'dom', }" - the DOM will be returned.
52
53       "{type => 'path', path => $filepath, }" - the output string will be
54       written to $filepath .
55
56       "{type => 'return', }" - the output string will be returned.
57
58       $source can be:
59
60       A string.
61
62       "{type => 'file', path => $filepath, params => +{}, }" - the file will
63       be parsed.
64
65       "{type => 'string', string => $my_xml_string, params => +{}, }" - the
66       string will be parsed.
67
68   $obj->output_as_chars($dom)
69   $obj->transform(...)
70   $obj->transform_into_chars(...)
71       Delegating from $obj->stylesheet() . See XML::LibXSLT .
72

SEE ALSO

74       XML::LibXSLT::Easy by Yuval Kogman - requires some MooseX modules.
75
76       XML::LibXSLT - used as the backend of this module.
77
79       NOTE!!! : this licence applies to this file alone. The blanket licence
80       for the distribution is "same as Perl 5".
81
82       (I am not a lawyer (= "IANAL") / etc. )
83
84       For more information, consult:
85
86       •   <https://www.shlomifish.org/philosophy/computers/open-source/foss-licences-wars/rev2/#which-licence-same-as-perl>
87
88       •   <https://github.com/shlomif/perl-XML-LibXSLT/issues/5>
89
90       •   <https://en.wikiquote.org/w/index.php?title=Rick_Cook&oldid=3060266>
91
92           “Programming today is a race between software engineers striving to
93           build bigger and better idiot-proof programs, and the Universe
94           trying to produce bigger and better idiots. So far, the Universe is
95           winning.”
96
97       Copyright 2022 by Shlomi Fish
98
99       This program is distributed under the MIT / Expat License:
100       <http://www.opensource.org/licenses/mit-license.php>
101
102       Permission is hereby granted, free of charge, to any person obtaining a
103       copy of this software and associated documentation files (the
104       "Software"), to deal in the Software without restriction, including
105       without limitation the rights to use, copy, modify, merge, publish,
106       distribute, sublicense, and/or sell copies of the Software, and to
107       permit persons to whom the Software is furnished to do so, subject to
108       the following conditions:
109
110       The above copyright notice and this permission notice shall be included
111       in all copies or substantial portions of the Software.
112
113       THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
114       OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
115       MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
116       IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
117       CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
118       TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
119       SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
120
121
122
123perl v5.38.0                      2023-07-21            XML::LibXSLT::Quick(3)
Impressum